Wiki source code of accounttransaction

Last modified by thomas hedstrom on 2026/07/09 11:47
Show last authors
1 (% class="jumbotron" %)
2 (((
3
4
5 (% class="container" %)
6 (((
7 Integrate to **PayEx Account transaction API **
8 )))
9 )))
10
11
12 = Changelog =
13
14
15 2022-03-18
16 Added preAuthorizationStatus property on pre-authorization resource
17 Added hypermedia reference to reversal from capture response
18 Added hypermedia reference to split-authorization from pre-authorization response
19
20 2025-09-05
21 Added new value to PreAuthorizationStatus - Rejected (Estimated release 2025-09-23)
22 \\[[Swagger>>attach:Swagger_Releases-500654.txt]]
23
24
25 = Introduction =
26
27
28
29 (% class="lead" %) The account-transaction API is handle payment flows for split-payments and credit accounts for retail finance scenarios. The api contains redirect scenarios for account onboarding, upgrades and authentication.
30
31
32 == [[image:1780491723078-754.png||height="824" width="463"]] ==
33
34
35 == 1. Pre-authorizations ==
36
37
38 Gets already created pre authorization
39
40 ==== 1.1 Get specific Pre-authorization ====
41
42 {{code language="http" title="**Request**"}}
43 GET /ledger/account-transaction/v1/{ownerNo}/pre-authorizations/{preAuthorizationId} HTTP/1.1
44 Host: -
45 Authorization: Bearer<Token>
46 Content-Type: application/json
47
48 {{/code}}
49
50 Initiate new pre-authorization
51
52 {{code language="http" title="**Response**"}}
53 HTTP/1.1 200 OK
54 Content-Type: application/json
55
56 {
57 "preAuthorizationId": "8c535338-d92c-49e7-90bf-304dbf38e0bd",
58 "preAuthorizationStatus": "Initialized",
59 "customer": {
60 "nationalConsumerIdentifier": {
61 "value": "19101010-1010",
62 "countryCode": "SE"
63 },
64 "email": "abc@test.com",
65 "msisdn": "4670123456",
66 "customerNo": "456987"
67 },
68 "sellerNo": "123456",
69 "sellerReferenceId": "abc-87465123",
70 "profileName": "configured-profile-name",
71 "authorizationAmount": 100.50,
72 "currency": "SEK",
73 "pointOfSale": "Test shop",
74 "assessment": {
75 "assessmentUrl": "/score/sca/v1/{claimantNo}/assessments/{assessmentNo}",
76 "scaStatus": "Required"
77 },
78 "operations": [
79 {
80 "rel": "add-authorizations",
81 "method": "POST",
82 "href": "/ledger/account-transaction/v1/591/authorizations"
83 },
84 {
85 "rel": "add-split-authorizations",
86 "method": "POST",
87 "href": "/ledger/account-transaction/v1/591/split-authorizations"
88 },
89 {
90 "rel": "redirect",
91 "method": "POST",
92 "href": "/ledger/account-transaction/v1/xxx/pre-authorizations/8c535338-d92c-49e7-90bf-304dbf38e0bd/redirect"
93 }
94 ]
95 }
96 {{/code}}
97
98
99 ==== 1.2 Create Pre-authorization ====
100
101 Check if required conditions are met to begin a transaction. Creates an authentication resource that exposes operation link to redirect if user interaction is required. (Is there an existing account? Is the account's limit sufficient for the new transaction?)
102
103 {{code language="http" title="**Request**"}}
104 POST /ledger/account-transaction/v1/{ownerNo}/pre-authorizations HTTP/1.1
105 Host: -
106 Authorization: Bearer<Token>
107 Content-Type: application/json
108
109 {
110 "customer": {
111 "nationalConsumerIdentifier": {
112 "value": "19101010-1010",
113 "countryCode": "SE"
114 },
115 "email": "abc@test.com",
116 "msisdn": "4670123456",
117 "customerNo": "456987"
118 },
119 "sellerNo": "123456",
120 "sellerReferenceId": "abc-87465123",
121 "profileName": "configured-profile-name",
122 "authorizationAmount": 100.50,
123 "currency": "SEK",
124 "pointOfSale": "Test shop",
125 "assessment": {
126 "assessmentUrl": "/score/sca/v1/{claimantNo}/assessments/{assessmentNo}",
127 "scaStatus": "Required"
128 }
129 }
130 {{/code}}
131
132
133 **Request object specification**
134
135 (% class="table-bordered table-striped" %)
136 |=Property |=Data type|=Format|=Required|=Description
137 |=customer |object | |Yes |
138 |= nationalConsumerIdentifier |object | |Yes |
139 | value |string | |No |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
140 | countryCode |string |Pattern: SE~|NO~|DK~|FI |No |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]]
141 | email |string |Pattern: ^[^;\xA0\xD0\─@<>\p{Cc}]+@(?!\.)(?!.*\.\.)(?:[^;\xA0\xD0\─@<>\p{Cc}]+\.[^;\xA0\xD0\─@<>\p{Cc}]+~|\~[~[A-Fa-f\d\:]+\])(?<!\.)$ |No |The customers Email
142 | msisdn |string |Pattern: ^[+]{1}\d{4,14}$ |No |Mobile communications number starting with '+' followed with up to 14 numbers from 0-9. Length between 5 and 15 including the starting '+'
143 | customerNo |string | |No |The identifier of the customer. Normally required, exception is when the configuration on the ledger is set for the provider of this API to generate customer numbers, in that case CustomerNo must not be set in request
144 |sellerNo |string | |Yes |The seller identifier at the provider of the API
145 |sellerReferenceId |string |Pattern: ^[a-zA-Z0-9#_:@.\-åäöÅÄÖ]{1,}$ |Yes |Sellers reference id, usually the order id of the purchase / consistent for all captures/deliveries
146 |profileName |string | |Yes |The profile name of the pre configured account setup
147 |authorizationAmount |number |Type: double
148 Max: 100000000
149 Min: 0 |Yes |The original authorized amount, can't have more than 2 decimal places
150 |currency |string |(((
151 * SEK
152 * NOK
153 * DKK
154 * EUR
155 )))|Yes |
156 |pointOfSale |string |Pattern: ^[\u0020-\u003A \u003C-\u007E \u00A0-\u00FF \u2019]*$ |No |Trade name of the point of sale. Will be displayed to end customer. Only use if agreed with provider of the API
157 |=assessment |object | |No |
158 | assessmentUrl |string |Pattern: ^/score/sca/v\d{1,10}/\w{0,15}[0-9aA-zZ]/assessments/\d+$ |Yes |
159 | scaStatus |string |(((
160 * Required
161 * NotRequired
162 )))|Yes |
163 |=callbackOptions |object | |No |
164 | url |string | |No |Absolute url, only supports GET
165 |specialIntent |string | |No |Additional instructions, possible values: [use-trusted-seller-group-consent] Only use if agreed with provider of the API
166
167 Initiate new pre-authorization. Evaluates and decides what needs to be ready for the requested authorize flow
168
169 {{code language="http" title="**Response**"}}
170 HTTP/1.1 201 Created
171 Content-Type: application/json
172
173 {
174 "preAuthorizationId": "8c535338d92c49e790bf304dbf38e0bd",
175 "preAuthorizationStatus": "Initialized",
176 "customer": {
177 "nationalConsumerIdentifier": {
178 "value": "19101010-1010",
179 "countryCode": "SE"
180 },
181 "email": "abc@test.com",
182 "msisdn": "4670123456",
183 "customerNo": "456987"
184 },
185 "sellerNo": "123456",
186 "sellerReferenceId": "abc-87465123",
187 "profileName": "configured-profile-name",
188 "authorizationAmount": 100.50,
189 "currency": "SEK",
190 "pointOfSale": "Test shop",
191 "assessment": {
192 "assessmentUrl": "/score/sca/v1/{claimantNo}/assessments/{assessmentNo}",
193 "scaStatus": "Required"
194 },
195 "@id": "/ledger/account-transaction/v1/xxx/pre-authorizations/8c535338d92c49e790bf304dbf38e0bd",
196 "operations": [
197 {
198 "rel": "add-authorizations",
199 "method": "POST",
200 "href": "/ledger/account-transaction/v1/591/authorizations"
201 },
202 {
203 "rel": "add-split-authorizations",
204 "method": "POST",
205 "href": "/ledger/account-transaction/v1/591/split-authorizations"
206 },
207 {
208 "rel": "redirect",
209 "method": "POST",
210 "href": "/ledger/account-transaction/v1/xxx/pre-authorizations/8c535338d92c49e790bf304dbf38e0bd/redirect"
211 }
212 ]
213 }
214 {{/code}}
215
216
217 **Possible problems**
218
219 (% class="table-bordered table-striped" %)
220 |=Http status |=Problem type |=Description
221 |400 |validation |occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation
222 |409 |account-limit-too-low |Occurs if the credit limit on the account is too low, raise the limit before making the call
223 |409 |account-missing |No Account found for provided profile name and customer, need to create an account before calling
224 |409 |conflict |May find more information in details
225 |409 |unsupported-claim-level |Account unable to accept new transactions
226 |409 |not-valid-for-special-intent |Provided SpecialIntent was not valid for this request
227 |409 |unable-to-use-trusted-consent |Customer or Account is in a invalid state for the use of trusted seller group consent
228 |422 |unprocessable |May find more information in details
229 |500 |fatal |Unexpected error, logs may give details about the problem
230
231
232 **Response object specification**
233
234 (% class="table-bordered table-striped" %)
235 |=Property |=Data type|=Format|=Description
236 |=customer |object | |
237 |= nationalConsumerIdentifier |object | |
238 | 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
239 | 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]]
240 | email |string |Pattern: ^[^;\xA0\xD0\─@<>\p{Cc}]+@(?!\.)(?!.*\.\.)(?:[^;\xA0\xD0\─@<>\p{Cc}]+\.[^;\xA0\xD0\─@<>\p{Cc}]+~|\~[~[A-Fa-f\d\:]+\])(?<!\.)$ |The customers Email
241 | msisdn |string |Pattern: ^[+]{1}\d{4,14}$ |Mobile communications number starting with '+' followed with up to 14 numbers from 0-9. Length between 5 and 15 including the starting '+'
242 | customerNo |string | |The identifier of the customer. Normally required, exception is when the configuration on the ledger is set for the provider of this API to generate customer numbers, in that case CustomerNo must not be set in request
243 |sellerNo |string | |The seller identifier at the provider of the API
244 |sellerReferenceId |string |Pattern: ^[a-zA-Z0-9#_:@.\-åäöÅÄÖ]{1,}$ |Sellers reference id, usually the order id of the purchase / consistent for all captures/deliveries
245 |profileName |string | |The profile name of the pre configured account setup
246 |authorizationAmount |number |Type: double
247 Max: 100000000
248 Min: 0 |The original authorized amount, can't have more than 2 decimal places
249 |currency |string |(((
250 * SEK
251 * NOK
252 * DKK
253 * EUR
254 )))|
255 |pointOfSale |string |Pattern: ^[\u0020-\u003A \u003C-\u007E \u00A0-\u00FF \u2019]*$ |Trade name of the point of sale. Will be displayed to end customer. Only use if agreed with provider of the API
256 |=assessment |object | |
257 | assessmentUrl |string |Pattern: ^/score/sca/v\d{1,10}/\w{0,15}[0-9aA-zZ]/assessments/\d+$ |
258 | scaStatus |string |(((
259 * Required
260 * NotRequired
261 )))|
262 |=callbackOptions |object | |
263 | url |string | |Absolute url, only supports GET
264 |specialIntent |string | |Additional instructions, possible values: [use-trusted-seller-group-consent] Only use if agreed with provider of the API
265 |preAuthorizationId |string | |Unique identifier of the pre-authorization, generated by the API
266 |preAuthorizationStatus |string |(((
267 * Initialized
268 * Failed
269 * ReadyForAuthorization
270 * Completed
271 * Rejected
272 )))|
273 |failReasonCode |string | |May contain a short descriptive code to expand on why PreAuthorization was unsuccessful
274 |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]]
275 |@id |string | |Uri identifier of the current resource
276
277 == 2. Redirect ==
278
279
280 ==== 2.1 Create Redirect ====
281
282 Initiates redirect authentication flow, generates redirect url and accepts return url after redirect process finishes. The operation is exposed by the parent authentication if required.
283
284 {{code language="http" title="**Request**"}}
285 POST /ledger/account-transaction/v1/{ownerNo}/pre-authorizations/{preAuthorizationId}/redirect HTTP/1.1
286 Host: -
287 Authorization: Bearer<Token>
288 Content-Type: application/json
289
290 {
291 "returnUrl": "https://apiconsumerexample.se/transactioncallbackexample",
292 "redirectOptions": {
293 "nativeAppSwitchingUrl": "myapp://{ledgerNo}example",
294 "autostartAction": "MhVrFOAClUaJUx6QqnLgCw",
295 "languageCode": "Sv"
296 }
297 }
298 {{/code}}
299
300
301 **Request object specification**
302
303 (% class="table-bordered table-striped" %)
304 |=Property |=Data type|=Format|=Required|=Description
305 |returnUrl |string | |Yes |Url to return the end user to after process is completed. Query parameter 'branding' is conditional
306 |=redirectOptions |object | |Yes |
307 | nativeAppSwitchingUrl |string | |No |Uri pointing to app, used to switch back to app from bankId
308 | autostartAction |string | |No |Used to automatically start bankId application. Possible actions (null~|se-bankid-this-device)
309 | languageCode |string | |Yes |Used to set desired language in the authenticate/onboarding web. Possible languageCodes (SV~|EN~|NO~|DA)
310
311 Setup the redirect for both the sign/identification page and where to be redirect after
312
313 {{code language="http" title="**Response**"}}
314 HTTP/1.1 201 Created
315 Content-Type: application/json
316
317 {
318 "redirectUrl": "/ledger/public-account-transaction/v1/{ledgerNo}/8c535338-d92c-49e7-90bf-304dbf38e0bd?token=JWT12345"
319 }
320 {{/code}}
321
322
323 **Possible problems**
324
325 (% class="table-bordered table-striped" %)
326 |=Http status |=Problem type |=Description
327 |400 |validation |occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation
328 |404 |not-found |Resource missing, may have been created on different ledger or have expired
329 |409 |invalid-state |PreAuthorizationStatus for targeted resource is invalid for this method
330 |500 |fatal |Unexpected error, logs may give details about the problem
331
332
333 **Response object specification**
334
335 (% class="table-bordered table-striped" %)
336 |=Property |=Data type|=Format|=Description
337 |@id |string | |Uri identifier of the current resource
338 |redirectUrl |string | |
339
340 == 3. Authorization-capture-orders ==
341
342
343 Get an existing authorization-capture-orders. The authorization-capture-orders, is used when adding transactions to users account when user is pre identified.
344
345 ==== 3.1 Get specific Authorization-capture-order ====
346
347 {{code language="http" title="**Request**"}}
348 GET /ledger/account-transaction/v1/{ownerNo}/authorization-capture-orders/{captureId} HTTP/1.1
349 Host: -
350 Authorization: Bearer<Token>
351 Content-Type: application/json
352
353 {{/code}}
354
355 ===== Success Example =====
356
357 Response for a successful authorization and capture
358
359 {{code language="http" title="**Response**"}}
360 HTTP/1.1 200 OK
361 Content-Type: application/json
362
363 {
364 "status": "processed",
365 "callbackBody": {
366 "success": {
367 "authorization": "/ledger/account-transaction/v1/XXX/authorizations/{authorizationId}"
368 }
369 },
370 "captureId": "123456",
371 "authorizationId": 123456789,
372 "accountNo": "1234",
373 "callbackUrl": "https://my.com/callback?543245892u59",
374 "sellerReferenceId": "abc-87465123",
375 "sellerTransactionId": "654789312",
376 "authenticationMethod": "2FA",
377 "currency": "SEK",
378 "amount": 50.00,
379 "pointOfSale": "Test shop",
380 "operations": []
381 }
382 {{/code}}
383
384 ===== Error Example =====
385
386 Response for a unsuccessful authorization or capture
387
388 {{code language="http" title="**Response**"}}
389 HTTP/1.1 200 OK
390 Content-Type: application/json
391
392 {
393 "status": "processed",
394 "callbackBody": {
395 "fail": {
396 "type": "ledger/account-transaction/v1/problems/validation",
397 "title": "Not found",
398 "status": 404,
399 "detail": "A validation error occurred. Please fix the problems mentioned in the problems property below.",
400 "instance": "215d4206-ca35-4f43-85ad-169c8f6d4ec1"
401 }
402 },
403 "captureId": "123456",
404 "authorizationId": 123456789,
405 "accountNo": "1234",
406 "callbackUrl": "https://my.com/callback?543245892u59",
407 "sellerReferenceId": "abc-87465123",
408 "sellerTransactionId": "654789312",
409 "authenticationMethod": "2FA",
410 "currency": "SEK",
411 "amount": 50.000,
412 "pointOfSale": "Test shop",
413 "operations": []
414 }
415 {{/code}}
416
417
418 ==== 3.2 Create Authorization-capture-order ====
419
420 Create authorization-capture-orders is used to add transaction when user is pre identified.
421
422 {{code language="http" title="**Request**"}}
423 POST /ledger/account-transaction/v1/{ownerNo}/authorization-capture-orders HTTP/1.1
424 Host: -
425 Authorization: Bearer<Token>
426 Content-Type: application/json
427
428 {
429 "captureId": "123456",
430 "authorizationId": 123456789,
431 "accountNo": "1234",
432 "callbackUrl": "https://my.com/callback?543245892u59",
433 "sellerTransactionId": "654789312",
434 "authenticationMethod": "2FA",
435 "currency": "SEK",
436 "amount": 50.00,
437 "pointOfSale": "Test shop"
438 }
439 {{/code}}
440
441
442 **Request object specification**
443
444 (% class="table-bordered table-striped" %)
445 |=Property |=Data type|=Format|=Required|=Description
446 |captureId |string |Pattern: ^[a-zA-Z0-9#_:@.\-åäöÅÄÖ]{1,}$ |Yes |Identifier of the capture, must be unique for all types of captures within the ledger
447 |authorizationId |number |Type: int64 |Yes |Identifier of the authorization, must be unique for all types of authorizations within the ledger
448 |accountNo |string | |Yes |The identifier of the account
449 |callbackUrl |string | |No |If callback should be done on status change, it is done to the callback url. If empty no callback is done.
450 |sellerNo |string | |Yes |The seller identifier at payex
451 |sellerReferenceId |string |Pattern: ^[a-zA-Z0-9#_:@.\-åäöÅÄÖ]{1,}$ |Yes |Sellers reference id, usually the order id of the purchase / consistent for all captures/deliveries.
452 |sellerTransactionId |string |Pattern: ^[a-zA-Z0-9#_:@.\-åäöÅÄÖ]{1,}$ |Yes |The sellers identifier of the capture/transaction, usually the receipt reference
453 |authenticationMethod |string | |Yes |Authentication method used to identify the user. Possible values 1FA (one factor),2FA (two factor) ,3FA (three factor)
454 |currency |string |(((
455 * SEK
456 * NOK
457 * DKK
458 * EUR
459 )))|Yes |
460 |amount |number |Type: double
461 Max: 100000000
462 Min: 0 |Yes |The amount of the authorization capture order, can't have more than 2 decimal places.
463 |pointOfSale |string | |No |Trade name of the point of sale. Will be displayed to end customer. Only use if agreed with provider of the API.
464
465 {{code language="http" title="**Response**"}}
466 HTTP/1.1 201 Created
467 Content-Type: application/json
468
469 {
470 "status": "pending",
471 "captureId": "123456",
472 "authorizationId": 123456789,
473 "accountNo": "1234",
474 "callbackUrl": "https://my.com/callback?543245892u59",
475 "sellerTransactionId": "654789312",
476 "authenticationMethod": "2FA",
477 "currency": "SEK",
478 "amount": 50.00,
479 "pointOfSale": "Test shop",
480 "@id": "/ledger/account-transaction/v1/xxx/authorization-capture-orders/123456",
481 "operations": []
482 }
483 {{/code}}
484
485
486 **Response object specification**
487
488 (% class="table-bordered table-striped" %)
489 |=Property |=Data type|=Format|=Description
490 |@id |string | |Uri identifier of the current resource
491 |captureId |string |Pattern: ^[a-zA-Z0-9#_:@.\-åäöÅÄÖ]{1,}$ |Identifier of the capture, must be unique for all types of captures within the ledger
492 |authorizationId |number |Type: int64 |Identifier of the authorization, must be unique for all types of authorizations within the ledger
493 |accountNo |string | |The identifier of the account
494 |callbackUrl |string | |If callback should be done on status change, it is done to the callback url. If empty no callback is done.
495 |sellerNo |string | |The seller identifier at payex
496 |sellerReferenceId |string |Pattern: ^[a-zA-Z0-9#_:@.\-åäöÅÄÖ]{1,}$ |Sellers reference id, usually the order id of the purchase / consistent for all captures/deliveries.
497 |sellerTransactionId |string |Pattern: ^[a-zA-Z0-9#_:@.\-åäöÅÄÖ]{1,}$ |The sellers identifier of the capture/transaction, usually the receipt reference
498 |authenticationMethod |string | |Authentication method used to identify the user. Possible values 1FA (one factor),2FA (two factor) ,3FA (three factor)
499 |currency |string |(((
500 * SEK
501 * NOK
502 * DKK
503 * EUR
504 )))|
505 |amount |number |Type: double
506 Max: 100000000
507 Min: 0 |The amount of the authorization capture order, can't have more than 2 decimal places.
508 |pointOfSale |string | |Trade name of the point of sale. Will be displayed to end customer. Only use if agreed with provider of the API.
509 |status |string |(((
510 * pending
511 * processed
512 )))|
513 |=callbackBody |object | |
514 |= success |object | |
515 | authorization |string | |Uri to the created authorizarion.
516 | fail |dynamic | |Problem definition of the authorization capture transaction. See problem section.
517 |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]]
518
519 == 4. Authorizations ==
520
521
522 Get an existing authorization.
523
524 ==== 4.1 Get specific Authorization ====
525
526 {{code language="http" title="**Request**"}}
527 GET /ledger/account-transaction/v1/{ownerNo}/authorizations/{authorizationId} HTTP/1.1
528 Host: -
529 Authorization: Bearer<Token>
530 Content-Type: application/json
531
532 {{/code}}
533
534 Get authorization
535
536 {{code language="http" title="**Response**"}}
537 HTTP/1.1 200 OK
538 Content-Type: application/json
539
540 {
541 "authorizationId": 456789,
542 "sellerNo": "654321",
543 "validToDate": "2026-07-09",
544 "authorizationAmount": 3600.00,
545 "remainingAmount": 3600.00,
546 "currency": "SEK",
547 "status": "Open",
548 "operations": [
549 {
550 "rel": "add-reversal",
551 "method": "POST",
552 "href": "/ledger/account-transaction/v1/xxx/authorizations/456789/reversals"
553 },
554 {
555 "rel": "add-capture",
556 "method": "POST",
557 "href": "/ledger/account-transaction/v1/xxx/authorizations/456789/captures"
558 },
559 {
560 "rel": "add-cancellation",
561 "method": "POST",
562 "href": "/ledger/account-transaction/v1/xxx/authorizations/456789/cancellations"
563 }
564 ]
565 }
566 {{/code}}
567
568
569
570 **Possible problems**
571
572 (% class="table-bordered table-striped" %)
573 |=Http status |=Problem type |=Description
574 |404 |not-found |Found no authorization for provided id on this ledger
575 |409 |invalid-account-usage |Provided PreAuthorization is invalid for this kind of authorization
576 |409 |unsupported-claim-level |Account unable to accept new transactions
577 |500 |fatal |Unexpected error, logs may give details about the problem
578
579 ==== 4.2 Create Authorization ====
580
581 Create authorization to see if the account will accept the transaction. When accepted reserves the amount to on the underlying account (may include credit check) and creates the authorization instance. The reservation is time limited, captures will only be excepted until the reservation times out.
582
583 {{code language="http" title="**Request**"}}
584 POST /ledger/account-transaction/v1/{ownerNo}/authorizations HTTP/1.1
585 Host: -
586 Authorization: Bearer<Token>
587 Content-Type: application/json
588
589 {
590 "preAuthorizationId": "8c535338-d92c-49e7-90bf-304dbf38e0bd",
591 "authorizationId": 456789
592 }
593 {{/code}}
594
595
596 **Request object specification**
597
598 (% class="table-bordered table-striped" %)
599 |=Property |=Data type|=Format|=Required|=Description
600 |preAuthorizationId |string | |Yes |Identifier of the existing pre-authorization
601 |authorizationId |number |Type: int64
602 Min: 1 |Yes |Identifier of the authorization, must be unique for all types of authorizations within the ledger
603
604 Create authorization
605
606 {{code language="http" title="**Response**"}}
607 HTTP/1.1 201 Created
608 Content-Type: application/json
609
610 {
611 "authorizationId": 456789,
612 "sellerNo": "654321",
613 "validToDate": "2026-07-09",
614 "authorizationAmount": 3600.00,
615 "remainingAmount": 3600.00,
616 "currency": "SEK",
617 "status": "Open",
618 "@id": "/ledger/account-transaction/v1/xxx/authorizations/456789",
619 "operations": [
620 {
621 "rel": "add-reversal",
622 "method": "POST",
623 "href": "/ledger/account-transaction/v1/xxx/authorizations/456789/reversals"
624 },
625 {
626 "rel": "add-capture",
627 "method": "POST",
628 "href": "/ledger/account-transaction/v1/xxx/authorizations/456789/captures"
629 },
630 {
631 "rel": "add-cancellation",
632 "method": "POST",
633 "href": "/ledger/account-transaction/v1/xxx/authorizations/456789/cancellations"
634 }
635 ]
636 }
637 {{/code}}
638
639
640 **Possible problems**
641
642 (% class="table-bordered table-striped" %)
643 |=Http status |=Problem type |=Description
644 |400 |validation |occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation
645 |409 |credit-check-rejected |Credit check or extend of credit check was rejected
646 |409 |missing-pre-authorization |Resource missing, may have been created on different ledger or have expired
647 |409 |invalid-account-usage |Provided PreAuthorization is invalid for this kind of authorization
648 |409 |amount-exceeds-limit |Amount in PreAuthorization is no longer valid for this authorization
649 |409 |invalid-state |Provided PreAuthorization resource is in a invalid state for this method
650 |409 |identifier-already-in-use |AuthorizationId given is already used, provide a new one and try again
651 |409 |invalid-account-status-exception |Unsupported account status
652 |500 |fatal |Unexpected error, logs may give details about the problem
653
654
655 **Response object specification**
656
657 (% class="table-bordered table-striped" %)
658 |=Property |=Data type|=Format|=Description
659 |@id |string | |Uri identifier of the current resource
660 |authorizationId |number |Type: int64 |Identifier of the authorization, must be unique for all types of authorizations within the ledger
661 |sellerNo |string | |The seller identifier at payex
662 |validToDate |string | |The authorization is valid for captures until this date. Format 'YYYY-MM-DD'
663 |authorizationAmount |number |Type: double
664 Max: 100000000
665 Min: 0 |The original authorized amount
666 |remainingAmount |number |Type: double |The remaining amount on the authorization available for capture
667 |currency |string |(((
668 * SEK
669 * NOK
670 * DKK
671 * EUR
672 )))|
673 |status |string |(((
674 * Open
675 * Closed
676 * Cancelled
677 )))|
678 |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]]
679
680 == 5. Captures ==
681
682
683 ==== 5.1 Create Capture ====
684
685 Captures part of (or complete) the authorization, includes options for part payment
686
687 {{code language="http" title="**Request**"}}
688 POST /ledger/account-transaction/v1/{ownerNo}/authorizations/{authorizationId}/captures HTTP/1.1
689 Host: -
690 Authorization: Bearer<Token>
691 Content-Type: application/json
692
693 {
694 "captureId": "123456",
695 "sellerTransactionId": "654789312",
696 "currency": "SEK",
697 "amount": 3600.00,
698 "receiptReference": "Meaningful_Reference"
699 }
700 {{/code}}
701
702
703 **Request object specification**
704
705 (% class="table-bordered table-striped" %)
706 |=Property |=Data type|=Format|=Required|=Description
707 |captureId |string |Pattern: ^[a-zA-Z0-9\-]{1,}$ |Yes |Identifier of the capture, must be unique for all types of captures within the ledger
708 |sellerTransactionId |string |Pattern: ^[a-zA-Z0-9#_:@.\-åäöÅÄÖ]{1,}$ |Yes |The sellers identifier of the capture/transaction, usually the receipt reference
709 |currency |string |(((
710 * SEK
711 * NOK
712 * DKK
713 * EUR
714 )))|Yes |
715 |amount |number |Type: double
716 Max: 100000000
717 Min: 0 |Yes |The total amount.
718 |receiptReference |string |Pattern: ^[a-zA-Z0-9#_:@.\-]{1,}$ |No |A receipt reference meaningful for the consumer.
719
720 Capture created
721
722 {{code language="http" title="**Response**"}}
723 HTTP/1.1 201 Created
724 Content-Type: application/json
725
726 {
727 "captureId": "123456",
728 "operations": []
729 }
730 {{/code}}
731
732
733 **Possible problems**
734
735 (% class="table-bordered table-striped" %)
736 |=Http status |=Problem type |=Description
737 |404 |not-found |Resource missing, may have been created on different ledger or have expired
738 |400 |validation |Validation error, response should describe the problem/s
739 |409 |currency-not-supported |Provided Currency does not match the authorization currency
740 |409 |invalid-amount |Provided Capture Amount is invalid, likely larger than remaining authorized amount
741 |409 |identifier-already-in-use |Provided Identifier is already in use, probably CaptureTransactionId is not unique
742 |409 |invalid-account-usage |Provided Authorization is invalid for this kind of capture
743 |409 |authorization-expired |Provided Authorization is not open or has already expired
744 |409 |unsupported-claim-level |Account unable to accept new transactions
745 |500 |fatal |Unexpected error, logs may give details about the problem
746
747
748 **Response object specification**
749
750 (% class="table-bordered table-striped" %)
751 |=Property |=Data type|=Format|=Description
752 |@id |string | |Uri identifier of the current resource
753 |captureId |string | |Identifier of the capture, must be unique for all types of captures within the ledger
754 |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]]
755
756 == 6. Reversals ==
757
758
759 ==== 6.1 Create Reversal ====
760
761 For reversing a specific capture
762
763 {{code language="http" title="**Request**"}}
764 POST /ledger/account-transaction/v1/{ownerNo}/authorizations/{authorizationId}/reversals HTTP/1.1
765 Host: -
766 Authorization: Bearer<Token>
767 Content-Type: application/json
768
769 {
770 "reversalId": "654321",
771 "currency": "SEK",
772 "amount": 512.00,
773 "sellerTransactionId": "753159"
774 }
775 {{/code}}
776
777
778 **Request object specification**
779
780 (% class="table-bordered table-striped" %)
781 |=Property |=Data type|=Format|=Required|=Description
782 |reversalId |string |Pattern: ^[a-zA-Z0-9#_:@.\-åäöÅÄÖ]{1,}$ |Yes |Identifier of the reversal, must be unique for all types of captures within the ledger
783 |currency |string |(((
784 * SEK
785 * NOK
786 * DKK
787 * EUR
788 )))|Yes |
789 |amount |number |Type: double
790 Max: 100000000
791 Min: 0 |Yes |Amount to reverse
792 |receiptReference |string |Pattern: ^[a-zA-Z0-9#_:@.\-]{1,}$ |No |A receipt reference meaningful for the consumer.
793 |sellerTransactionId |string |Pattern: ^[a-zA-Z0-9#_:@.\-åäöÅÄÖ]{1,}$ |Yes |The sellers identifier of the reversal transaction, usually the receipt reference
794
795 {{code language="http" title="**Response**"}}
796 HTTP/1.1 201 CREATED
797 Content-Type: application/json
798
799 {
800 }
801 {{/code}}
802
803
804 **Possible problems**
805
806 (% class="table-bordered table-striped" %)
807 |=Http status |=Problem type |=Description
808 |404 |not-found |Resource missing, may have been created on different ledger or have expired
809 |400 |validation |Validation error, response should describe the problem/s
810 |409 |currency-not-supported |Provided Currency does not match the authorization currency
811 |409 |invalid-amount |Provided Reversal Amount is invalid, likely larger than remaining captured amount
812 |409 |identifier-already-in-use |Provided Identifier is already in use, probably ReversalTransactionId is not unique
813 |409 |invalid-account-usage |Provided Authorization is invalid for this kind of reversal
814 |409 |invalid-account-relation |Provided information relates to different accounts
815 |409 |invalid-account-status-exception |Unsupported account status
816 |500 |fatal |Unexpected error, logs may give details about the problem
817
818 == 7. Cancellations ==
819
820
821 ==== 7.1 Create Cancellation ====
822
823 This operation will cancel the specified authorization
824
825 {{code language="http" title="**Request**"}}
826 POST /ledger/account-transaction/v1/{ownerNo}/authorizations/{authorizationId}/cancellations HTTP/1.1
827 Host: -
828 Authorization: Bearer<Token>
829 Content-Type: application/json
830
831 {
832 }
833 {{/code}}
834
835
836
837 {{code language="http" title="**Response**"}}
838 HTTP/1.1 204 NO CONTENT
839 Content-Type: application/json
840
841 {}
842 {{/code}}
843
844
845 **Possible problems**
846
847 (% class="table-bordered table-striped" %)
848 |=Http status |=Problem type |=Description
849 |404 |missing-pre-authorization |Resource missing, may have been created on different ledger or have expired
850 |409 |invalid-account-usage |Provided Authorization is invalid for this kind of authorization
851 |409 |authorization-expired |Provided Authorization is not open or has already expired
852 |500 |fatal |Unexpected error, logs may give details about the problem
853
854 == 8. Split-authorizations ==
855
856
857 Get an existing split-authorization. The split - authorization, is used when each product has a separate part payment that should be portioned out according to instruction.
858
859 ==== 8.1 Get specific Split-authorization ====
860
861 {{code language="http" title="**Request**"}}
862 GET /ledger/account-transaction/v1/{ownerNo}/split-authorizations/{authorizationId} HTTP/1.1
863 Host: -
864 Authorization: Bearer<Token>
865 Content-Type: application/json
866
867 {{/code}}
868
869 Get Split authorization resource. Operations can vary based of state of resource
870
871 {{code language="http" title="**Response**"}}
872 HTTP/1.1 200 OK
873 Content-Type: application/json
874
875 {
876 "authorizationId": 456789,
877 "sellerNo": "654321",
878 "validToDate": "2026-07-16",
879 "authorizationAmount": 3600.00,
880 "remainingAmount": 3600.00,
881 "currency": "SEK",
882 "status": "Open",
883 "operations": [
884 {
885 "rel": "add-capture",
886 "method": "POST",
887 "href": "/ledger/account-transaction/v1/xxx/split-authorizations/456789/captures"
888 },
889 {
890 "rel": "add-cancellation",
891 "method": "POST",
892 "href": "/ledger/account-transaction/v1/xxx/split-authorizations/456789/cancellations"
893 }
894 ]
895 }
896 {{/code}}
897
898
899
900 **Possible problems**
901
902 (% class="table-bordered table-striped" %)
903 |=Http status |=Problem type |=Description
904 |404 |not-found |Found no authorization for provided id on this ledger
905 |500 |fatal |Unexpected error, logs may give details about the problem
906
907 ==== 8.2 Create Split-authorization ====
908
909 Create split-authorization to see if the account will accept the transaction. When accepted reserves the amount to on the underlying account (may include credit check) and creates the authorization instance. The reservation is time limited, captures will only be excepted until the reservation times out. The 'split' authorization, is used when each product has a separate part payment that should be portioned out according to instruction.
910
911 {{code language="http" title="**Request**"}}
912 POST /ledger/account-transaction/v1/{ownerNo}/split-authorizations HTTP/1.1
913 Host: -
914 Authorization: Bearer<Token>
915 Content-Type: application/json
916
917 {
918 "preAuthorizationId": "8c535338-d92c-49e7-90bf-304dbf38e0bd",
919 "authorizationId": 456789
920 }
921 {{/code}}
922
923
924 **Request object specification**
925
926 (% class="table-bordered table-striped" %)
927 |=Property |=Data type|=Format|=Required|=Description
928 |preAuthorizationId |string | |Yes |Identifier of the existing pre-authorization
929 |authorizationId |number |Type: int64 |Yes |Identifier of the authorization, must be unique for all types of authorizations within the ledger
930
931 Create Split authorization
932
933 {{code language="http" title="**Response**"}}
934 HTTP/1.1 201 Created
935 Content-Type: application/json
936
937 {
938 "authorizationId": 456789,
939 "sellerNo": "654321",
940 "validToDate": "2026-07-16",
941 "authorizationAmount": 3600.00,
942 "remainingAmount": 3600.00,
943 "currency": "SEK",
944 "status": "Open",
945 "@id": "/ledger/account-transaction/v1/xxx/split-authorizations/456789",
946 "operations": [
947 {
948 "rel": "add-capture",
949 "method": "POST",
950 "href": "/ledger/account-transaction/v1/xxx/split-authorizations/456789/captures"
951 },
952 {
953 "rel": "add-cancellation",
954 "method": "POST",
955 "href": "/ledger/account-transaction/v1/xxx/split-authorizations/456789/cancellations"
956 }
957 ]
958 }
959 {{/code}}
960
961
962 **Possible problems**
963
964 (% class="table-bordered table-striped" %)
965 |=Http status |=Problem type |=Description
966 |400 |validation |occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation
967 |409 |credit-check-rejected |Credit check or extend of credit check was rejected
968 |409 |missing-pre-authorization |Resource missing, may have been created on different ledger or have expired
969 |409 |invalid-account-usage |Provided PreAuthorization is invalid for this kind of authorization
970 |409 |invalid-state |Provided PreAuthorization resource is in a invalid state for this method
971 |409 |identifier-already-in-use |AuthorizationId given is already used, provide a new one and try again
972 |500 |fatal |Unexpected error, logs may give details about the problem
973
974
975 **Response object specification**
976
977 (% class="table-bordered table-striped" %)
978 |=Property |=Data type|=Format|=Description
979 |@id |string | |Uri identifier of the current resource
980 |authorizationId |number |Type: int64
981 Min: 1 |Identifier of the authorization, must be unique for all types of authorizations within the ledger
982 |sellerNo |string | |The seller identifier at payex
983 |validToDate |string | |The split-authorization is valid for captures until this date. Format 'YYYY-MM-DD'
984 |authorizationAmount |number |Type: double |The original authorized amount
985 |remainingAmount |number |Type: double |The remaining amount on the split-authorization available for capture
986 |currency |string |(((
987 * SEK
988 * NOK
989 * DKK
990 * EUR
991 )))|
992 |status |string |(((
993 * Open
994 * Closed
995 * Cancelled
996 )))|
997 |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]]
998
999 == 9. Captures ==
1000
1001
1002 ==== 9.1 Create Capture ====
1003
1004 Captures part of (or complete) the split-authorization, includes options for part payment
1005
1006 {{code language="http" title="**Request**"}}
1007 POST /ledger/account-transaction/v1/{ownerNo}/split-authorizations/{authorizationId}/captures HTTP/1.1
1008 Host: -
1009 Authorization: Bearer<Token>
1010 Content-Type: application/json
1011
1012 {
1013 "captureId": "123456",
1014 "sellerTransactionId": "654789312",
1015 "currency": "SEK",
1016 "monthlyBillingAmount": 300,
1017 "months": 12,
1018 "totalAmount": 3600.00,
1019 "productName": "Purchase ref: 233445"
1020 }
1021 {{/code}}
1022
1023
1024 **Request object specification**
1025
1026 (% class="table-bordered table-striped" %)
1027 |=Property |=Data type|=Format|=Required|=Description
1028 |captureId |string |Pattern: ^[a-zA-Z0-9\-]{1,}$ |Yes |Identifier of the capture, must be unique for all types of captures within the ledger
1029 |sellerTransactionId |string |Pattern: ^[a-zA-Z0-9#_:@.\-åäöÅÄÖ]{1,}$ |Yes |The sellers identifier of the capture/transaction, usually the receipt reference
1030 |currency |string |(((
1031 * SEK
1032 * NOK
1033 * DKK
1034 * EUR
1035 )))|Yes |
1036 |monthlyBillingAmount |number |Type: double
1037 Max: 100000000
1038 Min: 10 |Yes |The amount the customer should be billed each month for this product, [MonthlyBilledAmount] x [Months] must be equal to or greater than [TotalAmount]. [TotalAmount] divided by [MonthlyBilledAmount] must be in the range between [Months]-1 and [Months]
1039 |months |number |Type: int32
1040 Pattern: ^(1~|6~|12~|24~|36)$ |Yes |Number of monthly payments the [TotalAmount] should be split into
1041 |totalAmount |number |Type: double
1042 Max: 100000000
1043 Min: 10 |Yes |The total amount/cost of the product, must be evenly dividable with part payment terms in the account offer
1044 |productName |string | |Yes |Readable name of the purchase. Presented on the bill to the buyer
1045
1046 Capture created
1047
1048 {{code language="http" title="**Response**"}}
1049 HTTP/1.1 201 Created
1050 Content-Type: application/json
1051
1052 {
1053 "captureId": "123456",
1054 "operations": [
1055 {
1056 "rel": "add-reversal",
1057 "method": "POST",
1058 "href": "/ledger/account-transaction/v1/xxx/split-authorizations/123/captures/123456/reversals"
1059 }
1060 ]
1061 }
1062 {{/code}}
1063
1064
1065 **Possible problems**
1066
1067 (% class="table-bordered table-striped" %)
1068 |=Http status |=Problem type |=Description
1069 |400 |validation |occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation
1070 |404 |not-found |Found no authorization for provided id on this ledger
1071 |409 |authorization-expired |ValidToDate on this authorize has expired, see details for more information
1072 |409 |invalid-amount |See details to get more information about the error
1073 |409 |currency-not-supported |Currency not valid for this Capture, see details for more information
1074 |409 |identifier-already-in-use |CaptureId given is already used, provide a new one and try again
1075 |500 |fatal |Unexpected error, logs may give details about the problem
1076
1077
1078 **Response object specification**
1079
1080 (% class="table-bordered table-striped" %)
1081 |=Property |=Data type|=Format|=Description
1082 |@id |string | |Uri identifier of the current resource
1083 |captureId |string | |Identifier of the capture, must be unique for all types of captures within the ledger
1084 |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]]
1085
1086 == 10. Cancellations ==
1087
1088
1089 ==== 10.1 Create Cancellation ====
1090
1091 This operation will cancel the specified split-authorization
1092
1093 {{code language="http" title="**Request**"}}
1094 POST /ledger/account-transaction/v1/{ownerNo}/split-authorizations/{authorizationId}/cancellations HTTP/1.1
1095 Host: -
1096 Authorization: Bearer<Token>
1097 Content-Type: application/json
1098
1099 {
1100 }
1101 {{/code}}
1102
1103
1104
1105 {{code language="http" title="**Response**"}}
1106 HTTP/1.1 204 NO CONTENT
1107 Content-Type: application/json
1108
1109 {}
1110 {{/code}}
1111
1112
1113 **Possible problems**
1114
1115 (% class="table-bordered table-striped" %)
1116 |=Http status |=Problem type |=Description
1117 |404 |not-found |Found no authorization for provided id on this ledger
1118 |500 |fatal |Unexpected error, logs may give details about the problem
1119
1120 == 11. Reversals ==
1121
1122
1123 ==== 11.1 Create Reversal ====
1124
1125 For reversing a specific capture
1126
1127 {{code language="http" title="**Request**"}}
1128 POST /ledger/account-transaction/v1/{ownerNo}/split-authorizations/{authorizationId}/captures/{captureId}/reversals HTTP/1.1
1129 Host: -
1130 Authorization: Bearer<Token>
1131 Content-Type: application/json
1132
1133 {
1134 "reversalId": "abcdefg123",
1135 "currency": "SEK",
1136 "amount": 512.00,
1137 "sellerTransactionId": "123456"
1138 }
1139 {{/code}}
1140
1141
1142 **Request object specification**
1143
1144 (% class="table-bordered table-striped" %)
1145 |=Property |=Data type|=Format|=Required|=Description
1146 |reversalId |string |Pattern: ^[a-zA-Z0-9#_:@.\-åäöÅÄÖ]{1,}$ |Yes |Identifier of the reversal, must be unique for all types of captures within the ledger.
1147 |currency |string |(((
1148 * SEK
1149 * NOK
1150 * DKK
1151 * EUR
1152 )))|Yes |
1153 |amount |number |Type: double
1154 Max: 100000000
1155 Min: 0 |Yes |Amount to reverse
1156 |sellerTransactionId |string |Pattern: ^[a-zA-Z0-9#_:@.\-åäöÅÄÖ]{1,}$ |Yes |The sellers identifier of the reversal transaction, usually the receipt reference
1157
1158 {{code language="http" title="**Response**"}}
1159 HTTP/1.1 201 CREATED
1160 Content-Type: application/json
1161
1162 {
1163 }
1164 {{/code}}
1165
1166
1167 **Possible problems**
1168
1169 (% class="table-bordered table-striped" %)
1170 |=Http status |=Problem type |=Description
1171 |400 |validation |occurs if any of the input validation fails, it is described in the problem which parameter that failed the validation
1172 |404 |not-found |Found no authorization for provided id on this ledger
1173 |409 |invalid-amount |See details to get more information about the error
1174 |409 |currency-not-supported |Currency not valid for this Reversal, see details for more information
1175 |409 |identifier-already-in-use |ReversalId given is already used, provide a new one and try again
1176 |500 |fatal |Unexpected error, logs may give details about the problem
1177
1178 == 12. Account-applications ==
1179
1180
1181 Get an existing account-application. The account - application, is used when applying for new account.
1182
1183 ==== 12.1 Get specific Account-application ====
1184
1185 {{code language="http" title="**Request**"}}
1186 GET /ledger/account-transaction/v1/{ownerNo}/account-applications/{accountApplicationId} HTTP/1.1
1187 Host: -
1188 Authorization: Bearer<Token>
1189 Content-Type: application/json
1190
1191 {{/code}}
1192
1193 Get Account Application
1194
1195 {{code language="http" title="**Response**"}}
1196 HTTP/1.1 200 OK
1197 Content-Type: application/json
1198
1199 {
1200 "accountApplicationId": "YYY",
1201 "redirectUrl": "https://ledger-apps.payex.com/ledger/public-account-transaction/v1/XXX/pre-authorization/8c535338-d92c-49e7-90bf-304dbf38e0bd",
1202 "customer": {
1203 "nationalConsumerIdentifier": {
1204 "value": "19101010-1010",
1205 "countryCode": "SE"
1206 },
1207 "email": "a@b.c",
1208 "msisdn": "46123456",
1209 "customerNo": "1234"
1210 },
1211 "profileName": "myProfileName",
1212 "creditLimit": 5000.00,
1213 "currency": "SEK",
1214 "returnUrl": "https://webconsumerexample.se/consumerweb",
1215 "redirectOptions": {
1216 "nativeAppSwitchingUrl": "myApp",
1217 "languageCode": "sv"
1218 },
1219 "@id": "/ledger/account-transaction/v1/xxx/account-applications/yyy",
1220 "operations": []
1221 }
1222 {{/code}}
1223
1224
1225 ==== 12.2 Create Account-application ====
1226
1227 Create account-application is used when applying for new account. the application process may include signing and credit check
1228
1229 {{code language="http" title="**Request**"}}
1230 POST /ledger/account-transaction/v1/{ownerNo}/account-applications HTTP/1.1
1231 Host: -
1232 Authorization: Bearer<Token>
1233 Content-Type: application/json
1234
1235 {
1236 "accountApplicationId": "YYY",
1237 "redirectUrl": "https://ledger-apps.payex.com/ledger/public-account-transaction/v1/XXX/pre-authorization/8c535338-d92c-49e7-90bf-304dbf38e0bd",
1238 "customer": {
1239 "nationalConsumerIdentifier": {
1240 "value": "19101010-1010",
1241 "countryCode": "SE"
1242 },
1243 "email": "a@b.c",
1244 "msisdn": "46123456",
1245 "customerNo": "1234"
1246 },
1247 "profileName": "myProfileName",
1248 "creditLimit": 5000.00,
1249 "currency": "SEK",
1250 "returnUrl": "https://webconsumerexample.se/consumerweb",
1251 "redirectOptions": {
1252 "nativeAppSwitchingUrl": "myApp",
1253 "languageCode": "sv"
1254 },
1255 "@id": "/ledger/account-transaction/v1/xxx/account-applications/yyy",
1256 "operations": []
1257 }
1258 {{/code}}
1259
1260
1261 **Request object specification**
1262
1263 (% class="table-bordered table-striped" %)
1264 |=Property |=Data type|=Format|=Required|=Description
1265 |=customer |object | |Yes |
1266 |= nationalConsumerIdentifier |object | |Yes |
1267 | 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
1268 | countryCode |string |Pattern: SE~|NO~|DK~|FI |No |The country code for the identifier value property, value 'None' is not allowed, ~[~[ISO 3166-1 alpha-2>>url:https://sv.wikipedia.org/wiki/ISO_3166]]
1269 | email |string |Pattern: ^[^;\xA0\xD0\─@<>\p{Cc}]+@(?!\.)(?!.*\.\.)(?:[^;\xA0\xD0\─@<>\p{Cc}]+\.[^;\xA0\xD0\─@<>\p{Cc}]+~|\~[~[A-Fa-f\d\:]+\])(?<!\.)$ |No |The customers Email. Only used for creating new customer
1270 | msisdn |string |Pattern: ^[+]{1}\d{4,14}$ |No |Mobile communications number starting with '+' followed with up to 14 numbers from 0-9. Length between 5 and 15 including the starting '+'
1271 | customerNo |string |Pattern: ^[a-zA-Z0-9\-]{1,}$ |Yes |Provide the customer identifier. If customer does not yet exist in our ledger and ledger is configured to generate new customers CustomerNo then don't set this property. Ledger generated CustomerNo will be set after customer is created
1272 |profileName |string | |Yes |The profilename of the account to create
1273 |creditLimit |number |Type: double
1274 Max: 100000000
1275 Min: 0 |Yes |The amount of the credit limit on the account applied for, can't have more than 2 decimal places
1276 |currency |string |(((
1277 * SEK
1278 * NOK
1279 * DKK
1280 * EUR
1281 )))|Yes |
1282 |returnUrl |string | |Yes |Url to return the end user to after process is completed
1283 |=redirectOptions |object | |Yes |
1284 | nativeAppSwitchingUrl |string | |No |Uri pointing to app, used to switch back to app from bankId
1285 | autostartAction |string | |No |Used to automatically start bankId application. Possible actions (null~|se-bankid-this-device)
1286 | languageCode |string | |Yes |Used to set desired language in the authenticate/onboarding web. Possible languageCodes (SV~|EN)
1287
1288 Post Account Application
1289
1290 {{code language="http" title="**Response**"}}
1291 HTTP/1.1 201 Created
1292 Content-Type: application/json
1293
1294 {
1295 "accountApplicationId": "YYY",
1296 "redirectUrl": "https://ledger-apps.payex.com/ledger/public-account-transaction/v1/XXX/pre-authorization/8c535338-d92c-49e7-90bf-304dbf38e0bd",
1297 "customer": {
1298 "nationalConsumerIdentifier": {
1299 "value": "19101010-1010",
1300 "countryCode": "SE"
1301 },
1302 "email": "a@b.c",
1303 "msisdn": "46123456",
1304 "customerNo": "1234"
1305 },
1306 "profileName": "myProfileName",
1307 "creditLimit": 5000.00,
1308 "currency": "SEK",
1309 "returnUrl": "https://webconsumerexample.se/consumerweb",
1310 "redirectOptions": {
1311 "nativeAppSwitchingUrl": "myApp",
1312 "languageCode": "sv"
1313 },
1314 "@id": "/ledger/account-transaction/v1/xxx/account-applications/yyy",
1315 "operations": []
1316 }
1317 {{/code}}
1318
1319
1320 **Possible problems**
1321
1322 (% class="table-bordered table-striped" %)
1323 |=Http status |=Problem type |=Description
1324 |409 |account-already-exist |Occurs if a account already exists.
1325
1326
1327 **Response object specification**
1328
1329 (% class="table-bordered table-striped" %)
1330 |=Property |=Data type|=Format|=Description
1331 |@id |string | |Uri identifier of the current resource
1332 |=customer |object | |
1333 |= nationalConsumerIdentifier |object | |
1334 | 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
1335 | countryCode |string |Pattern: SE~|NO~|DK~|FI |The country code for the identifier value property, value 'None' is not allowed, ~[~[ISO 3166-1 alpha-2>>url:https://sv.wikipedia.org/wiki/ISO_3166]]
1336 | email |string |Pattern: ^[^;\xA0\xD0\─@<>\p{Cc}]+@(?!\.)(?!.*\.\.)(?:[^;\xA0\xD0\─@<>\p{Cc}]+\.[^;\xA0\xD0\─@<>\p{Cc}]+~|\~[~[A-Fa-f\d\:]+\])(?<!\.)$ |The customers Email. Only used for creating new customer
1337 | msisdn |string |Pattern: ^[+]{1}\d{4,14}$ |Mobile communications number starting with '+' followed with up to 14 numbers from 0-9. Length between 5 and 15 including the starting '+'
1338 | customerNo |string |Pattern: ^[a-zA-Z0-9\-]{1,}$ |Provide the customer identifier. If customer does not yet exist in our ledger and ledger is configured to generate new customers CustomerNo then don't set this property. Ledger generated CustomerNo will be set after customer is created
1339 |profileName |string | |The profilename of the account to create
1340 |creditLimit |number |Type: double
1341 Max: 100000000
1342 Min: 0 |The amount of the credit limit on the account applied for, can't have more than 2 decimal places
1343 |currency |string |(((
1344 * SEK
1345 * NOK
1346 * DKK
1347 * EUR
1348 )))|
1349 |returnUrl |string | |Url to return the end user to after process is completed
1350 |=redirectOptions |object | |
1351 | nativeAppSwitchingUrl |string | |Uri pointing to app, used to switch back to app from bankId
1352 | autostartAction |string | |Used to automatically start bankId application. Possible actions (null~|se-bankid-this-device)
1353 | languageCode |string | |Used to set desired language in the authenticate/onboarding web. Possible languageCodes (SV~|EN)
1354 |accountApplicationId |string | |Unique identifier of the account-application.
1355 |redirectUrl |string | |Web uri pointing to the application flow that the user should be redirected to.
1356 |specialIntent |string | |Special intent for the application, e.g. 'standalone-account-onboarding'.
1357 |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]]
1358
1359 == 13. Limit-upgrade-applications ==
1360
1361
1362 Get an existing limit-upgrade-application. The limit - upgrade - application, is used for upgrading limit on existing credit account.
1363
1364 ==== 13.1 Get specific Limit-upgrade-application ====
1365
1366 {{code language="http" title="**Request**"}}
1367 GET /ledger/account-transaction/v1/{ownerNo}/limit-upgrade-applications/{limitUpgradeApplicationId} HTTP/1.1
1368 Host: -
1369 Authorization: Bearer<Token>
1370 Content-Type: application/json
1371
1372 {{/code}}
1373
1374 Get Limit Upgrade Application
1375
1376 {{code language="http" title="**Response**"}}
1377 HTTP/1.1 200 OK
1378 Content-Type: application/json
1379
1380 {
1381 "limitUpgradeApplicationId": "YYY",
1382 "redirectUrl": "https://ledger-apps.payex.com/ledger/public-account-transaction/v1/XXX/pre-authorization/8c535338-d92c-49e7-90bf-304dbf38e0bd",
1383 "accountNo": "12345",
1384 "customerNo": "54321",
1385 "creditLimit": 5000.00,
1386 "currency": "SEK",
1387 "returnUrl": "https://webconsumerexample.se/consumerweb",
1388 "redirectOptions": {
1389 "nativeAppSwitchingUrl": "myApp",
1390 "languageCode": "sv"
1391 },
1392 "@id": "/ledger/account-transaction/v1/xxx/limit-upgrade-applications/yyy",
1393 "operations": []
1394 }
1395 {{/code}}
1396
1397
1398 ==== 13.2 Create Limit-upgrade-application ====
1399
1400 Create limit-upgrade-application is used when applying for upgrading limit on existing credit account. The application process may include signing and credit check
1401
1402 {{code language="http" title="**Request**"}}
1403 POST /ledger/account-transaction/v1/{ownerNo}/limit-upgrade-applications HTTP/1.1
1404 Host: -
1405 Authorization: Bearer<Token>
1406 Content-Type: application/json
1407
1408 {
1409 "limitUpgradeApplicationId": "YYY",
1410 "redirectUrl": "https://ledger-apps.payex.com/ledger/public-account-transaction/v1/XXX/pre-authorization/8c535338-d92c-49e7-90bf-304dbf38e0bd",
1411 "accountNo": "12345",
1412 "customerNo": "54321",
1413 "creditLimit": 5000.00,
1414 "currency": "SEK",
1415 "returnUrl": "https://webconsumerexample.se/consumerweb",
1416 "redirectOptions": {
1417 "nativeAppSwitchingUrl": "myApp",
1418 "languageCode": "sv"
1419 },
1420 "@id": "/ledger/account-transaction/v1/xxx/limit-upgrade-applications/yyy",
1421 "operations": []
1422 }
1423 {{/code}}
1424
1425
1426 **Request object specification**
1427
1428 (% class="table-bordered table-striped" %)
1429 |=Property |=Data type|=Format|=Required|=Description
1430 |accountNo |string | |Yes |The identifier of the account
1431 |customerNo |string |Pattern: ^[a-zA-Z0-9\-]{1,}$ |Yes |The identifier of the customer.
1432 |creditLimit |number |Type: double
1433 Max: 100000000
1434 Min: 0 |Yes |The amount of the credit limit on the account applied for, can't have more than 2 decimal places
1435 |currency |string |(((
1436 * SEK
1437 * NOK
1438 * DKK
1439 * EUR
1440 )))|Yes |
1441 |returnUrl |string | |Yes |Url to return the end user to after process is completed
1442 |=redirectOptions |object | |Yes |
1443 | nativeAppSwitchingUrl |string | |No |Uri pointing to app, used to switch back to app from bankId
1444 | autostartAction |string | |No |Used to automatically start bankId application. Possible actions (null~|se-bankid-this-device)
1445 | languageCode |string | |Yes |Used to set desired language in the authenticate/onboarding web. Possible languageCodes (SV~|EN)
1446
1447 Post Limit Upgrade Application
1448
1449 {{code language="http" title="**Response**"}}
1450 HTTP/1.1 201 Created
1451 Content-Type: application/json
1452
1453 {
1454 "limitUpgradeApplicationId": "YYY",
1455 "redirectUrl": "https://ledger-apps.payex.com/ledger/public-account-transaction/v1/XXX/pre-authorization/8c535338-d92c-49e7-90bf-304dbf38e0bd",
1456 "accountNo": "12345",
1457 "customerNo": "54321",
1458 "creditLimit": 5000.00,
1459 "currency": "SEK",
1460 "returnUrl": "https://webconsumerexample.se/consumerweb",
1461 "redirectOptions": {
1462 "nativeAppSwitchingUrl": "myApp",
1463 "languageCode": "sv"
1464 },
1465 "@id": "/ledger/account-transaction/v1/xxx/limit-upgrade-applications/yyy",
1466 "operations": []
1467 }
1468 {{/code}}
1469
1470
1471 **Possible problems**
1472
1473 (% class="table-bordered table-striped" %)
1474 |=Http status |=Problem type |=Description
1475 |404 |account-not-found |Occurs if the account is not found.
1476
1477
1478 **Response object specification**
1479
1480 (% class="table-bordered table-striped" %)
1481 |=Property |=Data type|=Format|=Description
1482 |@id |string | |Uri identifier of the current resource
1483 |accountNo |string | |The identifier of the account
1484 |customerNo |string |Pattern: ^[a-zA-Z0-9\-]{1,}$ |The identifier of the customer.
1485 |creditLimit |number |Type: double
1486 Max: 100000000
1487 Min: 0 |The amount of the credit limit on the account applied for, can't have more than 2 decimal places
1488 |currency |string |(((
1489 * SEK
1490 * NOK
1491 * DKK
1492 * EUR
1493 )))|
1494 |returnUrl |string | |Url to return the end user to after process is completed
1495 |=redirectOptions |object | |
1496 | nativeAppSwitchingUrl |string | |Uri pointing to app, used to switch back to app from bankId
1497 | autostartAction |string | |Used to automatically start bankId application. Possible actions (null~|se-bankid-this-device)
1498 | languageCode |string | |Used to set desired language in the authenticate/onboarding web. Possible languageCodes (SV~|EN)
1499 |limitUpgradeApplicationId |string | |Unique identifier of the limit-upgrade-application.
1500 |redirectUrl |string | |Web uri pointing to the application flow that the user should be redirected to.
1501 |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]]
1502
1503 {{display reference="developer:Main.Invoicing.ledger-api-general-docs.api-section-problems.WebHome"/}}