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