Wiki source code of bnpl-payment-order

Last modified by thomas hedstrom on 2026/07/08 14:57
Hide last authors
Thomas Hedström 4.1 1 (% id="HChangelog" %)
2 = Changelog =
Thomas Hedström 2.1 3
4
Thomas Hedström 15.1 5 * 2024-10-30 - Init documentation
Thomas Hedström 16.1 6 * 2026-02-17 - Request changes
Thomas Hedström 15.1 7 ** Added new optional parameter for Create BnplPaymentOrder - **Instore**
8 ** Added new mandatory parameter for Post Reversal - **ReceiptReference**
Thomas Hedström 14.1 9
Thomas Hedström 19.1 10 = Swagger =
Thomas Hedström 4.1 11
thomas hedstrom 24.1 12 [[Swagger.json-2026-06-17>>attach:Swagger_Releases-498954.txt]]
Thomas Hedström 19.1 13
Thomas Hedström 4.1 14 (% id="HIntroduction" %)
15 = Introduction =
16
Thomas Hedström 11.1 17 The bnpl-payment-order API handles payment flows for multiple buy-now-pay-later services, where the customer themselves are available to choose between preferred payment method from a set of preconfigured payment options.
Thomas Hedström 4.1 18
19
Thomas Hedström 10.1 20 [[image:1730445122347-474.png||height="435" width="467"]]
21
Mats Lyth 13.1 22 == 1. Bnpl-payment-orders ==
Mats Lyth 12.1 23
24
Thomas Hedström 2.1 25 Get the specified payment order
26
27 ==== 1.1 Get specific Bnpl-payment-order ====
28
29 {{code language="http" title="**Request**"}}
thomas hedstrom 21.1 30 GET /ledger/bnpl-payment-order/v1/{ownerNo}/bnpl-payment-orders/{paymentOrderId}?SellerNo={SellerNo} HTTP/1.1
Thomas Hedström 2.1 31 Host: -
32 Authorization: Bearer<Token>
33 Content-Type: application/json
34
35 {{/code}}
36
37 Payment order that has been authorized and with full RemainingAmount left
38
39 {{code language="http" title="**Response**"}}
40 HTTP/1.1 200 OK
41 Content-Type: application/json
42
43 {
44 "paymentOrderId": 1234567890,
45 "status": "Authorized",
46 "authorizationAmount": 1000.00,
47 "remainingAmount": 1000.00,
48 "currency": "SEK",
49 "sellerAuthorizationId": "1234567890",
50 "customer": {
51 "nationalConsumerIdentifier": {
52 "value": "YYYYMMDD-XXXX",
53 "countryCode": "SE"
54 },
55 "email": "example@payex.com",
thomas hedstrom 22.1 56 "msisdn": "+46701234567"
Thomas Hedström 2.1 57 },
58 "pointOfSale": "My Web Shop",
59 "mcc": "1234",
60 "restrictToProfiles": [
61 {
62 "profileName": "BA_PartPayment",
63 "subProfiles": [
64 {
65 "subProfileName": "InstallmentAccount_3"
66 }
67 ]
68 }
69 ],
Thomas Hedström 14.1 70 "instore": false,
Thomas Hedström 2.1 71 "operations": [
72 {
73 "rel": "add-reversal",
74 "method": "POST",
75 "href": "/ledger/bnpl-payment-order/v1/xxx/bnpl-payment-orders/1234567890/reversals"
76 },
77 {
78 "rel": "redirect",
79 "method": "POST",
80 "href": "/ledger/bnpl-payment-order/v1/xxx/bnpl-payment-orders/1234567890/redirect"
81 },
82 {
83 "rel": "cancel-authorize",
84 "method": "POST",
85 "href": "/ledger/bnpl-payment-order/v1/xxx/bnpl-payment-orders/1234567890/cancel-authorize"
86 },
87 {
88 "rel": "add-capture",
89 "method": "POST",
90 "href": "/ledger/bnpl-payment-order/v1/xxx/bnpl-payment-orders/1234567890/captures"
91 }
92 ]
93 }
94 {{/code}}
95
96
97
thomas hedstrom 21.1 98 **Query paramters**
99
100 (% class="table-bordered table-striped" %)
101 |=Name |=Required |=Description
102 |SellerNo |False |
103
104
Thomas Hedström 2.1 105 **Possible problems**
106
107 (% class="table-bordered table-striped" %)
108 |=Http status |=Problem type |=Description
109 |400 |validation |occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation
110 |404 |not-found |the targeted resource was not found, cause could be both that it's not accessible with provided information/credentials or that the resource doesn't exist
111 |500 |fatal |an unexpected error has occurred
112
113 ==== 1.2 Create Bnpl-payment-order ====
114
115 Create a payment order to begin authorization process
116
117 {{code language="http" title="**Request**"}}
118 POST /ledger/bnpl-payment-order/v1/{ownerNo}/bnpl-payment-orders HTTP/1.1
119 Host: -
120 Authorization: Bearer<Token>
121 Content-Type: application/json
122
123 {
124 "authorizationAmount": 1000.00,
125 "currency": "SEK",
126 "sellerAuthorizationId": "1234567890",
127 "customer": {
128 "nationalConsumerIdentifier": {
129 "value": "YYYYMMDD-XXXX",
130 "countryCode": "SE"
131 },
132 "email": "example@payex.com",
thomas hedstrom 22.1 133 "msisdn": "+46701234567"
Thomas Hedström 2.1 134 },
135 "pointOfSale": "My Web Shop",
136 "mcc": "1234",
137 "restrictToProfiles": [
138 {
139 "profileName": "BA_PartPayment",
140 "subProfiles": [
141 {
142 "subProfileName": "InstallmentAccount_3"
143 }
144 ]
145 }
Thomas Hedström 14.1 146 ],
147 "instore": false
Thomas Hedström 2.1 148 }
149 {{/code}}
150
151
152 **Request object specification**
153
154 (% class="table-bordered table-striped" %)
155 |=Property |=Data type|=Format|=Required|=Description
156 |authorizationAmount |number |Type: double
157 Max: 100000000
158 Min: 0 |Yes |The authorization amount, can't have more than 2 decimal places
159 |currency |string |(((
160 * SEK
161 * NOK
162 * DKK
163 * EUR
thomas hedstrom 24.1 164 )))|Yes |
165 |sellerAuthorizationId |string |Pattern: ^[a-zA-Z0-9#_:@.\-åäöÅÄÖ]{1,}$ |Yes |The seller's unique identifier of the authorize/payment order
Thomas Hedström 2.1 166 |=customer |object | |Yes |
167 |= nationalConsumerIdentifier |object | |Yes |
Mats Lyth 13.1 168 | value |string | |Yes |The identifier - SSN, Personnummer, CPR, d-nummer, temporary identification number etc. Uniquely identifies the consumer. Visit developer.payex.com for information about supported national identifier format
169 | countryCode |string |Pattern: SE~|NO~|DK~|FI |Yes |The country code for the identifier value property. Valid values are 'SE', 'NO', 'DK', 'FI'. ~[~[ISO 3166-1 alpha-2>>url:https://sv.wikipedia.org/wiki/ISO_3166]]
thomas hedstrom 24.1 170 | email |string |Pattern: ^[^;\xA0\xD0\─@<>\p{Cc}]+@(?!\.)(?!.*\.\.)(?:[^;\xA0\xD0\─@<>\p{Cc}]+\.[^;\xA0\xD0\─@<>\p{Cc}]+~|\~[~[A-Fa-f\d\:]+\])(?<!\.)$ |Yes |Email to the customer
171 | msisdn |string |Pattern: ^[+]{1}\d{4,14}$ |No |Phone number to the customer
172 |pointOfSale |string |Pattern: ^[\u0020-\u003A \u003C-\u007E \u00A0-\u00FF \u2019]*$ |Yes |Trade name of the point of sale. Will be displayed to end customer.
Thomas Hedström 14.1 173 |mcc |string | |No |Merchant Category Code
Thomas Hedström 2.1 174 |=restrictToProfiles |array | |No |
175 | profileName |string | |Yes |Profile identifier
176 |= subProfiles |array | |No |
177 | subProfileName |string | |Yes |Sub profile identifier
Thomas Hedström 14.1 178 |instore |boolean | |No |This request is an Instore bnpl order
Thomas Hedström 2.1 179
180 Newly created payment order with restricted account profiles
181
182 {{code language="http" title="**Response**"}}
183 HTTP/1.1 201 Created
184 Content-Type: application/json
185
186 {
187 "paymentOrderId": 1234567890,
188 "status": "Created",
189 "authorizationAmount": 1000.00,
190 "remainingAmount": 0,
191 "currency": "SEK",
192 "sellerAuthorizationId": "1234567890",
193 "customer": {
194 "nationalConsumerIdentifier": {
195 "value": "YYYYMMDD-XXXX",
196 "countryCode": "SE"
197 },
198 "email": "example@payex.com",
thomas hedstrom 22.1 199 "msisdn": "+46701234567"
Thomas Hedström 2.1 200 },
201 "pointOfSale": "My Web Shop",
202 "mcc": "1234",
203 "restrictToProfiles": [
204 {
205 "profileName": "BA_PartPayment",
206 "subProfiles": [
207 {
208 "subProfileName": "InstallmentAccount_3"
209 }
210 ]
211 }
212 ],
Thomas Hedström 14.1 213 "instore": false,
Thomas Hedström 2.1 214 "operations": [
215 {
216 "rel": "add-reversal",
217 "method": "POST",
218 "href": "/ledger/bnpl-payment-order/v1/xxx/bnpl-payment-orders/1234567890/reversals"
219 },
220 {
221 "rel": "redirect",
222 "method": "POST",
223 "href": "/ledger/bnpl-payment-order/v1/xxx/bnpl-payment-orders/1234567890/redirect"
224 },
225 {
226 "rel": "cancel-authorize",
227 "method": "POST",
228 "href": "/ledger/bnpl-payment-order/v1/xxx/bnpl-payment-orders/1234567890/cancel-authorize"
229 },
230 {
231 "rel": "add-capture",
232 "method": "POST",
233 "href": "/ledger/bnpl-payment-order/v1/xxx/bnpl-payment-orders/1234567890/captures"
234 }
235 ],
236 "@id": "/ledger/bnpl-payment-order/v1/xxx/bnpl-payment-orders/1234567890"
237 }
238 {{/code}}
239
240
241 **Possible problems**
242
243 (% class="table-bordered table-striped" %)
244 |=Http status |=Problem type |=Description
Thomas Hedström 14.1 245 |409 |identifier-already-in-use |SellerAuthorizationId [xxxx] already exists. It is used for payment order with PaymentOrderId [yyyyy]
246 |409 |no-available-profiles |No profiles configured.
Thomas Hedström 2.1 247 |400 |validation |occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation
248 |404 |not-found |the targeted resource was not found, cause could be both that it's not accessible with provided information/credentials or that the resource doesn't exist
249 |500 |fatal |an unexpected error has occurred
250
thomas hedstrom 21.1 251
Thomas Hedström 2.1 252 **Response object specification**
253
254 (% class="table-bordered table-striped" %)
255 |=Property |=Data type|=Format|=Description
256 |authorizationAmount |number |Type: double
257 Max: 100000000
258 Min: 0 |The authorization amount, can't have more than 2 decimal places
259 |currency |string |(((
260 * SEK
261 * NOK
262 * DKK
263 * EUR
thomas hedstrom 24.1 264 )))|
265 |sellerAuthorizationId |string |Pattern: ^[a-zA-Z0-9#_:@.\-åäöÅÄÖ]{1,}$ |The seller's unique identifier of the authorize/payment order
Thomas Hedström 2.1 266 |=customer |object | |
267 |= nationalConsumerIdentifier |object | |
268 | value |string | |The identifier - SSN, Personnummer, CPR, d-nummer, temporary identification number etc. Uniquely identifies the consumer. Visit developer.payex.com for information about supported national identifier format
269 | countryCode |string |Pattern: SE~|NO~|DK~|FI |The country code for the identifier value property. Valid values are 'SE', 'NO', 'DK', 'FI'. ~[~[ISO 3166-1 alpha-2>>url:https://sv.wikipedia.org/wiki/ISO_3166]]
thomas hedstrom 24.1 270 | email |string |Pattern: ^[^;\xA0\xD0\─@<>\p{Cc}]+@(?!\.)(?!.*\.\.)(?:[^;\xA0\xD0\─@<>\p{Cc}]+\.[^;\xA0\xD0\─@<>\p{Cc}]+~|\~[~[A-Fa-f\d\:]+\])(?<!\.)$ |Email to the customer
271 | msisdn |string |Pattern: ^[+]{1}\d{4,14}$ |Phone number to the customer
272 |pointOfSale |string |Pattern: ^[\u0020-\u003A \u003C-\u007E \u00A0-\u00FF \u2019]*$ |Trade name of the point of sale. Will be displayed to end customer.
Thomas Hedström 2.1 273 |mcc |string | |Merchant Category Code
274 |=restrictToProfiles |array | |
275 | profileName |string | |Profile identifier
276 |= subProfiles |array | |
277 | subProfileName |string | |Sub profile identifier
Thomas Hedström 14.1 278 |instore |boolean | |This request is an Instore bnpl order
Thomas Hedström 2.1 279 |paymentOrderId |number |Type: int64 |PaymentOrderId aka ExternalReservationId
280 |status |string |(((
281 * Created
282 * Rejected
283 * Canceled
thomas hedstrom 21.1 284 * Authorized
Thomas Hedström 2.1 285 * Failed
thomas hedstrom 24.1 286 )))|
Mats Lyth 13.1 287 |remainingAmount |number |Type: double
288 Max: 100000000
289 Min: 0 |Remaining amount of the authorize. If amount is zero then the authorize has already been fully used, cancelled or the payment order has not been authorized yet
Thomas Hedström 2.1 290 |operations |array | |List of operations that is possible to perform on the current resource, read more about the ~[~[hypermedia part of the response>>https://developer.payex.com/xwiki/wiki/developer/view/Main/Invoicing/ledger-api-general-docs/restful-pattern-guideline/#HHyper-mediaresponse]]
291 |@id |string | |Uri identifier of the current resource
thomas hedstrom 24.1 292
Thomas Hedström 2.1 293 == 2. Cancel-authorize ==
294
295
296 ==== 2.1 Create Cancel-authorize ====
297
298 This operation is for removing any remaining amount of an already completed authorization. Already captured amount is unaffected.
299
300 {{code language="http" title="**Request**"}}
301 POST /ledger/bnpl-payment-order/v1/{ownerNo}/bnpl-payment-orders/{paymentOrderId}/cancel-authorize HTTP/1.1
302 Host: -
303 Authorization: Bearer<Token>
304 Content-Type: application/json
305
306 {
307 }
308 {{/code}}
309
310
311
312 {{code language="http" title="**Response**"}}
313 HTTP/1.1 204 NO CONTENT
314 Content-Type: application/json
315
316 {}
317 {{/code}}
318
319
320 **Possible problems**
321
322 (% class="table-bordered table-striped" %)
323 |=Http status |=Problem type |=Description
324 |404 |not-found |the targeted resource was not found, cause could be both that it's not accessible with provided information/credentials or that the resource doesn't exist
325 |500 |fatal |an unexpected error has occurred
326
327 == 3. Captures ==
328
329
330 ==== 3.1 Create Capture ====
331
332 Perform a capture to solidify the purchase for this payment order. Multiple captures can be done for one payment order as long as we have RemainingAmount left on the order.
333
334 {{code language="http" title="**Request**"}}
335 POST /ledger/bnpl-payment-order/v1/{ownerNo}/bnpl-payment-orders/{paymentOrderId}/captures HTTP/1.1
336 Host: -
337 Authorization: Bearer<Token>
338 Content-Type: application/json
339
340 {
341 "amount": 1000.00,
342 "currency": "SEK",
343 "orderLines": [
344 {
345 "itemDescription": "Phone",
346 "amount": 1000.00
347 }
348 ],
Thomas Hedström 14.1 349 "sellerTransactionId": "Example-seller-123",
Thomas Hedström 2.1 350 "receiptReference": "Example-receipt-Phone"
351 }
352 {{/code}}
353
354
355 **Request object specification**
356
357 (% class="table-bordered table-striped" %)
358 |=Property |=Data type|=Format|=Required|=Description
359 |amount |number |Type: double
360 Max: 100000000
361 Min: 0 |Yes |The total amount
362 |currency |string |(((
363 * SEK
364 * NOK
365 * DKK
366 * EUR
thomas hedstrom 24.1 367 )))|Yes |
Thomas Hedström 2.1 368 |=orderLines |array | |Yes |
thomas hedstrom 24.1 369 | itemDescription |string |Pattern: ^[\u0020-\u003A \u003C-\u007E \u00A0-\u00FF \u2019]*$ |Yes |Name or description of an individual item in the capture
Thomas Hedström 2.1 370 | amount |number |Type: double
371 Max: 100000000
372 Min: 0 |Yes |Price of an individual item in the capture
thomas hedstrom 24.1 373 |sellerTransactionId |string |Pattern: ^[a-zA-Z0-9#_:@.\-åäöÅÄÖ]{1,}$ |Yes |The seller's unique identifier of the capture
374 |receiptReference |string |Pattern: ^[a-zA-Z0-9#_:@.\-]{1,}$ |Yes |A receipt reference meaningful for the consumer
Thomas Hedström 2.1 375
376 Capture example with one item in the order line
377
378 {{code language="http" title="**Response**"}}
379 HTTP/1.1 201 Created
380 Content-Type: application/json
381
382 {
383 "captureId": 1234,
384 "amount": 1000.00,
385 "currency": "SEK",
386 "orderLines": [
387 {
388 "itemDescription": "Phone",
389 "amount": 1000.00
390 }
391 ],
392 "sellerTransactionId": "Example-seller-123",
Thomas Hedström 14.1 393 "receiptReference": "Example-receipt-Phone",
Thomas Hedström 3.1 394 "@id": "https://example.com/capture/1234"
Thomas Hedström 2.1 395 }
396 {{/code}}
397
398
399 **Possible problems**
400
401 (% class="table-bordered table-striped" %)
402 |=Http status |=Problem type |=Description
403 |400 |validation |occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation
404 |404 |not-found |the targeted resource was not found, cause could be both that it's not accessible with provided information/credentials or that the resource doesn't exist
Mats Lyth 13.1 405 |409 |currency-not-supported |Currency for this capture is invalid for this payment order, make sure it match with currency specified at order creation
Thomas Hedström 14.1 406 |409 |identifier-already-in-use |SellerTransactionId [xxxx] already exists. It is used in the capture transaction with CaptureId [yyyy]
Mats Lyth 13.1 407 |422 |corrupt-resource |Performed action may or may not have been completed but result was corrupted or incomplete. Read details for more information.
Thomas Hedström 2.1 408 |500 |fatal |an unexpected error has occurred
409
thomas hedstrom 21.1 410
Thomas Hedström 2.1 411 **Response object specification**
412
413 (% class="table-bordered table-striped" %)
414 |=Property |=Data type|=Format|=Description
415 |amount |number |Type: double
416 Max: 100000000
417 Min: 0 |The total amount
418 |currency |string |(((
419 * SEK
420 * NOK
421 * DKK
422 * EUR
thomas hedstrom 24.1 423 )))|
Thomas Hedström 2.1 424 |=orderLines |array | |
thomas hedstrom 24.1 425 | itemDescription |string |Pattern: ^[\u0020-\u003A \u003C-\u007E \u00A0-\u00FF \u2019]*$ |Name or description of an individual item in the capture
Thomas Hedström 2.1 426 | amount |number |Type: double
427 Max: 100000000
428 Min: 0 |Price of an individual item in the capture
thomas hedstrom 24.1 429 |sellerTransactionId |string |Pattern: ^[a-zA-Z0-9#_:@.\-åäöÅÄÖ]{1,}$ |The seller's unique identifier of the capture
430 |receiptReference |string |Pattern: ^[a-zA-Z0-9#_:@.\-]{1,}$ |A receipt reference meaningful for the consumer
Mats Lyth 13.1 431 |captureId |number |Type: int64
thomas hedstrom 24.1 432 Pattern: ^[a-zA-Z0-9\-]{1,}$ |Identifier of the capture
Mats Lyth 13.1 433 |@id |string | |Uri identifier of the current resource
thomas hedstrom 24.1 434
Thomas Hedström 2.1 435 == 4. Reversals ==
436
437
438 ==== 4.1 Create Reversal ====
439
440 Can only reverse captures from this payment order
441
442 {{code language="http" title="**Request**"}}
443 POST /ledger/bnpl-payment-order/v1/{ownerNo}/bnpl-payment-orders/{paymentOrderId}/reversals HTTP/1.1
444 Host: -
445 Authorization: Bearer<Token>
446 Content-Type: application/json
447
448 {
449 "amount": 1000.00,
450 "currency": "SEK",
Thomas Hedström 14.1 451 "sellerTransactionId": "123455679",
452 "receiptReference": "Example-receipt-Phone"
Thomas Hedström 2.1 453 }
454 {{/code}}
455
456
457 **Request object specification**
458
459 (% class="table-bordered table-striped" %)
460 |=Property |=Data type|=Format|=Required|=Description
461 |amount |number |Type: double
462 Max: 100000000
463 Min: 0 |Yes |The total amount to reverse
464 |currency |string |(((
465 * SEK
466 * NOK
467 * DKK
468 * EUR
thomas hedstrom 24.1 469 )))|Yes |
470 |sellerTransactionId |string |Pattern: ^[a-zA-Z0-9#_:@.\-åäöÅÄÖ]{1,}$ |Yes |The sellers unique identifier of the reversal
471 |receiptReference |string |Pattern: ^[a-zA-Z0-9#_:@.\-]{1,}$ |Yes |A receipt reference meaningful for the consumer
Thomas Hedström 2.1 472
473 Reversal of 1000SEK
474
475 {{code language="http" title="**Response**"}}
476 HTTP/1.1 201 Created
477 Content-Type: application/json
478
479 {
480 "reversalId": "12345678",
481 "amount": 1000.00,
482 "currency": "SEK",
Thomas Hedström 14.1 483 "sellerTransactionId": "123455679",
484 "receiptReference": "Example-receipt-Phone"
Thomas Hedström 2.1 485 }
486 {{/code}}
487
488
489 **Possible problems**
490
491 (% class="table-bordered table-striped" %)
492 |=Http status |=Problem type |=Description
Thomas Hedström 14.1 493 |409 |identifier-already-in-use |SellerTransactionId [xxxx] already exists. It is used in the capture transaction with ReversalId [yyyy]
Thomas Hedström 2.1 494 |400 |validation |occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation
495 |404 |not-found |the targeted resource was not found, cause could be both that it's not accessible with provided information/credentials or that the resource doesn't exist
496 |500 |fatal |an unexpected error has occurred
497
thomas hedstrom 21.1 498
Thomas Hedström 2.1 499 **Response object specification**
500
501 (% class="table-bordered table-striped" %)
502 |=Property |=Data type|=Format|=Description
503 |amount |number |Type: double
504 Max: 100000000
505 Min: 0 |The total amount to reverse
506 |currency |string |(((
507 * SEK
508 * NOK
509 * DKK
510 * EUR
thomas hedstrom 24.1 511 )))|
512 |sellerTransactionId |string |Pattern: ^[a-zA-Z0-9#_:@.\-åäöÅÄÖ]{1,}$ |The sellers unique identifier of the reversal
513 |receiptReference |string |Pattern: ^[a-zA-Z0-9#_:@.\-]{1,}$ |A receipt reference meaningful for the consumer
Thomas Hedström 2.1 514 |reversalId |string | |Identifier of the reversal
Mats Lyth 13.1 515 |@id |string | |Uri identifier of the current resource
thomas hedstrom 24.1 516
Thomas Hedström 2.1 517 == 5. Redirect ==
518
519
Mats Lyth 13.1 520 ==== 5.1 Create Redirect ====
Thomas Hedström 2.1 521
522 While payee is progressing the authorization implementor should start poll the parent resource BnplPaymentOrder for updates
523
524 {{code language="http" title="**Request**"}}
525 POST /ledger/bnpl-payment-order/v1/{ownerNo}/bnpl-payment-orders/{paymentOrderId}/redirect HTTP/1.1
526 Host: -
527 Authorization: Bearer<Token>
528 Content-Type: application/json
529
530 {
Mats Lyth 13.1 531 "returnUrl": "https://www.back-to-my-web-shop.com",
Thomas Hedström 2.1 532 "redirectOptions": {
533 "languageCode": "SV"
534 }
535 }
536 {{/code}}
537
538
539 **Request object specification**
540
541 (% class="table-bordered table-striped" %)
542 |=Property |=Data type|=Format|=Required|=Description
543 |returnUrl |string | |Yes |Url to return the end user to after process is completed or cancelled
Thomas Hedström 3.1 544 |=redirectOptions |object | |Yes |
Thomas Hedström 2.1 545 | languageCode |string |(((
546 * EN
547 * SV
548 * NO
549 * DA
thomas hedstrom 24.1 550 )))|Yes |
Thomas Hedström 2.1 551
552 Example response containing redirect info for the chosen payment method
553
554 {{code language="http" title="**Response**"}}
555 HTTP/1.1 200 OK
556 Content-Type: application/json
557
558 {
Mats Lyth 13.1 559 "redirectUrl": "https://www.open-chosen-payment-method-example.com"
Thomas Hedström 2.1 560 }
561 {{/code}}
562
563
564 **Possible problems**
565
566 (% class="table-bordered table-striped" %)
567 |=Http status |=Problem type |=Description
thomas hedstrom 21.1 568 |500 |fatal |an unexpected error has occurred
569 |404 |not-found |the targeted resource was not found, cause could be both that it's not accessible with provided information/credentials or that the resource doesn't exist
Thomas Hedström 2.1 570 |400 |validation |occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation
Mats Lyth 13.1 571 |409 |invalid-state |Invalid state of payment order for redirect
Thomas Hedström 2.1 572
thomas hedstrom 21.1 573
Thomas Hedström 2.1 574 **Response object specification**
575
576 (% class="table-bordered table-striped" %)
577 |=Property |=Data type|=Format|=Description
Mats Lyth 13.1 578 |redirectUrl |string | |Url to redirect the end user to
Thomas Hedström 2.1 579
580 {{display reference="developer:Main.Invoicing.ledger-api-general-docs.api-section-problems.WebHome"/}}