From version 80.3
edited by Fredrik Köhler
on 2018/10/03 15:00
To version 80.4
edited by Fredrik Köhler
on 2018/10/04 16:57
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -2,10 +2,10 @@
2 2  
3 3  Vipps is a two-phase payment method supported by the major norwegian banks. In the direct API scenario, PayEx receives a mobile number (MSISDN) directly from the merchant UI. PayEx performs a payment that the consumer must confirm in the Vipps mobile app.
4 4  
5 -* When the consumer/end-user starts the purchase process, you make a POST request towards PayEx with the collected PURCHASE information.
6 -* After that, you need to collect the consumer's mobile number and make a POST request towards PayEx.
5 +* When the consumer/end-user starts the purchase process, you make a {{code}}POST{{/code}} request towards PayEx with the collected ##Purchase## information.
6 +* After that, you need to collect the consumer's mobile number and make a {{code}}POST{{/code}} request towards PayEx.
7 7  * PayEx will handle the dialogue with Vipps and the consumer will have to confirm the purchase in the Vipps app.
8 -* Finally you will receive a payment callback when the Vipps dialogue is completed, and you will have to make a GET request to check the payment status.
8 +* Finally you will receive a payment callback when the Vipps dialogue is completed, and you will have to make a {{code}}GET{{/code}}request to check the payment status.
9 9  * The flow is explained in the picture below:
10 10  
11 11  [[image:Vipps_flow_directAPI.png||width="850"]]
... ... @@ -14,22 +14,24 @@
14 14  
15 15  The API-requests are displayed in the sequence diagram below.
16 16  
17 -**IMPORTANT:** //Please make sure to use the complete URI's that are returned in the JSON object from the specific request you make. If you parse any content and include it in your local stored URI's - you risk breaking compability when PayEx release future updates.//
17 +**IMPORTANT:** **Please make sure to use the complete URI's that are returned in the JSON object from the specific request you make. If you parse any content and include it in your local stored URI's - you risk breaking compability when PayEx release future updates.**
18 18  
19 19  The general rest-based API model are described in the[[ API Reference & Technical Information>>doc:Main.ecommerce.technical-reference.WebHome]].
20 20  
21 -(% id="HOptions" %)
22 -== Options ==
21 +(% id="HOptionsbeforepostingapayment" %)
22 +=== Options before posting a payment ===
23 23  
24 -All valid options when posting in a payment with ##operation## equal to ##Purchase##, are described in [[the technical reference>>doc:Main.ecommerce.technical-reference.vipps-payments.WebHome]].
24 +All valid options when posting a payment with operation equal to Purchase, are described in [[the technical reference>>https://developer.payex.com/xwiki/wiki/developer/view/Main/ecommerce/technical-reference/viabill-payments/]].
25 25  
26 -* Authorization (two-phase):
27 -** The ##intent## of a Vipps ##purchase## is always ##Authorization##. The amount will be reserved but not charged. You will later (i.e. when you are ready to ship the purchased products) have to make a [[Capture>>doc:Main.ecommerce.technical-reference.vipps-payments.WebHome||anchor="HCaptures"]] or [[Cancel>>doc:Main.ecommerce.technical-reference.vipps-payments.WebHome||anchor="HCancellations"]] request.
28 -* PayEx will [[##POST## a Callback request>>doc:Main.ecommerce.technical-reference.vipps-payments.WebHome||anchor="HCallback"]] to the ##callbackUrl## given when the payment was created, whenever changes to the payment occur.
29 -* It is possible to [[abort a payment>>doc:Main.ecommerce.technical-reference.vipps-payments.WebHome||anchor="HAbort"]] if the payment has no successful transactions.
26 +(% id="HTypeofauthorization28Intent29." %)
27 +==== Type of authorization (Intent). ====
30 30  
31 -== Sequence diagrams ==
29 +* **Authorization (two-phase)**: The intent of a Vipps purchase is always ##Authorization##. The amount will be reserved but not charged. You will later (i.e. if a physical product, when you are ready to ship the purchased products) have to make a [[Capture>>https://developer.payex.com/xwiki/wiki/developer/view/Main/ecommerce/technical-reference/vipps-payments/#HCaptures]] or [[Cancel>>https://developer.payex.com/xwiki/wiki/developer/view/Main/ecommerce/technical-reference/vipps-payments/#HCancellations]] request.
30 +* **Callback from PayEx:** Whenever changes to the payment occur a [[Callback request>>https://developer.payex.com/xwiki/wiki/developer/view/Main/ecommerce/technical-reference/vipps-payments/#HCallback]] will be posted to the callbackUrl, generated when the payment was created.
31 +* **Abort:** It is possible to [[abort a payment>>https://developer.payex.com/xwiki/wiki/developer/view/Main/ecommerce/technical-reference/vipps-payments/#HAbort]] if the payment has no successful transactions.
32 32  
33 +== Payment flow ==
34 +
33 33  The sequence diagram below shows the two requests you have to send to PayEx to make a purchase. The links will take you directly to the API description for the specific request.
34 34  
35 35  {{plantuml}}
... ... @@ -66,8 +66,8 @@
66 66  end box
67 67  
68 68  Participant Merchant
69 -Participant PAYEX.FRONTEND
70 -Participant PAYEX.BACKEND
71 +Participant PayEx.FrontEnd
72 +Participant PayEx.BackEnd
71 71  participant Vipps.API
72 72  'participant TSP
73 73  
... ... @@ -75,22 +75,22 @@
75 75  Browser -> Merchant: start purchase (pay with VIPPS)
76 76  Activate Merchant
77 77  
78 -Merchant -> PAYEX.FRONTEND: POST [[/xwiki/wiki/developer/view/Main/ecommerce/technical-reference/vipps-payments/#HCreate Vipps payments]]
80 +Merchant -> PayEx.FrontEnd: POST [[/xwiki/wiki/developer/view/Main/ecommerce/technical-reference/vipps-payments/#HCreate Vipps payments]]
79 79  note left: First API request
80 -Activate PAYEX.FRONTEND
81 -PAYEX.FRONTEND --> Merchant: payment resource
82 -Deactivate PAYEX.FRONTEND
82 +Activate PayEx.FrontEnd
83 +PayEx.FrontEnd --> Merchant: payment resource
84 +Deactivate PayEx.FrontEnd
83 83  Merchant --> Browser: Collect mobile number in UI
84 84  Browser -> Browser: Enter mobile number
85 85  Browser -> Merchant: Mobile number
86 -Merchant -> PAYEX.FRONTEND: POST [[/xwiki/wiki/developer/view/Main/ecommerce/technical-reference/vipps-payments/#HAuthorizations Vipps authorizations]]
88 +Merchant -> PayEx.FrontEnd: POST [[/xwiki/wiki/developer/view/Main/ecommerce/technical-reference/vipps-payments/#HAuthorizations Vipps authorizations]]
87 87  note left: Second API request
88 -Activate PAYEX.FRONTEND
89 -PAYEX.FRONTEND -> Vipps.API: Initialize Vipps payment
90 +Activate PayEx.FrontEnd
91 +PayEx.FrontEnd -> Vipps.API: Initialize Vipps payment
90 90  Activate Vipps.API
91 -Vipps.API --> PAYEX.FRONTEND: HTTP response
92 -'Deactivate PAYEX.FRONTEND
93 -PAYEX.FRONTEND --> Merchant: Authorization response (State=AwaitingActivity)
93 +Vipps.API --> PayEx.FrontEnd: HTTP response
94 +'Deactivate PayEx.FrontEnd
95 +PayEx.FrontEnd --> Merchant: Authorization response (State=AwaitingActivity)
94 94  Merchant --> Browser: Response (check your phone)
95 95  Deactivate Merchant
96 96  note left: Merchant should wait for [[/xwiki/wiki/developer/view/Main/ecommerce/technical-reference/vipps-payments/#HCallback Vipps Callback]] before proceeding
... ... @@ -99,20 +99,20 @@
99 99  Vipps.API -> Vipps_App: Confirm Payment UI
100 100  Vipps_App -> Vipps_App: Confirmation Dialogue
101 101  Vipps_App --> Vipps.API: Confirmation
102 -Vipps.API -> PAYEX.BACKEND: make payment
103 -activate PAYEX.BACKEND
104 -PAYEX.BACKEND -> PAYEX.BACKEND: execute payment
105 -PAYEX.BACKEND --> Vipps.API: response
104 +Vipps.API -> PayEx.BackEnd: make payment
105 +activate PayEx.BackEnd
106 +PayEx.BackEnd -> PayEx.BackEnd: execute payment
107 +PayEx.BackEnd --> Vipps.API: response
106 106  Deactivate Vipps.API
107 -PAYEX.BACKEND -/ PAYEX.FRONTEND: payment result
108 -deactivate PAYEX.BACKEND
109 -'Activate PAYEX.FRONTEND
110 -PAYEX.FRONTEND -/ Merchant: Payment Callback
109 +PayEx.BackEnd -/ PayEx.FrontEnd: payment result
110 +deactivate PayEx.BackEnd
111 +'Activate PayEx.FrontEnd
112 +PayEx.FrontEnd -/ Merchant: Payment Callback
111 111  Activate Merchant
112 -Merchant -> PAYEX.FRONTEND: GET [[/xwiki/wiki/developer/view/Main/ecommerce/technical-reference/vipps-payments Vipps payments]]
114 +Merchant -> PayEx.FrontEnd: GET [[/xwiki/wiki/developer/view/Main/ecommerce/technical-reference/vipps-payments Vipps payments]]
113 113  note left: Third API request
114 -PAYEX.FRONTEND-->Merchant: Payment resource
115 -'Deactivate PAYEX.FRONTEND
116 +PayEx.FrontEnd-->Merchant: Payment resource
117 +'Deactivate PayEx.FrontEnd
116 116  Merchant-->Browser: Display purchase result
117 117  Deactivate Merchant
118 118  
... ... @@ -122,8 +122,8 @@
122 122  == Options after posting a payment ==
123 123  
124 124  * Be prepared to [[receive a callback from PayEx>>doc:Main.ecommerce.technical-reference.vipps-payments.WebHome||anchor="HCallback"]].
125 -* VIPPS only support two-phase transactions (AUTHORIZE), which mean that you must implement the CAPTURE and CANCEL requests.
126 -* For reversals, you will need to implement the REVERSAL request.
127 +* Vipps only support two-phase transactions (##Authorize##), which mean that you must implement the Capture and Cancel requests.
128 +* For reversals, you will need to implement the Reversal request.
127 127  
128 128  === Capture Sequence ===
129 129  
... ... @@ -159,18 +159,18 @@
159 159  skinparam NoteFontColor #333333
160 160  
161 161  Actor Merchant
162 -Participant PAYEX.FRONTEND
163 -Participant PAYEX.BACKEND
164 -Merchant->PAYEX.FRONTEND: POST [[/xwiki/wiki/developer/view/Main/ecommerce/technical-reference/vipps-payments/#HCaptures Vipps captures]]
164 +Participant PayEx.FrontEnd
165 +Participant PayEx.BackEnd
166 +Merchant->PayEx.FrontEnd: POST [[/xwiki/wiki/developer/view/Main/ecommerce/technical-reference/vipps-payments/#HCaptures Vipps captures]]
165 165  Activate Merchant
166 -Activate PAYEX.FRONTEND
167 -PAYEX.FRONTEND->PAYEX.FRONTEND: validate input
168 -PAYEX.FRONTEND -> PAYEX.BACKEND: call capture method
169 -Activate PAYEX.BACKEND
170 -PAYEX.BACKEND-->PAYEX.FRONTEND: capture result
171 -Deactivate PAYEX.BACKEND
172 -PAYEX.FRONTEND-->Merchant: transaction resource
173 -Deactivate PAYEX.FRONTEND
168 +Activate PayEx.FrontEnd
169 +PayEx.FrontEnd->PayEx.FrontEnd: validate input
170 +PayEx.FrontEnd -> PayEx.BackEnd: call capture method
171 +Activate PayEx.BackEnd
172 +PayEx.BackEnd-->PayEx.FrontEnd: capture result
173 +Deactivate PayEx.BackEnd
174 +PayEx.FrontEnd-->Merchant: transaction resource
175 +Deactivate PayEx.FrontEnd
174 174  Deactivate Merchant
175 175  @enduml
176 176  {{/plantuml}}
... ... @@ -209,18 +209,18 @@
209 209  skinparam NoteFontColor #333333
210 210  
211 211  Actor Merchant
212 -Participant PAYEX.FRONTEND
213 -Participant PAYEX.BACKEND
214 -Merchant->PAYEX.FRONTEND: POST [[/xwiki/wiki/developer/view/Main/ecommerce/technical-reference/vipps-payments/#HCancellations Vipps cancellations]]
214 +Participant PayEx.FrontEnd
215 +Participant PayEx.BackEnd
216 +Merchant->PayEx.FrontEnd: POST [[/xwiki/wiki/developer/view/Main/ecommerce/technical-reference/vipps-payments/#HCancellations Vipps cancellations]]
215 215  Activate Merchant
216 -Activate PAYEX.FRONTEND
217 -PAYEX.FRONTEND->PAYEX.FRONTEND: validate input
218 -PAYEX.FRONTEND-> PAYEX.BACKEND: call cancel method
219 -Activate PAYEX.BACKEND
220 -PAYEX.BACKEND-->PAYEX.FRONTEND: cancel result
221 -Deactivate PAYEX.BACKEND
222 -PAYEX.FRONTEND-->Merchant: transaction resource
223 -Deactivate PAYEX.FRONTEND
218 +Activate PayEx.FrontEnd
219 +PayEx.FrontEnd->PayEx.FrontEnd: validate input
220 +PayEx.FrontEnd-> PayEx.BackEnd: call cancel method
221 +Activate PayEx.BackEnd
222 +PayEx.BackEnd-->PayEx.FrontEnd: cancel result
223 +Deactivate PayEx.BackEnd
224 +PayEx.FrontEnd-->Merchant: transaction resource
225 +Deactivate PayEx.FrontEnd
224 224  Deactivate Merchant
225 225  @enduml
226 226  {{/plantuml}}
... ... @@ -259,18 +259,18 @@
259 259  skinparam NoteFontColor #333333
260 260  
261 261  Actor Merchant
262 -Participant PAYEX.FRONTEND
263 -Participant PAYEX.BACKEND
264 -Merchant->PAYEX.FRONTEND: POST [[/xwiki/wiki/developer/view/Main/ecommerce/technical-reference/vipps-payments/#HReversals Vipps reversals]]
264 +Participant PayEx.FrontEnd
265 +Participant PayEx.BackEnd
266 +Merchant->PayEx.FrontEnd: POST [[/xwiki/wiki/developer/view/Main/ecommerce/technical-reference/vipps-payments/#HReversals Vipps reversals]]
265 265  Activate Merchant
266 -Activate PAYEX.FRONTEND
267 -PAYEX.FRONTEND ->PAYEX.FRONTEND: validate input
268 -PAYEX.FRONTEND -> PAYEX.BACKEND: call credit method
269 -Activate PAYEX.BACKEND
270 -PAYEX.BACKEND-->PAYEX.FRONTEND: credit result
271 -Deactivate PAYEX.BACKEND
272 -PAYEX.FRONTEND-->Merchant: transaction resource
273 -Deactivate PAYEX.FRONTEND
268 +Activate PayEx.FrontEnd
269 +PayEx.FrontEnd ->PayEx.FrontEnd: validate input
270 +PayEx.FrontEnd -> PayEx.BackEnd: call credit method
271 +Activate PayEx.BackEnd
272 +PayEx.BackEnd-->PayEx.FrontEnd: credit result
273 +Deactivate PayEx.BackEnd
274 +PayEx.FrontEnd-->Merchant: transaction resource
275 +Deactivate PayEx.FrontEnd
274 274  Deactivate Merchant
275 275  @enduml
276 276  {{/plantuml}}

Tips

You can click on the arrows next to the breadcrumb elements to quickly navigate to sibling and children pages.

Need help?

If you need help with XWiki you can contact: