Changes for page 2. Customer
Last modified by thomas hedstrom on 2026/07/08 15:00
From empty
To version 241.1
edited by thomas hedstrom
on 2026/07/08 13:51
on 2026/07/08 13:51
Change comment: There is no comment for this version
Summary
-
Page properties (6 modified, 0 added, 0 removed)
-
Attachments (0 modified, 7 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,0 +1,1 @@ 1 +2. Customer - Parent
-
... ... @@ -1,0 +1,1 @@ 1 +Main.WebHome - Author
-
... ... @@ -1,1 +1,1 @@ 1 - XWiki.XWikiGuest1 +xwiki:XWiki.thomashedstrom - Default language
-
... ... @@ -1,0 +1,1 @@ 1 +en - Tags
-
... ... @@ -1,0 +1,1 @@ 1 +px-custom-page-content - Content
-
... ... @@ -1,0 +1,1354 @@ 1 +(% class="jumbotron" %) 2 +((( 3 +(% class="container" %) 4 +((( 5 +Integrate to **PayEx Customer API ** 6 +))) 7 +))) 8 + 9 +== Introduction == 10 + 11 +(% class="lead" %) 12 +This api is used to create/read customers or change properties related to the customer. 13 + 14 +[[image:customerapi-2025-02.PNG||alt="1612164561442-820.png" height="699" width="587"]] 15 + 16 + 17 +Each resource in the API corresponds to its own route. All routes are structured according to a specific standard, explained below 18 + 19 +The below route is an example of a route towards resource2Id, to operate on this resource you must also include the ids of its parentresources in the route. 20 +//lf-api.payex.com/ledger/**{Subdomain}**/v1/**{LedgerNumber}**/resource1/**{resource1Id}**/resource2/**{resource2Id}**// 21 + 22 +(% class="table-bordered table-striped" %) 23 +|=(% style="width: 604px;" %)Route segment|=(% style="width: 2790px;" %)Description 24 +|(% style="width:604px" %)Subdomain|(% style="width:2790px" %)In this part of the API it will be **customer** 25 +|(% style="width:604px" %)LedgerNumber|(% style="width:2790px" %)The ledger identifier/number at PayEx 26 +|(% style="width:604px" %)resource1Id|(% style="width:2790px" %)Identifier of resource1 27 +|(% style="width:604px" %)resource2Id|(% style="width:2790px" %)identifier of resource2, subresource to resource1 28 + 29 +(% class="wikigeneratedid" %) 30 +Routes that occurs in examples of this documentation will use the following identifiers 31 + 32 +(% class="table-bordered table-striped" %) 33 +|=(% style="width: 488px;" %)Resource|=(% style="width: 2271px;" %)Identifier 34 +|(% style="width:488px" %)LedgerNumber|(% style="width:2271px" %)XXX 35 +|(% style="width:488px" %)Customer|(% style="width:2271px" %)NNN (CustomerNo) 36 + 37 +(% id="HChangelog" %) 38 +== Changelog == 39 + 40 +2026-07-08 41 +Added new secontion for Trusted Seller Group Consents 42 + 43 +2026-01-27 44 +Added new possible value for to ActiveConsents - PharmaciesSE 45 + 46 +2023-01-17 47 +Added //surpluses// property to the Customer resource with planned release 2024-01-23 48 + 49 +2023-11-27 50 +Added new resource Surpluses & added a general 404 not-found to problems list. 51 + 52 +2024-04-26 53 + 54 +Added TaxIdentificationNumber to the Customer resource with planned release 2024-05-28 55 + 56 +2024-05-15 57 + 58 +Added Consent and underlying resources with planned release 2024-05-28. Updated Introduction API overview visual. 59 + 60 +2025-02-14 61 + 62 +Added operation Update-Kyc-Answers and updates to the Customer resource Operations list to reflect that. Planned release 2025-03-04 63 + 64 +Added resource Kyc-Questions. Planned release 2025-03-04 65 + 66 + 67 +== 1. Customers == 68 + 69 + 70 +Get a customer from ledger using customer number as identifier 71 + 72 +==== 1.1 Get specific Customer ==== 73 + 74 +{{code language="http" title="**Request**"}} 75 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo} HTTP/1.1 76 +Host: - 77 +Authorization: Bearer<Token> 78 +Content-Type: application/json 79 + 80 +{{/code}} 81 + 82 +Get customer 83 + 84 +{{code language="http" title="**Response**"}} 85 +HTTP/1.1 200 OK 86 +Content-Type: application/json 87 + 88 +{ 89 + "customerNo": "YYY", 90 + "nationalIdentifier": { 91 + "regNo": "YYYYMMDD-NNNN", 92 + "countryCode": "SE" 93 + }, 94 + "vatNo": "SE101010101001", 95 + "legalEntity": "consumer", 96 + "name": "Test Testsson", 97 + "emailAddress": "Test@test.se", 98 + "protectedIdentity": false, 99 + "preferredLanguageCode": "SV", 100 + "legalStatus": "active", 101 + "msisdn": "\u002B467040000000", 102 + "activeConsents": [ 103 + "Betalingsservice", 104 + "Avtalegiro", 105 + "RecurringCard" 106 + ], 107 + "ediAddressInfo": { 108 + "van": "ABCXYZ", 109 + "interChangeRecipient": "Recipient_ID1", 110 + "buyerId": "123465" 111 + }, 112 + "surpluses": "/ledger/customer/v1/xxx/customers/yyy/surpluses", 113 + "legalAddress": "/ledger/customer/v1/xxx/customers/yyy/legal-address", 114 + "billingAddress": "/ledger/customer/v1/xxx/customers/yyy/billing-address", 115 + "consent": "/ledger/customer/v1/xxx/customers/yyy/consent", 116 + "operations": [ 117 + { 118 + "rel": "partial-update-customer", 119 + "method": "PATCH", 120 + "href": "/ledger/customer/v1/xxx/customers/yyy" 121 + }, 122 + { 123 + "rel": "add-billing-address", 124 + "method": "POST", 125 + "href": "/ledger/customer/v1/xxx/customers/yyy/billing-address" 126 + }, 127 + { 128 + "rel": "update-kyc-answers", 129 + "method": "POST", 130 + "href": "/ledger/customer/v1/xxx/customers/yyy/update-kyc-answers" 131 + } 132 + ], 133 + "taxIdentificationNumber": "1234567890" 134 +} 135 +{{/code}} 136 + 137 + 138 + 139 +**Possible problems** 140 + 141 +(% class="table-bordered table-striped" %) 142 +|=Http status |=Problem type |=Description 143 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support. 144 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support. 145 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support. 146 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details. 147 +|400 |validation |Validation error when accessing resource . Please refer to the problems property for additional details. 148 +|404 |customer-does-not-exists |The requested resource '' was not found. 149 +|404 |customer-not-found |The requested resource '' was not found. 150 + 151 +==== 1.2 Create Customer ==== 152 + 153 +Create a new customer in ledger 154 + 155 +{{code language="http" title="**Request**"}} 156 +POST /ledger/customer/v1/{ownerNo}/customers HTTP/1.1 157 +Host: - 158 +Authorization: Bearer<Token> 159 +Content-Type: application/json 160 + 161 + 162 +{{/code}} 163 + 164 + 165 +**Request object specification** 166 + 167 +(% class="table-bordered table-striped" %) 168 +|=Property |=Data type|=Format|=Required|=Description 169 +|customerNo |string | |No |\\ 170 +|=ediAddressInfo |object | |No | 171 +| van |string | |No |\\ 172 +| interChangeRecipient |string | |No |\\ 173 +| buyerId |string | |No |\\ 174 +|emailAddress |string | |No |\\ 175 +|=legalAddress |object | |No | 176 +| addressee |string | |No |\\ 177 +| streetAddress |string | |No |\\ 178 +| zipCode |string | |No |\\ 179 +| city |string | |No |\\ 180 +| coAddress |string | |No |\\ 181 +| countryCode |string | |No |\\ 182 +|=billingAddress |object | |No | 183 +|legalEntity |string | |No |\\ 184 +|msisdn |string | |No |\\ 185 +|name |string | |No |\\ 186 +|=nationalIdentifier |object | |No | 187 +| regNo |string | |Yes |\\ 188 +| countryCode |string |Pattern: ^[A-Z]{2}$ |Yes |\\ 189 +|protectedIdentity |boolean | |Yes |\\ 190 +|preferredLanguageCode |string | |No |\\ 191 +|vatNo |string | |No |\\ 192 +|distributionType |string | |No |\\ 193 +|taxIdentificationNumber |string | |No | 194 + 195 +Create a customer response 196 + 197 +{{code language="http" title="**Response**"}} 198 +HTTP/1.1 201 Created 199 +Content-Type: application/json 200 + 201 +{ 202 + "customerNo": "YYY", 203 + "@id": "/ledger/customer/v1/xxx/customers/yyy" 204 +} 205 +{{/code}} 206 + 207 + 208 +**Possible problems** 209 + 210 +(% class="table-bordered table-striped" %) 211 +|=Http status |=Problem type |=Description 212 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support. 213 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support. 214 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support. 215 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details. 216 +|400 |validation |Validation error when accessing resource . Please refer to the problems property for additional details. 217 +|400 |invalid-reg-no |Validation error when accessing resource . Please refer to the problems property for additional details. 218 +|400 |invalid-phone-no |Validation error when accessing resource . Please refer to the problems property for additional details. 219 +|422 |customer-already-exists |The requested resource '' could not be processed. Customer Already Exists 220 + 221 + 222 +**Response object specification** 223 + 224 +(% class="table-bordered table-striped" %) 225 +|=Property |=Data type|=Format|=Description 226 +|@id |string | |Uri identifier of the current resource 227 +|customerNo |string | |\\ 228 +|=nationalIdentifier |object | | 229 +| regNo |string | |\\ 230 +| countryCode |string |Pattern: ^[A-Z]{2}$ |\\ 231 +|vatNo |string | |\\ 232 +|legalEntity |string | |\\ 233 +|name |string | |\\ 234 +|emailAddress |string | |\\ 235 +|protectedIdentity |boolean | |\\ 236 +|preferredLanguageCode |string | |\\ 237 +|legalStatus |string | |\\ 238 +|msisdn |string | |\\ 239 +|=activeConsents |array | | 240 +| |string | |\\ 241 +|=ediAddressInfo |object | | 242 +| van |string | |\\ 243 +| interChangeRecipient |string | |\\ 244 +| buyerId |string | |\\ 245 +|surpluses |dynamic | |\\ 246 +|legalAddress |dynamic | |\\ 247 +|billingAddress |dynamic | |\\ 248 +|consent |dynamic | |\\ 249 +|distributionType |string | |\\ 250 +|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]] 251 +|taxIdentificationNumber |string | |\\ 252 + 253 +== 2. Kyc-questions == 254 + 255 + 256 +Get KYC questions from ledger using company number as identifier 257 + 258 +==== 2.1 Get list of Kyc-questions ==== 259 + 260 +{{code language="http" title="**Request**"}} 261 +GET /ledger/customer/v1/{ownerNo}/kyc-questions?language={language} HTTP/1.1 262 +Host: - 263 +Authorization: Bearer<Token> 264 +Content-Type: application/json 265 + 266 +{{/code}} 267 + 268 +Get CompanyInstance KYC questions if configured or a 404 company-kyc-questions-not-configured response if not 269 + 270 +{{code language="http" title="**Response**"}} 271 +HTTP/1.1 200 OK 272 +Content-Type: application/json 273 + 274 +{ 275 + "kycQuestions": [ 276 + { 277 + "questionText": "What is your current employment?", 278 + "answer": { 279 + "type": "single", 280 + "required": true, 281 + "possibleAnswers": [ 282 + { 283 + "answerCode": "selfemployed", 284 + "answerText": "Own business" 285 + }, 286 + { 287 + "answerCode": "private_employee", 288 + "answerText": "Private employee" 289 + }, 290 + { 291 + "answerCode": "goverment_employee", 292 + "answerText": "Government employee" 293 + } 294 + ] 295 + }, 296 + "questionCode": "employment" 297 + }, 298 + { 299 + "questionText": "What is your yearly income", 300 + "answer": { 301 + "type": "single", 302 + "required": true, 303 + "possibleAnswers": [ 304 + { 305 + "answerCode": "incomeinterval1", 306 + "answerText": "0-100 000 SEK" 307 + }, 308 + { 309 + "answerCode": "incomeinterval2", 310 + "answerText": "100 001-200 000 SEK" 311 + }, 312 + { 313 + "answerCode": "incomeinterval3", 314 + "answerText": "200 001-300 000 SEK" 315 + }, 316 + { 317 + "answerCode": "incomeinterval4", 318 + "answerText": "Over 300 001 SEK" 319 + } 320 + ] 321 + }, 322 + "questionCode": "income" 323 + } 324 + ], 325 + "operations": [] 326 +} 327 +{{/code}} 328 + 329 + 330 + 331 +**Query paramters** 332 + 333 +(% class="table-bordered table-striped" %) 334 +|=Name |=Required |=Description 335 +|language |False |format ISO639-1, if not supported or none given request defaults to language code 'en'(English) 336 + 337 +**Possible problems** 338 + 339 +(% class="table-bordered table-striped" %) 340 +|=Http status |=Problem type |=Description 341 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support. 342 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support. 343 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support. 344 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details. 345 +|404 |company-kyc-questions-not-configured |The requested resource '' was not found. 346 + 347 +**Response object specification** 348 + 349 +(% class="table-bordered table-striped" %) 350 +|=Property |=Data type|=Format|=Description 351 +|@id |string | |Uri identifier of the current resource 352 +|=kycQuestions |array | | 353 +| questionCode |string | |The code definition of the question 354 +| questionText |string | |The translated text of the question 355 +|= answer |object | | 356 +| type |string | |The type of the expected answer: single ~| multi ~| text 357 +| required |boolean | |If the answer is required 358 +| textValidationRegEx |string | |The regex the answer should match 359 +|= possibleAnswers |array | | 360 +| answerCode |string | |The code definition of the answer 361 +| answerText |string | |The translated text of the answer 362 +|= subQuestions |array | | 363 +|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]] 364 + 365 +== 3. Active-disbursement-orders == 366 + 367 + 368 +list active surpluse disbursement orders pending disbursement batch is run. 369 + 370 +==== 3.1 Get list of Active-disbursement-orders ==== 371 + 372 +{{code language="http" title="**Request**"}} 373 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/surpluses/{surplusId}/active-disbursement-orders HTTP/1.1 374 +Host: - 375 +Authorization: Bearer<Token> 376 +Content-Type: application/json 377 + 378 +{{/code}} 379 + 380 +Get customer billing-address 381 + 382 +{{code language="http" title="**Response**"}} 383 +HTTP/1.1 200 OK 384 +Content-Type: application/json 385 + 386 +{ 387 + "items": [ 388 + { 389 + "operations": [], 390 + "swedishBankAccount": { 391 + "accountNo": "1234567890", 392 + "accountType": "BGSE" 393 + } 394 + } 395 + ], 396 + "navigation": { 397 + "@id": "/ledger/customer/v1/xxx/customers/yyy/surpluses/zzz/active-disbursement-orders" 398 + } 399 +} 400 +{{/code}} 401 + 402 + 403 + 404 +**Possible problems** 405 + 406 +(% class="table-bordered table-striped" %) 407 +|=Http status |=Problem type |=Description 408 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support. 409 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support. 410 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support. 411 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details. 412 +|400 |validation |Validation error when accessing resource . Please refer to the problems property for additional details. 413 +|404 |customer-does-not-exists |The requested resource '' was not found. 414 +|404 |customer-not-found |The requested resource '' was not found. 415 + 416 +==== 3.2 Create Active-disbursement-order ==== 417 + 418 +Add a disbursement order. Disburses all available funds on surplus account, when disbursement batch is run 419 + 420 +{{code language="http" title="**Request**"}} 421 +POST /ledger/customer/v1/{ownerNo}/customers/{customerNo}/surpluses/{surplusId}/active-disbursement-orders HTTP/1.1 422 +Host: - 423 +Authorization: Bearer<Token> 424 +Content-Type: application/json 425 + 426 +{ 427 + "swedishBankAccount": { 428 + "accountNo": "NNN", 429 + "accountType": "BGSE | PGSE | BKSE | PKSE" 430 + } 431 +} 432 +{{/code}} 433 + 434 + 435 +**Request object specification** 436 + 437 +(% class="table-bordered table-striped" %) 438 +|=Property |=Data type|=Format|=Required|=Description 439 +|activeDisbursementOrdersId |string | |No |\\ 440 +|=norwegianBankAccount |object | |No | 441 +| accountNo |string | |Yes |\\ 442 +|=swedishBankAccount |object | |No | 443 +| accountNo |string | |Yes |\\ 444 +| accountType |string | |Yes |\\ 445 +|=international |object | |No | 446 +| iban |string | |Yes |\\ 447 +| bic |string | |Yes |\\ 448 +|=swedishSus |object | |No | 449 +|= nationalIdentifier |object | |No | 450 +| regNo |string | |No |\\ 451 +| countryCode |string | |No |\\ 452 +|= address |object | |No | 453 +| addressee |string | |No |\\ 454 +| streetAddress |string | |No |\\ 455 +| city |string | |No |\\ 456 +| zipCode |string | |No |\\ 457 +| countryCode |string | |No |\\ 458 +| coAddress |string | |No | 459 + 460 +{{code language="http" title="**Response**"}} 461 +HTTP/1.1 201 CREATED 462 +Content-Type: application/json 463 + 464 +{ 465 +} 466 +{{/code}} 467 + 468 + 469 +**Response object specification** 470 + 471 +(% class="table-bordered table-striped" %) 472 +|=Property |=Data type|=Format|=Description 473 +|=items |array | | 474 +| @id |string | |Uri identifier of the current resource 475 +| activeDisbursementOrdersId |string | |\\ 476 +| 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]] 477 +|= norwegianBankAccount |object | | 478 +| accountNo |string | |\\ 479 +|= swedishBankAccount |object | | 480 +| accountNo |string | |\\ 481 +| accountType |string | |\\ 482 +|= international |object | | 483 +| iban |string | |\\ 484 +| bic |string | |\\ 485 +|= swedishSus |object | | 486 +|= nationalIdentifier |object | | 487 +| regNo |string | |\\ 488 +| countryCode |string | |\\ 489 +|= address |object | | 490 +| addressee |string | |\\ 491 +| streetAddress |string | |\\ 492 +| city |string | |\\ 493 +| zipCode |string | |\\ 494 +| countryCode |string | |\\ 495 +| coAddress |string | |\\ 496 +|=navigation |object | | 497 +| @id |string |Type: uri |The current result view. 498 +| first |string |Type: uri |Link to the first results. 499 +| previous |string |Type: uri |Link to the previous results. 500 +| next |string |Type: uri |Link to the next results. 501 + 502 +== 4. Surpluses == 503 + 504 + 505 +List all available surpluses on the customer 506 + 507 +==== 4.1 Get list of Surpluses ==== 508 + 509 +{{code language="http" title="**Request**"}} 510 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/surpluses HTTP/1.1 511 +Host: - 512 +Authorization: Bearer<Token> 513 +Content-Type: application/json 514 + 515 +{{/code}} 516 + 517 +Get surpluses list 518 + 519 +{{code language="http" title="**Response**"}} 520 +HTTP/1.1 200 OK 521 +Content-Type: application/json 522 + 523 +{ 524 + "items": [ 525 + { 526 + "surplusId": "123", 527 + "balance": 10, 528 + "currency": "SEK", 529 + "date": "2026-07-05T00:00:00\u002B02:00", 530 + "status": "open", 531 + "invoice": "/ledger/invoice/v1/XXX/invoices/AAA", 532 + "activeDisbursementOrders": "/ledger/customer/v1/xxx/customers/yyy/surpluses/123/active-disbursement-orders", 533 + "operations": [ 534 + { 535 + "rel": "active-disbursement-orders", 536 + "method": "POST", 537 + "href": "/ledger/customer/v1/xxx/customers/yyy/surpluses/123/active-disbursement-orders" 538 + } 539 + ], 540 + "@id": "/ledger/customer/v1/xxx/customers/yyy/surpluses/123" 541 + }, 542 + { 543 + "surplusId": "456", 544 + "balance": 20, 545 + "currency": "SEK", 546 + "date": "2026-07-03T00:00:00\u002B02:00", 547 + "status": "pending-disbursement", 548 + "account": "/ledger/account/v1/XXX/accounts/BBB", 549 + "activeDisbursementOrders": "/ledger/customer/v1/xxx/customers/yyy/surpluses/456/active-disbursement-orders", 550 + "operations": [ 551 + { 552 + "rel": "active-disbursement-orders", 553 + "method": "POST", 554 + "href": "/ledger/customer/v1/xxx/customers/yyy/surpluses/456/active-disbursement-orders" 555 + } 556 + ], 557 + "@id": "/ledger/customer/v1/xxx/customers/yyy/surpluses/456" 558 + }, 559 + { 560 + "surplusId": "789", 561 + "balance": 30, 562 + "currency": "SEK", 563 + "date": "2026-06-26T00:00:00\u002B02:00", 564 + "status": "pending-regulate", 565 + "invoice": "/ledger/invoice/v1/XXX/invoices/AAA", 566 + "activeDisbursementOrders": "/ledger/customer/v1/xxx/customers/yyy/surpluses/789/active-disbursement-orders", 567 + "operations": [ 568 + { 569 + "rel": "active-disbursement-orders", 570 + "method": "POST", 571 + "href": "/ledger/customer/v1/xxx/customers/yyy/surpluses/789/active-disbursement-orders" 572 + } 573 + ], 574 + "@id": "/ledger/customer/v1/xxx/customers/yyy/surpluses/789" 575 + } 576 + ], 577 + "navigation": { 578 + "@id": "/ledger/customer/v1/xxx/customers/yyy/surpluses" 579 + } 580 +} 581 +{{/code}} 582 + 583 + 584 +A surplus is the remaining value from a payment that was greater than the current debt, also referred as an 'overpayment'. Each instance of an overpayment will create a new surplus. A surplus will often have a connection to an account or invoice based of where the payment was placed but surpluses without connection to an account or invoice also exist. Surpluses can be used to settle upcoming debt or be disbursed. 585 + 586 +==== 4.2 Get specific Surpluse ==== 587 + 588 +{{code language="http" title="**Request**"}} 589 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/surpluses/{surplusId} HTTP/1.1 590 +Host: - 591 +Authorization: Bearer<Token> 592 +Content-Type: application/json 593 + 594 +{{/code}} 595 + 596 +Get single surplus 597 + 598 +{{code language="http" title="**Response**"}} 599 +HTTP/1.1 200 OK 600 +Content-Type: application/json 601 + 602 +{ 603 + "surplusId": "YYY", 604 + "balance": 10, 605 + "currency": "SEK", 606 + "date": "2026-07-05T00:00:00\u002B02:00", 607 + "status": "open", 608 + "invoice": "/ledger/invoice/v1/XXX/invoices/AAA", 609 + "account": "/ledger/account/v1/XXX/accounts/BBB", 610 + "activeDisbursementOrders": "/ledger/customer/v1/xxx/customers/yyy/surpluses/yyy/active-disbursement-orders", 611 + "operations": [ 612 + { 613 + "rel": "active-disbursement-orders", 614 + "method": "POST", 615 + "href": "/ledger/customer/v1/xxx/customers/yyy/surpluses/yyy/active-disbursement-orders" 616 + } 617 + ], 618 + "@id": "/ledger/customer/v1/XXX/customers/AAA/surpluses/YYY" 619 +} 620 +{{/code}} 621 + 622 + 623 + 624 +**Response object specification** 625 + 626 +(% class="table-bordered table-striped" %) 627 +|=Property |=Data type|=Format|=Description 628 +|@id |string | |Uri identifier of the current resource 629 +|surplusId |string | |\\ 630 +|balance |number |Type: double |\\ 631 +|currency |string | |\\ 632 +|date |string |Type: date-time |\\ 633 +|status |string | |\\ 634 +|invoice |string | |\\ 635 +|account |string | |\\ 636 +|activeDisbursementOrders |dynamic | |\\ 637 +|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]] 638 + 639 +== 5. Trusted-seller-groups == 640 + 641 + 642 +Get details about the customer's active Consent. 643 + 644 +==== 5.1 Get list of Trusted-seller-groups ==== 645 + 646 +{{code language="http" title="**Request**"}} 647 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/consent/trusted-seller-groups HTTP/1.1 648 +Host: - 649 +Authorization: Bearer<Token> 650 +Content-Type: application/json 651 + 652 +{{/code}} 653 + 654 +Get consent list 655 + 656 +{{code language="http" title="**Response**"}} 657 +HTTP/1.1 200 OK 658 +Content-Type: application/json 659 + 660 +{ 661 + "items": [ 662 + { 663 + "consentType": "ccccc1", 664 + "operations": [ 665 + { 666 + "rel": "delete-trusted-seller-group", 667 + "method": "DELETE", 668 + "href": "/ledger/customer/v1/xxx/customers/yyy/consent/trusted-seller-groups/ccccc1" 669 + } 670 + ], 671 + "@id": "/ledger/customer/v1/xxx/customers/yyy/consent/trusted-seller-groups/ccccc1" 672 + }, 673 + { 674 + "consentType": "ccccc2", 675 + "operations": [ 676 + { 677 + "rel": "delete-trusted-seller-group", 678 + "method": "DELETE", 679 + "href": "/ledger/customer/v1/xxx/customers/yyy/consent/trusted-seller-groups/ccccc2" 680 + } 681 + ], 682 + "@id": "/ledger/customer/v1/xxx/customers/yyy/consent/trusted-seller-groups/ccccc2" 683 + } 684 + ], 685 + "navigation": { 686 + "@id": "/ledger/customer/v1/xxx/customers/yyy/consent/trusted-seller-groups" 687 + } 688 +} 689 +{{/code}} 690 + 691 + 692 + 693 +**Possible problems** 694 + 695 +(% class="table-bordered table-striped" %) 696 +|=Http status |=Problem type |=Description 697 +|400 |validation |Occurs if the validation of the request fails, it is described in the problem why the input is invalid. 698 +|404 |not-found |Occurs if the requested resource is not found. 699 +|409 |conflict |Occurs if the requested resource already exists. 700 +|500 |fatal |Unexpected error, logs may give details about the problem 701 + 702 +Get details about the customer's active Consent. 703 + 704 +==== 5.2 Get specific Trusted-seller-group ==== 705 + 706 +{{code language="http" title="**Request**"}} 707 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/consent/trusted-seller-groups/{consentType} HTTP/1.1 708 +Host: - 709 +Authorization: Bearer<Token> 710 +Content-Type: application/json 711 + 712 +{{/code}} 713 + 714 +Get single consent 715 + 716 +{{code language="http" title="**Response**"}} 717 +HTTP/1.1 200 OK 718 +Content-Type: application/json 719 + 720 +{ 721 + "consentType": "ccccc", 722 + "operations": [ 723 + { 724 + "rel": "delete-trusted-seller-group", 725 + "method": "DELETE", 726 + "href": "/ledger/customer/v1/xxx/customers/yyy/consent/trusted-seller-groups/ccccc" 727 + } 728 + ] 729 +} 730 +{{/code}} 731 + 732 + 733 + 734 +**Possible problems** 735 + 736 +(% class="table-bordered table-striped" %) 737 +|=Http status |=Problem type |=Description 738 +|400 |validation |Occurs if the validation of the request fails, it is described in the problem why the input is invalid. 739 +|404 |not-found |Occurs if the requested resource is not found. 740 +|409 |conflict |Occurs if the requested resource already exists. 741 +|500 |fatal |Unexpected error, logs may give details about the problem 742 + 743 +==== 5.3 Create Trusted-seller-group ==== 744 + 745 +Save a pdf Consent document as a Base64 string for specific CustomerNo and ConsentType. 746 + 747 +{{code language="http" title="**Request**"}} 748 +POST /ledger/customer/v1/{ownerNo}/customers/{customerNo}/consent/trusted-seller-groups HTTP/1.1 749 +Host: - 750 +Authorization: Bearer<Token> 751 +Content-Type: application/json 752 + 753 +{ 754 + "consentType": "PharmaciesSE", 755 + "applicationDocument": { 756 + "content": "JVBERi0xLjQKJ...", 757 + "fileType": "pdf" 758 + } 759 +} 760 +{{/code}} 761 + 762 + 763 +**Request object specification** 764 + 765 +(% class="table-bordered table-striped" %) 766 +|=Property |=Data type|=Format|=Required|=Description 767 +|consentType |string | |Yes |Name of the Consent Type 768 +|=applicationDocument |object | |Yes | 769 +| content |string | |Yes |A base64 encoded string representing the content of the document. 770 +| fileType |string |Pattern: (?i)^(pdf~|txt~|json~|xml)$ |Yes |The file type of the document. Supported file types are: pdf, txt, json and xml. The validation is case insensitive. 771 + 772 +Save a consent document 773 + 774 +{{code language="http" title="**Response**"}} 775 +HTTP/1.1 200 OK 776 +Content-Type: application/json 777 + 778 +{ 779 + "consentType": "cccc", 780 + "operations": [ 781 + { 782 + "rel": "delete-trusted-seller-group", 783 + "method": "DELETE", 784 + "href": "/ledger/customer/v1/xxx/customers/yyy/consent/trusted-seller-groups/cccc" 785 + } 786 + ], 787 + "@id": "/ledger/customer/v1/xxx/customers/yyy/consent/trusted-seller-groups/cccc" 788 +} 789 +{{/code}} 790 + 791 + 792 +**Possible problems** 793 + 794 +(% class="table-bordered table-striped" %) 795 +|=Http status |=Problem type |=Description 796 +|400 |validation |Occurs if the validation of the request fails, it is described in the problem why the input is invalid. 797 +|404 |not-found |Occurs if the requested resource is not found. 798 +|409 |conflict |Occurs if the requested resource already exists. 799 +|500 |fatal |Unexpected error, logs may give details about the problem 800 + 801 + 802 +**Response object specification** 803 + 804 +(% class="table-bordered table-striped" %) 805 +|=Property |=Data type|=Format|=Description 806 +|@id |string | |Uri identifier of the current resource 807 +|consentType |string | |\\ 808 +|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]] 809 + 810 +== 6. Legal-address == 811 + 812 + 813 +The legal address is where claims is normally sent to. It is required for a customer to have a legal address registered 814 + 815 +==== 6.1 Get list of Legal-address ==== 816 + 817 +{{code language="http" title="**Request**"}} 818 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/legal-address HTTP/1.1 819 +Host: - 820 +Authorization: Bearer<Token> 821 +Content-Type: application/json 822 + 823 +{{/code}} 824 + 825 +Get customer legal-address 826 + 827 +{{code language="http" title="**Response**"}} 828 +HTTP/1.1 200 OK 829 +Content-Type: application/json 830 + 831 +{ 832 + "addressee": "Test Testsson", 833 + "streetAddress": "Test street 1", 834 + "zipCode": "60000", 835 + "city": "Test town", 836 + "coAddress": "Co address", 837 + "countryCode": "SE", 838 + "operations": [ 839 + { 840 + "rel": "update-legal-address", 841 + "method": "PUT", 842 + "href": "/ledger/customer/v1/xxx/customers/yyy/legal-address" 843 + }, 844 + { 845 + "rel": "update-legal-address-from-population-register", 846 + "method": "POST", 847 + "href": "/ledger/customer/v1/xxx/customers/yyy/legal-address/update-legal-address-from-population-register" 848 + } 849 + ] 850 +} 851 +{{/code}} 852 + 853 + 854 + 855 +**Possible problems** 856 + 857 +(% class="table-bordered table-striped" %) 858 +|=Http status |=Problem type |=Description 859 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support. 860 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support. 861 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support. 862 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details. 863 +|400 |validation |Validation error when accessing resource . Please refer to the problems property for additional details. 864 +|404 |customer-does-not-exists |The requested resource '' was not found. 865 +|404 |customer-not-found |The requested resource '' was not found. 866 + 867 + 868 +**Response object specification** 869 + 870 +(% class="table-bordered table-striped" %) 871 +|=Property |=Data type|=Format|=Description 872 +|@id |string | |Uri identifier of the current resource 873 +|addressee |string | |\\ 874 +|streetAddress |string | |\\ 875 +|zipCode |string | |\\ 876 +|city |string | |\\ 877 +|coAddress |string | |\\ 878 +|countryCode |string | |\\ 879 +|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]] 880 + 881 +== 7. Update-kyc-answers == 882 + 883 + 884 +==== 7.1 Create Update-kyc-answer ==== 885 + 886 +When exposed on customer resources operations list it's a indication previous KYC answers up for renewal. Able to update KYC with this operation even if current aren't expired but won't be suggested on the customer resource 887 + 888 +{{code language="http" title="**Request**"}} 889 +POST /ledger/customer/v1/{ownerNo}/customers/{customerNo}/update-kyc-answers HTTP/1.1 890 +Host: - 891 +Authorization: Bearer<Token> 892 +Content-Type: application/json 893 + 894 +{ 895 + "answers": [ 896 + { 897 + "questionCode": "taxable_outside_sweden", 898 + "answerCode": "no" 899 + }, 900 + { 901 + "questionCode": "multiple_citizenship", 902 + "answerCode": "yes" 903 + }, 904 + { 905 + "questionCode": "citizen_ship_country_codes", 906 + "answerCode": "SWE" 907 + }, 908 + { 909 + "questionCode": "citizen_ship_country_codes", 910 + "answerCode": "NOR" 911 + } 912 + ] 913 +} 914 +{{/code}} 915 + 916 + 917 +**Request object specification** 918 + 919 +(% class="table-bordered table-striped" %) 920 +|=Property |=Data type|=Format|=Required|=Description 921 +|=answers |array | |Yes | 922 +| questionCode |string | |Yes |The code definition of the question 923 +| answerCode |string | |Yes |The code definition of the answer 924 + 925 +{{code language="http" title="**Response**"}} 926 +HTTP/1.1 201 CREATED 927 +Content-Type: application/json 928 + 929 +{ 930 +} 931 +{{/code}} 932 + 933 + 934 +**Possible problems** 935 + 936 +(% class="table-bordered table-striped" %) 937 +|=Http status |=Problem type |=Description 938 +|400 |validation |Occurs if the validation of the request fails, it is described in the problem why the input is invalid. 939 +|404 |not-found |Occurs if the customer not found or if KYC is not configured on this ledger. 940 +|409 |company-kyc-questions-not-configured |Occurs if ledger is not currently configured for KYC 941 +|500 |fatal |Unexpected error, logs may give details about the problem 942 + 943 +== 8. Update-legal-address-from-population-register == 944 + 945 + 946 +==== 8.1 Create Update-legal-address-from-population-register ==== 947 + 948 +Execution of this operation will result in an attempt to retrieve (and replace) the customer's legal address from the population registry. 949 + 950 +{{code language="http" title="**Request**"}} 951 +POST /ledger/customer/v1/{ownerNo}/customers/{customerNo}/legal-address/update-legal-address-from-population-register HTTP/1.1 952 +Host: - 953 +Authorization: Bearer<Token> 954 +Content-Type: application/json 955 + 956 +{ 957 +} 958 +{{/code}} 959 + 960 + 961 + 962 +{{code language="http" title="**Response**"}} 963 +HTTP/1.1 204 NO CONTENT 964 +Content-Type: application/json 965 + 966 +{} 967 +{{/code}} 968 + 969 + 970 +**Possible problems** 971 + 972 +(% class="table-bordered table-striped" %) 973 +|=Http status |=Problem type |=Description 974 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support. 975 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support. 976 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support. 977 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details. 978 +|400 |validation |Validation error when accessing resource . Please refer to the problems property for additional details. 979 +|404 |customer-does-not-exists |The requested resource '' was not found. 980 +|404 |customer-not-found |The requested resource '' was not found. 981 + 982 +== 9. Billing-address == 983 + 984 + 985 +The billing address is where invoices/bills/letters etc. is normally sent to. This address is optional 986 + 987 +==== 9.1 Get list of Billing-address ==== 988 + 989 +{{code language="http" title="**Request**"}} 990 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/billing-address HTTP/1.1 991 +Host: - 992 +Authorization: Bearer<Token> 993 +Content-Type: application/json 994 + 995 +{{/code}} 996 + 997 +Get customer billing-address 998 + 999 +{{code language="http" title="**Response**"}} 1000 +HTTP/1.1 200 OK 1001 +Content-Type: application/json 1002 + 1003 +{ 1004 + "addressee": "Test Testsson", 1005 + "streetAddress": "Test street 1", 1006 + "zipCode": "60000", 1007 + "city": "Test town", 1008 + "coAddress": "Co address", 1009 + "countryCode": "SE", 1010 + "operations": [ 1011 + { 1012 + "rel": "update-billing-address", 1013 + "method": "PUT", 1014 + "href": "/ledger/customer/v1/xxx/customers/yyy/billing-address" 1015 + }, 1016 + { 1017 + "rel": "delete-billing-address", 1018 + "method": "DELETE", 1019 + "href": "/ledger/customer/v1/xxx/customers/yyy/billing-address" 1020 + } 1021 + ] 1022 +} 1023 +{{/code}} 1024 + 1025 + 1026 + 1027 +**Possible problems** 1028 + 1029 +(% class="table-bordered table-striped" %) 1030 +|=Http status |=Problem type |=Description 1031 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support. 1032 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support. 1033 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support. 1034 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details. 1035 +|400 |validation |Validation error when accessing resource . Please refer to the problems property for additional details. 1036 +|404 |customer-does-not-exists |The requested resource '' was not found. 1037 +|404 |customer-not-found |The requested resource '' was not found. 1038 + 1039 +==== 9.2 Create Billing-addre ==== 1040 + 1041 +Add a billing address to customer. The billing address is where invoices/bills/letters etc. is normally sent to. This address is optional 1042 + 1043 +{{code language="http" title="**Request**"}} 1044 +POST /ledger/customer/v1/{ownerNo}/customers/{customerNo}/billing-address HTTP/1.1 1045 +Host: - 1046 +Authorization: Bearer<Token> 1047 +Content-Type: application/json 1048 + 1049 +{ 1050 + "addressee": "Test Testsson", 1051 + "streetAddress": "Test street 1", 1052 + "zipCode": "60000", 1053 + "city": "Test town", 1054 + "coAddress": "Co address", 1055 + "countryCode": "SE" 1056 +} 1057 +{{/code}} 1058 + 1059 + 1060 +**Request object specification** 1061 + 1062 +(% class="table-bordered table-striped" %) 1063 +|=Property |=Data type|=Format|=Required|=Description 1064 +|addressee |string | |No |\\ 1065 +|streetAddress |string | |No |\\ 1066 +|zipCode |string | |No |\\ 1067 +|city |string | |No |\\ 1068 +|coAddress |string | |No |\\ 1069 +|countryCode |string | |No | 1070 + 1071 +{{code language="http" title="**Response**"}} 1072 +HTTP/1.1 201 CREATED 1073 +Content-Type: application/json 1074 + 1075 +{ 1076 +} 1077 +{{/code}} 1078 + 1079 + 1080 +**Possible problems** 1081 + 1082 +(% class="table-bordered table-striped" %) 1083 +|=Http status |=Problem type |=Description 1084 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support. 1085 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support. 1086 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support. 1087 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details. 1088 +|400 |validation |Validation error when accessing resource . Please refer to the problems property for additional details. 1089 +|404 |customer-does-not-exists |The requested resource '' was not found. 1090 +|404 |customer-not-found |The requested resource '' was not found. 1091 + 1092 + 1093 +**Response object specification** 1094 + 1095 +(% class="table-bordered table-striped" %) 1096 +|=Property |=Data type|=Format|=Description 1097 +|@id |string | |Uri identifier of the current resource 1098 +|addressee |string | |\\ 1099 +|streetAddress |string | |\\ 1100 +|zipCode |string | |\\ 1101 +|city |string | |\\ 1102 +|coAddress |string | |\\ 1103 +|countryCode |string | |\\ 1104 +|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]] 1105 + 1106 +== 10. Consent == 1107 + 1108 + 1109 +Underlying resources that display information or enable registration of a customer's consent. 1110 + 1111 +==== 10.1 Get list of Consent ==== 1112 + 1113 +{{code language="http" title="**Request**"}} 1114 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/consent HTTP/1.1 1115 +Host: - 1116 +Authorization: Bearer<Token> 1117 +Content-Type: application/json 1118 + 1119 +{{/code}} 1120 + 1121 +Get customer consent 1122 + 1123 +{{code language="http" title="**Response**"}} 1124 +HTTP/1.1 200 OK 1125 +Content-Type: application/json 1126 + 1127 +{ 1128 + "recurringCard": "/ledger/customer/v1/xxx/customers/yyy/consent/recurring-card", 1129 + "recurringCardRedirectRegistration": "/ledger/customer/v1/xxx/customers/yyy/consent/recurring-card-redirect-registration", 1130 + "trustedSellerGroups": "/ledger/customer/v1/xxx/customers/yyy/consent/trusted-seller-groups", 1131 + "availableTrustedSellerGroupConsents": [], 1132 + "operations": [ 1133 + { 1134 + "rel": "add-trusted-seller-group", 1135 + "method": "POST", 1136 + "href": "/ledger/customer/v1/xxx/customers/yyy/consent/trusted-seller-groups" 1137 + }, 1138 + { 1139 + "rel": "add-recurring-card-redirect-registration", 1140 + "method": "POST", 1141 + "href": "/ledger/customer/v1/xxx/customers/yyy/consent/recurring-card-redirect-registration" 1142 + } 1143 + ] 1144 +} 1145 +{{/code}} 1146 + 1147 + 1148 + 1149 +**Response object specification** 1150 + 1151 +(% class="table-bordered table-striped" %) 1152 +|=Property |=Data type|=Format|=Description 1153 +|@id |string | |Uri identifier of the current resource 1154 +|recurringCard |dynamic | |\\ 1155 +|recurringCardRedirectRegistration |dynamic | |\\ 1156 +|trustedSellerGroups |dynamic | |\\ 1157 +|=availableTrustedSellerGroupConsents |array | | 1158 +| |string | |\\ 1159 +|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]] 1160 + 1161 +== 11. Find-customer == 1162 + 1163 + 1164 +==== 11.1 Create Find-customer ==== 1165 + 1166 + It is used to find customer with nationalIdentifier. 1167 + 1168 +{{code language="http" title="**Request**"}} 1169 +POST /ledger/customer/v1/{ownerNo}/find-customer HTTP/1.1 1170 +Host: - 1171 +Authorization: Bearer<Token> 1172 +Content-Type: application/json 1173 + 1174 +{ 1175 + "nationalIdentifier": { 1176 + "regNo": "YYYYMMDD-NNNN", 1177 + "countryCode": "SE" 1178 + } 1179 +} 1180 +{{/code}} 1181 + 1182 + 1183 +**Request object specification** 1184 + 1185 +(% class="table-bordered table-striped" %) 1186 +|=Property |=Data type|=Format|=Required|=Description 1187 +|=nationalIdentifier |object | |No | 1188 +| regNo |string | |Yes |\\ 1189 +| countryCode |string | |No | 1190 + 1191 +Find customer with nationalIdentifier, regno and countrycode, returns CustomerNo = YYY 1192 + 1193 +{{code language="http" title="**Response**"}} 1194 +HTTP/1.1 200 OK 1195 +Content-Type: application/json 1196 + 1197 +{ 1198 + "customerNo": "YYY" 1199 +} 1200 +{{/code}} 1201 + 1202 + 1203 +**Possible problems** 1204 + 1205 +(% class="table-bordered table-striped" %) 1206 +|=Http status |=Problem type |=Description 1207 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support. 1208 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support. 1209 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support. 1210 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details. 1211 +|400 |validation |Validation error when accessing resource . Please refer to the problems property for additional details. 1212 +|400 |invalid-reg-no |Validation error when accessing resource . Please refer to the problems property for additional details. 1213 +|404 |customer-does-not-exists |The requested resource '' was not found. 1214 +|404 |customer-not-found |The requested resource '' was not found. 1215 + 1216 + 1217 +**Response object specification** 1218 + 1219 +(% class="table-bordered table-striped" %) 1220 +|=Property |=Data type|=Format|=Description 1221 +|@id |string | |Uri identifier of the current resource 1222 +|customerNo |string | |\\ 1223 + 1224 +== 12. Recurring-card == 1225 + 1226 + 1227 +Get details about the customer's active Recurring Card Consent. 1228 + 1229 +==== 12.1 Get list of Recurring-card ==== 1230 + 1231 +{{code language="http" title="**Request**"}} 1232 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/consent/recurring-card HTTP/1.1 1233 +Host: - 1234 +Authorization: Bearer<Token> 1235 +Content-Type: application/json 1236 + 1237 +{{/code}} 1238 + 1239 +Get customer active Recurring Card Consent. 1240 + 1241 +{{code language="http" title="**Response**"}} 1242 +HTTP/1.1 200 OK 1243 +Content-Type: application/json 1244 + 1245 +{ 1246 + "cardToken": "2eb28854-07ec-4e88-b672-7c61cc54b461", 1247 + "consentExpiryDate": "04-2035", 1248 + "instrumentDisplayName": "551000******1232", 1249 + "cardExpiryDate": "04/2035", 1250 + "cardBrand": "Visa", 1251 + "operations": [ 1252 + { 1253 + "rel": "delete-recurring-card", 1254 + "method": "DELETE", 1255 + "href": "/ledger/customer/v1/xxx/customers/yyy/consent/recurring-card" 1256 + } 1257 + ] 1258 +} 1259 +{{/code}} 1260 + 1261 + 1262 + 1263 +**Response object specification** 1264 + 1265 +(% class="table-bordered table-striped" %) 1266 +|=Property |=Data type|=Format|=Description 1267 +|@id |string | |Uri identifier of the current resource 1268 +|cardToken |string | |\\ 1269 +|consentExpiryDate |string | |\\ 1270 +|instrumentDisplayName |string | |\\ 1271 +|cardExpiryDate |string | |\\ 1272 +|cardBrand |string | |\\ 1273 +|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]] 1274 + 1275 +== 13. Recurring-card-redirect-registration == 1276 + 1277 + 1278 +Get details about the customer's ongoing Recurring Card registration. 1279 + 1280 +==== 13.1 Get list of Recurring-card-redirect-registration ==== 1281 + 1282 +{{code language="http" title="**Request**"}} 1283 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/consent/recurring-card-redirect-registration HTTP/1.1 1284 +Host: - 1285 +Authorization: Bearer<Token> 1286 +Content-Type: application/json 1287 + 1288 +{{/code}} 1289 + 1290 +Customer's ongoing Recurring Card Registration. 1291 + 1292 +{{code language="http" title="**Response**"}} 1293 +HTTP/1.1 200 OK 1294 +Content-Type: application/json 1295 + 1296 +{ 1297 + "redirectUrl": "https://ecom.externalintegration.payex.com/checkout/abc123", 1298 + "status": "Initialized", 1299 + "operations": [] 1300 +} 1301 +{{/code}} 1302 + 1303 + 1304 +==== 13.2 Create Recurring-card-redirect-registration ==== 1305 + 1306 +Initializes the customer's Recurring Card registration with redirect to SwedbankPay. 1307 + 1308 +{{code language="http" title="**Request**"}} 1309 +POST /ledger/customer/v1/{ownerNo}/customers/{customerNo}/consent/recurring-card-redirect-registration HTTP/1.1 1310 +Host: - 1311 +Authorization: Bearer<Token> 1312 +Content-Type: application/json 1313 + 1314 +{ 1315 + "completeUrl": "https://www.google.com/search?q=cancelurl", 1316 + "cancelUrl": "https://www.google.com/search?q=completeurl", 1317 + "language": "en-US" 1318 +} 1319 +{{/code}} 1320 + 1321 + 1322 +**Request object specification** 1323 + 1324 +(% class="table-bordered table-striped" %) 1325 +|=Property |=Data type|=Format|=Required|=Description 1326 +|completeUrl |string |Type: uri |Yes |\\ 1327 +|cancelUrl |string |Type: uri |Yes |\\ 1328 +|language |string | |Yes | 1329 + 1330 +Customer's ongoing Recurring Card Registration. 1331 + 1332 +{{code language="http" title="**Response**"}} 1333 +HTTP/1.1 200 OK 1334 +Content-Type: application/json 1335 + 1336 +{ 1337 + "redirectUrl": "https://ecom.externalintegration.payex.com/checkout/abc123", 1338 + "status": "Initialized", 1339 + "operations": [], 1340 + "@id": "/ledger/customer/v1/xxx/customers/yyy/consent/recurring-card-redirect-registration" 1341 +} 1342 +{{/code}} 1343 + 1344 + 1345 +**Response object specification** 1346 + 1347 +(% class="table-bordered table-striped" %) 1348 +|=Property |=Data type|=Format|=Description 1349 +|@id |string | |Uri identifier of the current resource 1350 +|redirectUrl |string | |\\ 1351 +|status |string | |\\ 1352 +|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]] 1353 + 1354 +{{display reference="developer:Main.Invoicing.ledger-api-general-docs.api-section-problems.WebHome"/}}
- 1612164530151-211.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.dap - Size
-
... ... @@ -1,0 +1,1 @@ 1 +0 bytes - Content
- 1612164561442-820.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.dap - Size
-
... ... @@ -1,0 +1,1 @@ 1 +0 bytes - Content
- 1661344288319-663.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.dap - Size
-
... ... @@ -1,0 +1,1 @@ 1 +0 bytes - Content
- PayEx - Ledger API's - Customer Wiki Visual(1).png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.kxf - Size
-
... ... @@ -1,0 +1,1 @@ 1 +0 bytes - Content
- PayEx - Ledger API's - Customer Wiki Visual.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.kxf - Size
-
... ... @@ -1,0 +1,1 @@ 1 +0 bytes - Content
- PayEx - Ledger API's - customer.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.kxf - Size
-
... ... @@ -1,0 +1,1 @@ 1 +0 bytes - Content
- customerapi-2025-02.PNG
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.djr - Size
-
... ... @@ -1,0 +1,1 @@ 1 +0 bytes - Content