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