Changes for page 2. Customer
Last modified by Mats Lyth on 2026/09/16 10:40
Change comment: There is no comment for this version
Summary
-
Page properties (6 modified, 0 added, 0 removed)
-
Attachments (0 modified, 21 added, 0 removed)
- Screenshot 2026-07-08 141842.png
- Swagger_Releases-506348.txt
- 1789469234102-782.png
- 1612164530151-211.png
- 1789395141258-404.png
- image260819.png
- customerapi-2025-02.PNG
- 1789469187004-133.png
- 1789468954666-503.png
- 1661344288319-663.png
- Swagger_Releases-506536.txt
- Swagger_Releases-502848.txt
- 1789469386909-296.png
- PayEx - Ledger API's - Customer Wiki Visual(1).png
- 1789468720058-108.png
- Swagger_Releases-499976(3).txt
- 1612164561442-820.png
- PayEx - Ledger API's - customer.png
- PayEx - Ledger API's - Customer Wiki Visual.png
- 1789469296231-389.png
- 1789395090901-778.png
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.MatsLyth - Default language
-
... ... @@ -1,0 +1,1 @@ 1 +en - Tags
-
... ... @@ -1,0 +1,1 @@ 1 +px-custom-page-content - Content
-
... ... @@ -1,0 +1,1634 @@ 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:1789468720058-108.png||height="677" width="488"]] 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 += Swagger = 38 + 39 +[[Swagger.json-2026-09-15>>attach:Swagger_Releases-506536.txt]] 40 + 41 +== Changelog == 42 + 43 +2023-01-17 44 +Added //surpluses// property to the Customer resource with planned release 2024-01-23 45 + 46 +2023-11-27 47 +Added new resource Surpluses & added a general 404 not-found to problems list. 48 + 49 +2024-04-26 50 + 51 +Added TaxIdentificationNumber to the Customer resource with planned release 2024-05-28 52 + 53 +2024-05-15 54 + 55 +Added Consent and underlying resources with planned release 2024-05-28. Updated Introduction API overview visual. 56 + 57 +2025-02-14 58 + 59 +Added operation Update-Kyc-Answers and updates to the Customer resource Operations list to reflect that. Planned release 2025-03-04 60 + 61 +Added resource Kyc-Questions. Planned release 2025-03-04 62 + 63 +2026-01-27 64 +Added new possible value for to ActiveConsents - PharmaciesSE 65 + 66 +2026-07-08 67 +Added new secontion for Trusted Seller Group Consents 68 + 69 +2026-08-19 70 +Added resource Affordability-Questions. Planned release 2026-09-22 71 + 72 +2026-09-15 73 +Added flowcharts for recuring cards 74 + 75 +== Recuring card flowcharts == 76 + 77 +Flowcharts describing how to register, view and delete recuring card 78 + 79 +=== 1. Register new card === 80 + 81 +[[image:1789469386909-296.png||height="611" width="801"]] 82 + 83 +=== 2. Get card info === 84 + 85 +[[image:1789469234102-782.png||height="304" width="706"]] 86 + 87 +=== 3. Delete card === 88 + 89 +[[image:1789469296231-389.png||height="421" width="727"]] 90 + 91 += API specification = 92 + 93 +== 1. Customers == 94 + 95 + 96 +Get a customer from ledger using customer number as identifier 97 + 98 +==== 1.1 Get specific Customer ==== 99 + 100 +{{code language="http" title="**Request**"}} 101 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo} HTTP/1.1 102 +Host: - 103 +Authorization: Bearer<Token> 104 +Content-Type: application/json 105 + 106 +{{/code}} 107 + 108 +Get customer 109 + 110 +{{code language="http" title="**Response**"}} 111 +HTTP/1.1 200 OK 112 +Content-Type: application/json 113 + 114 +{ 115 + "customerNo": "YYY", 116 + "nationalIdentifier": { 117 + "regNo": "YYYYMMDD-NNNN", 118 + "countryCode": "SE" 119 + }, 120 + "vatNo": "SE101010101001", 121 + "legalEntity": "consumer", 122 + "name": "Test Testsson", 123 + "emailAddress": "Test@test.se", 124 + "protectedIdentity": false, 125 + "preferredLanguageCode": "SV", 126 + "legalStatus": "active", 127 + "msisdn": "+467040000000", 128 + "activeConsents": [ 129 + "Betalingsservice", 130 + "Avtalegiro", 131 + "RecurringCard" 132 + ], 133 + "ediAddressInfo": { 134 + "van": "ABCXYZ", 135 + "interChangeRecipient": "Recipient_ID1", 136 + "buyerId": "123465" 137 + }, 138 + "surpluses": "/ledger/customer/v1/xxx/customers/yyy/surpluses", 139 + "legalAddress": "/ledger/customer/v1/xxx/customers/yyy/legal-address", 140 + "billingAddress": "/ledger/customer/v1/xxx/customers/yyy/billing-address", 141 + "consent": "/ledger/customer/v1/xxx/customers/yyy/consent", 142 + "operations": [ 143 + { 144 + "rel": "partial-update-customer", 145 + "method": "PATCH", 146 + "href": "/ledger/customer/v1/xxx/customers/yyy" 147 + }, 148 + { 149 + "rel": "add-billing-address", 150 + "method": "POST", 151 + "href": "/ledger/customer/v1/xxx/customers/yyy/billing-address" 152 + }, 153 + { 154 + "rel": "update-kyc-answers", 155 + "method": "POST", 156 + "href": "/ledger/customer/v1/xxx/customers/yyy/update-kyc-answers" 157 + } 158 + ], 159 + "taxIdentificationNumber": "1234567890" 160 +} 161 +{{/code}} 162 + 163 + 164 +==== 1.2 Create Customer ==== 165 + 166 +Create a new customer in ledger 167 + 168 +{{code language="http" title="**Request**"}} 169 +POST /ledger/customer/v1/{ownerNo}/customers HTTP/1.1 170 +Host: - 171 +Authorization: Bearer<Token> 172 +Content-Type: application/json 173 + 174 +{ 175 + "customerNo": "YYY", 176 + "ediAddressInfo": { 177 + "van": "ABCXYZ", 178 + "interChangeRecipient": "Recipient_ID1", 179 + "buyerId": "123465" 180 + }, 181 + "emailAddress": "Test@test.se", 182 + "legalAddress": { 183 + "addressee": "Test Testsson", 184 + "streetAddress": "Test street 1", 185 + "zipCode": "60000", 186 + "city": "Test town", 187 + "coAddress": "Co address", 188 + "countryCode": "SE" 189 + }, 190 + "legalEntity": "consumer", 191 + "msisdn": "+467040000000", 192 + "name": "Test Testsson", 193 + "nationalIdentifier": { 194 + "regNo": "YYYYMMDD-NNNN", 195 + "countryCode": "SE" 196 + }, 197 + "protectedIdentity": false, 198 + "preferredLanguageCode": "SV", 199 + "vatNo": "SE101010101001", 200 + "taxIdentificationNumber": "1234567890" 201 +} 202 +{{/code}} 203 + 204 + 205 +**Request object specification** 206 + 207 +(% class="table-bordered table-striped" %) 208 +|=Property |=Data type|=Format|=Required|=Description 209 +|customerNo |string | |No |Unique customer number assigned to the customer in the source system. 210 +|=ediAddressInfo |object | |No | 211 +| van |string | |No |Value Added Network identifier used for EDI communications. 212 +| interChangeRecipient |string | |No |Recipient identifier for EDI interchanges. 213 +| buyerId |string | |No |Identifier assigned to the buying organization or customer 214 +|emailAddress |string | |No |Primary email address for electronic communication with the customer. 215 +|=legalAddress |object | |No | 216 +| addressee |string | |No |Name of the individual, organization, or department that receives mail at the address. 217 +| streetAddress |string | |No |Street name and number of the address. 218 +| zipCode |string | |No |Postal or ZIP code of the address. 219 +| city |string | |No |City or locality of the address. 220 +| coAddress |string | |No |Care-of (c/o) address information or additional address line. 221 +| countryCode |string | |No |Two-letter ISO country code of the address. 222 +|=billingAddress |object | |No | 223 +|legalEntity |string | |No |Customer classification. Supported values: consumer for private individuals and business for organizations or companies. 224 +|msisdn |string | |No |Mobile Station International Subscriber Directory Number (MSISDN), typically a mobile phone number in international format. 225 +|name |string | |No |Customer's full name or business name. 226 +|=nationalIdentifier |object | |No | 227 +| regNo |string | |Yes |\\ 228 +| countryCode |string |Pattern: ^[A-Z]{2}$ |Yes |\\ 229 +|protectedIdentity |boolean | |Yes |Indicates whether the customer has a protected/confidential identity according to national regulations. 230 +|preferredLanguageCode |string | |No |Preferred language code used for communication with the customer. 231 +|vatNo |string | |No |Value Added Tax (VAT) registration number. 232 +|distributionType |string | |No |Preferred method for distribution of invoices, orders, or other business documents. 233 +|taxIdentificationNumber |string | |No |Tax identification number assigned by the relevant tax authority. 234 + 235 +Create a customer response 236 + 237 +{{code language="http" title="**Response**"}} 238 +HTTP/1.1 201 Created 239 +Content-Type: application/json 240 + 241 +{ 242 + "customerNo": "YYY", 243 + "@id": "/ledger/customer/v1/xxx/customers/yyy" 244 +} 245 +{{/code}} 246 + 247 +==== 1.3 Update Customer ==== 248 + 249 +Update customer info 250 + 251 +{{code language="http" title="**Request**"}} 252 +PATCH /ledger/customer/v1/{ownerNo}/customers/{customerNo} HTTP/1.1 253 +Host: - 254 +Authorization: Bearer<Token> 255 +Content-Type: application/json 256 + 257 + 258 +{{/code}} 259 + 260 + 261 + 262 +{{code language="http" title="**Response**"}} 263 +HTTP/1.1 204 NO CONTENT 264 +Content-Type: application/json 265 + 266 +{ 267 +} 268 +{{/code}} 269 + 270 + 271 +**Possible problems** 272 + 273 +(% class="table-bordered table-striped" %) 274 +|=Http status |=Problem type |=Description 275 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support. 276 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support. 277 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support. 278 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details. 279 +|400 |validation |Validation error when accessing resource . Please refer to the problems property for additional details. 280 +|404 |customer-does-not-exists |The requested resource '' was not found. 281 +|404 |customer-not-found |The requested resource '' was not found. 282 +|400 |invalid-reg-no |Validation error when accessing resource . Please refer to the problems property for additional details. 283 +|400 |invalid-phone-no |Validation error when accessing resource . Please refer to the problems property for additional details. 284 +|422 |customer-already-exists |The requested resource '' could not be processed. Customer Already Exists 285 +|400 |email-address-invalid |Validation error when accessing resource . Please refer to the problems property for additional details. 286 + 287 + 288 +**Response object specification** 289 + 290 +(% class="table-bordered table-striped" %) 291 +|=Property |=Data type|=Format|=Description 292 +|@id |string | |Uri identifier of the current resource 293 +|customerNo |string | |Unique customer number assigned to the customer in the source system. 294 +|=nationalIdentifier |object | | 295 +| regNo |string | |\\ 296 +| countryCode |string |Pattern: ^[A-Z]{2}$ |\\ 297 +|vatNo |string | |Value Added Tax (VAT) registration number. 298 +|legalEntity |string | |Customer classification. Supported values: consumer for private individuals and business for organizations or companies. 299 +|name |string | |Customer's full name or business name. 300 +|emailAddress |string | |Primary email address for electronic communication with the customer. 301 +|protectedIdentity |boolean | |Indicates whether the customer has a protected/confidential identity according to national regulations. 302 +|preferredLanguageCode |string | |Preferred language code used for communication with the customer. 303 +|legalStatus |string | |Indicates the legal status of the individual (for example, Active or Deceased). 304 +|msisdn |string | |Mobile Station International Subscriber Directory Number (MSISDN), typically a mobile phone number in international format. 305 +|=activeConsents |array | | 306 +| |string | |\\ 307 +|=ediAddressInfo |object | | 308 +| van |string | |Value Added Network identifier used for EDI communications. 309 +| interChangeRecipient |string | |Recipient identifier for EDI interchanges. 310 +| buyerId |string | |Identifier assigned to the buying organization or customer 311 +|surpluses |dynamic | |\\ 312 +|legalAddress |dynamic | |\\ 313 +|billingAddress |dynamic | |\\ 314 +|consent |dynamic | |\\ 315 +|distributionType |string | |Preferred method for distribution of invoices, orders, or other business documents. 316 +|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]] 317 +|taxIdentificationNumber |string | |Tax identification number assigned by the relevant tax authority. 318 + 319 +== 2. Surpluses == 320 + 321 + 322 +List all available surpluses on the customer 323 + 324 +==== 2.1 Get list of Surpluses ==== 325 + 326 +{{code language="http" title="**Request**"}} 327 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/surpluses HTTP/1.1 328 +Host: - 329 +Authorization: Bearer<Token> 330 +Content-Type: application/json 331 + 332 +{{/code}} 333 + 334 +Get surpluses list 335 + 336 +{{code language="http" title="**Response**"}} 337 +HTTP/1.1 200 OK 338 +Content-Type: application/json 339 + 340 +{ 341 + "items": [ 342 + { 343 + "surplusId": "123", 344 + "balance": 10, 345 + "currency": "SEK", 346 + "date": "2026-09-13T00:00:00+02:00", 347 + "status": "open", 348 + "invoice": "/ledger/invoice/v1/XXX/invoices/AAA", 349 + "activeDisbursementOrders": "/ledger/customer/v1/xxx/customers/yyy/surpluses/123/active-disbursement-orders", 350 + "operations": [ 351 + { 352 + "rel": "active-disbursement-orders", 353 + "method": "POST", 354 + "href": "/ledger/customer/v1/xxx/customers/yyy/surpluses/123/active-disbursement-orders" 355 + } 356 + ], 357 + "@id": "/ledger/customer/v1/xxx/customers/yyy/surpluses/123" 358 + }, 359 + { 360 + "surplusId": "456", 361 + "balance": 20, 362 + "currency": "SEK", 363 + "date": "2026-09-11T00:00:00+02:00", 364 + "status": "pending-disbursement", 365 + "account": "/ledger/account/v1/XXX/accounts/BBB", 366 + "activeDisbursementOrders": "/ledger/customer/v1/xxx/customers/yyy/surpluses/456/active-disbursement-orders", 367 + "operations": [ 368 + { 369 + "rel": "active-disbursement-orders", 370 + "method": "POST", 371 + "href": "/ledger/customer/v1/xxx/customers/yyy/surpluses/456/active-disbursement-orders" 372 + } 373 + ], 374 + "@id": "/ledger/customer/v1/xxx/customers/yyy/surpluses/456" 375 + }, 376 + { 377 + "surplusId": "789", 378 + "balance": 30, 379 + "currency": "SEK", 380 + "date": "2026-09-04T00:00:00+02:00", 381 + "status": "pending-regulate", 382 + "invoice": "/ledger/invoice/v1/XXX/invoices/AAA", 383 + "activeDisbursementOrders": "/ledger/customer/v1/xxx/customers/yyy/surpluses/789/active-disbursement-orders", 384 + "operations": [ 385 + { 386 + "rel": "active-disbursement-orders", 387 + "method": "POST", 388 + "href": "/ledger/customer/v1/xxx/customers/yyy/surpluses/789/active-disbursement-orders" 389 + } 390 + ], 391 + "@id": "/ledger/customer/v1/xxx/customers/yyy/surpluses/789" 392 + } 393 + ], 394 + "navigation": { 395 + "@id": "/ledger/customer/v1/xxx/customers/yyy/surpluses" 396 + } 397 +} 398 +{{/code}} 399 + 400 + 401 +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. 402 + 403 +==== 2.2 Get specific Surpluse ==== 404 + 405 +{{code language="http" title="**Request**"}} 406 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/surpluses/{surplusId} HTTP/1.1 407 +Host: - 408 +Authorization: Bearer<Token> 409 +Content-Type: application/json 410 + 411 +{{/code}} 412 + 413 +Get single surplus 414 + 415 +{{code language="http" title="**Response**"}} 416 +HTTP/1.1 200 OK 417 +Content-Type: application/json 418 + 419 +{ 420 + "surplusId": "YYY", 421 + "balance": 10, 422 + "currency": "SEK", 423 + "date": "2026-09-13T00:00:00+02:00", 424 + "status": "open", 425 + "invoice": "/ledger/invoice/v1/XXX/invoices/AAA", 426 + "account": "/ledger/account/v1/XXX/accounts/BBB", 427 + "activeDisbursementOrders": "/ledger/customer/v1/xxx/customers/yyy/surpluses/yyy/active-disbursement-orders", 428 + "operations": [ 429 + { 430 + "rel": "active-disbursement-orders", 431 + "method": "POST", 432 + "href": "/ledger/customer/v1/xxx/customers/yyy/surpluses/yyy/active-disbursement-orders" 433 + } 434 + ], 435 + "@id": "/ledger/customer/v1/XXX/customers/AAA/surpluses/YYY" 436 +} 437 +{{/code}} 438 + 439 + 440 + 441 +**Response object specification** 442 + 443 +(% class="table-bordered table-striped" %) 444 +|=Property |=Data type|=Format|=Description 445 +|@id |string | |Uri identifier of the current resource 446 +|surplusId |string | |\\ 447 +|balance |number |Type: double |\\ 448 +|currency |string | |\\ 449 +|date |string |Type: date-time |\\ 450 +|status |string | |\\ 451 +|invoice |string | |\\ 452 +|account |string | |\\ 453 +|activeDisbursementOrders |dynamic | |\\ 454 +|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]] 455 + 456 +== 3. Active-disbursement-orders == 457 + 458 + 459 +list active surpluse disbursement orders pending disbursement batch is run. 460 + 461 +==== 3.1 Get list of Active-disbursement-orders ==== 462 + 463 +{{code language="http" title="**Request**"}} 464 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/surpluses/{surplusId}/active-disbursement-orders HTTP/1.1 465 +Host: - 466 +Authorization: Bearer<Token> 467 +Content-Type: application/json 468 + 469 +{{/code}} 470 + 471 +Get customer billing-address 472 + 473 +{{code language="http" title="**Response**"}} 474 +HTTP/1.1 200 OK 475 +Content-Type: application/json 476 + 477 +{ 478 + "items": [ 479 + { 480 + "operations": [], 481 + "swedishBankAccount": { 482 + "accountNo": "1234567890", 483 + "accountType": "BGSE" 484 + } 485 + } 486 + ], 487 + "navigation": { 488 + "@id": "/ledger/customer/v1/xxx/customers/yyy/surpluses/zzz/active-disbursement-orders" 489 + } 490 +} 491 +{{/code}} 492 + 493 + 494 +==== 3.2 Create Active-disbursement-order ==== 495 + 496 +Add a disbursement order. Disburses all available funds on surplus account, when disbursement batch is run 497 + 498 +{{code language="http" title="**Request**"}} 499 +POST /ledger/customer/v1/{ownerNo}/customers/{customerNo}/surpluses/{surplusId}/active-disbursement-orders HTTP/1.1 500 +Host: - 501 +Authorization: Bearer<Token> 502 +Content-Type: application/json 503 + 504 +{ 505 + "swedishBankAccount": { 506 + "accountNo": "NNN", 507 + "accountType": "BGSE | PGSE | BKSE | PKSE" 508 + } 509 +} 510 +{{/code}} 511 + 512 + 513 +**Request object specification** 514 + 515 +(% class="table-bordered table-striped" %) 516 +|=Property |=Data type|=Format|=Required|=Description 517 +|activeDisbursementOrdersId |string | |No |\\ 518 +|=norwegianBankAccount |object | |No | 519 +| accountNo |string | |Yes |\\ 520 +|=swedishBankAccount |object | |No | 521 +| accountNo |string | |Yes |\\ 522 +| accountType |string | |Yes |\\ 523 +|=international |object | |No | 524 +| iban |string | |Yes |\\ 525 +| bic |string | |Yes |\\ 526 +|=swedishSus |object | |No | 527 +|= nationalIdentifier |object | |No | 528 +| regNo |string | |No |\\ 529 +| countryCode |string | |No |\\ 530 +|= address |object | |No | 531 +| addressee |string | |No |\\ 532 +| streetAddress |string | |No |\\ 533 +| city |string | |No |\\ 534 +| zipCode |string | |No |\\ 535 +| countryCode |string | |No |\\ 536 +| coAddress |string | |No | 537 + 538 +{{code language="http" title="**Response**"}} 539 +HTTP/1.1 201 CREATED 540 +Content-Type: application/json 541 + 542 +{ 543 +} 544 +{{/code}} 545 + 546 + 547 +**Possible problems** 548 + 549 +(% class="table-bordered table-striped" %) 550 +|=Http status |=Problem type |=Description 551 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support. 552 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support. 553 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support. 554 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details. 555 +|400 |validation |Validation error when accessing resource . Please refer to the problems property for additional details. 556 +|404 |customer-does-not-exists |The requested resource '' was not found. 557 +|404 |customer-not-found |The requested resource '' was not found. 558 + 559 + 560 +**Response object specification** 561 + 562 +(% class="table-bordered table-striped" %) 563 +|=Property |=Data type|=Format|=Description 564 +|=items |array | | 565 +| @id |string | |Uri identifier of the current resource 566 +| activeDisbursementOrdersId |string | |\\ 567 +| 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]] 568 +|= norwegianBankAccount |object | | 569 +| accountNo |string | |\\ 570 +|= swedishBankAccount |object | | 571 +| accountNo |string | |\\ 572 +| accountType |string | |\\ 573 +|= international |object | | 574 +| iban |string | |\\ 575 +| bic |string | |\\ 576 +|= swedishSus |object | | 577 +|= nationalIdentifier |object | | 578 +| regNo |string | |\\ 579 +| countryCode |string | |\\ 580 +|= address |object | | 581 +| addressee |string | |\\ 582 +| streetAddress |string | |\\ 583 +| city |string | |\\ 584 +| zipCode |string | |\\ 585 +| countryCode |string | |\\ 586 +| coAddress |string | |\\ 587 +|=navigation |object | | 588 +| @id |string |Type: uri |The current result view. 589 +| first |string |Type: uri |Link to the first results. 590 +| previous |string |Type: uri |Link to the previous results. 591 +| next |string |Type: uri |Link to the next results. 592 + 593 +== 4. Legal-address == 594 + 595 + 596 +The legal address is where claims is normally sent to. It is required for a customer to have a legal address registered 597 + 598 +==== 4.1 Get list of Legal-address ==== 599 + 600 +{{code language="http" title="**Request**"}} 601 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/legal-address HTTP/1.1 602 +Host: - 603 +Authorization: Bearer<Token> 604 +Content-Type: application/json 605 + 606 +{{/code}} 607 + 608 +Get customer legal-address 609 + 610 +{{code language="http" title="**Response**"}} 611 +HTTP/1.1 200 OK 612 +Content-Type: application/json 613 + 614 +{ 615 + "addressee": "Test Testsson", 616 + "streetAddress": "Test street 1", 617 + "zipCode": "60000", 618 + "city": "Test town", 619 + "coAddress": "Co address", 620 + "countryCode": "SE", 621 + "operations": [ 622 + { 623 + "rel": "update-legal-address", 624 + "method": "PUT", 625 + "href": "/ledger/customer/v1/xxx/customers/yyy/legal-address" 626 + }, 627 + { 628 + "rel": "update-legal-address-from-population-register", 629 + "method": "POST", 630 + "href": "/ledger/customer/v1/xxx/customers/yyy/legal-address/update-legal-address-from-population-register" 631 + } 632 + ] 633 +} 634 +{{/code}} 635 + 636 + 637 +==== 4.2 Replace Legal-address ==== 638 + 639 +this "PUT" operation will replace the existing legal-address with the address specified in the request body. 640 + 641 +{{code language="http" title="**Request**"}} 642 +PUT /ledger/customer/v1/{ownerNo}/customers/{customerNo}/legal-address HTTP/1.1 643 +Host: - 644 +Authorization: Bearer<Token> 645 +Content-Type: application/json 646 + 647 +{ 648 + "addressee": "Test Testsson", 649 + "streetAddress": "Test street 1", 650 + "zipCode": "60000", 651 + "city": "Test town", 652 + "coAddress": "Co address", 653 + "countryCode": "SE" 654 +} 655 +{{/code}} 656 + 657 + 658 +**Request object specification** 659 + 660 +(% class="table-bordered table-striped" %) 661 +|=Property |=Data type|=Format|=Required|=Description 662 +|addressee |string | |No |\\ 663 +|streetAddress |string | |No |\\ 664 +|zipCode |string | |No |\\ 665 +|city |string | |No |\\ 666 +|coAddress |string | |No |\\ 667 +|countryCode |string | |No | 668 + 669 +{{code language="http" title="**Response**"}} 670 +HTTP/1.1 200 OK 671 +Content-Type: application/json 672 + 673 +{ 674 +} 675 +{{/code}} 676 + 677 + 678 +**Possible problems** 679 + 680 +(% class="table-bordered table-striped" %) 681 +|=Http status |=Problem type |=Description 682 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support. 683 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support. 684 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support. 685 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details. 686 +|400 |validation |Validation error when accessing resource . Please refer to the problems property for additional details. 687 +|404 |customer-does-not-exists |The requested resource '' was not found. 688 +|404 |customer-not-found |The requested resource '' was not found. 689 + 690 + 691 +**Response object specification** 692 + 693 +(% class="table-bordered table-striped" %) 694 +|=Property |=Data type|=Format|=Description 695 +|@id |string | |Uri identifier of the current resource 696 +|addressee |string | |\\ 697 +|streetAddress |string | |\\ 698 +|zipCode |string | |\\ 699 +|city |string | |\\ 700 +|coAddress |string | |\\ 701 +|countryCode |string | |\\ 702 +|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]] 703 + 704 +== 5. Update-legal-address-from-population-register == 705 + 706 + 707 +==== 5.1 Create Update-legal-address-from-population-register ==== 708 + 709 +Execution of this operation will result in an attempt to retrieve (and replace) the customer's legal address from the population registry. 710 + 711 +{{code language="http" title="**Request**"}} 712 +POST /ledger/customer/v1/{ownerNo}/customers/{customerNo}/legal-address/update-legal-address-from-population-register HTTP/1.1 713 +Host: - 714 +Authorization: Bearer<Token> 715 +Content-Type: application/json 716 + 717 +{ 718 +} 719 +{{/code}} 720 + 721 + 722 + 723 +{{code language="http" title="**Response**"}} 724 +HTTP/1.1 204 NO CONTENT 725 +Content-Type: application/json 726 + 727 +{} 728 +{{/code}} 729 + 730 + 731 +**Possible problems** 732 + 733 +(% class="table-bordered table-striped" %) 734 +|=Http status |=Problem type |=Description 735 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support. 736 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support. 737 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support. 738 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details. 739 +|400 |validation |Validation error when accessing resource . Please refer to the problems property for additional details. 740 +|404 |customer-does-not-exists |The requested resource '' was not found. 741 +|404 |customer-not-found |The requested resource '' was not found. 742 + 743 +== 6. Billing-address == 744 + 745 + 746 +The billing address is where invoices/bills/letters etc. is normally sent to. This address is optional 747 + 748 +==== 6.1 Get list of Billing-address ==== 749 + 750 +{{code language="http" title="**Request**"}} 751 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/billing-address HTTP/1.1 752 +Host: - 753 +Authorization: Bearer<Token> 754 +Content-Type: application/json 755 + 756 +{{/code}} 757 + 758 +Get customer billing-address 759 + 760 +{{code language="http" title="**Response**"}} 761 +HTTP/1.1 200 OK 762 +Content-Type: application/json 763 + 764 +{ 765 + "addressee": "Test Testsson", 766 + "streetAddress": "Test street 1", 767 + "zipCode": "60000", 768 + "city": "Test town", 769 + "coAddress": "Co address", 770 + "countryCode": "SE", 771 + "operations": [ 772 + { 773 + "rel": "update-billing-address", 774 + "method": "PUT", 775 + "href": "/ledger/customer/v1/xxx/customers/yyy/billing-address" 776 + }, 777 + { 778 + "rel": "delete-billing-address", 779 + "method": "DELETE", 780 + "href": "/ledger/customer/v1/xxx/customers/yyy/billing-address" 781 + } 782 + ] 783 +} 784 +{{/code}} 785 + 786 + 787 +==== 6.2 Create Billing-address ==== 788 + 789 +Add a billing address to customer. The billing address is where invoices/bills/letters etc. is normally sent to. This address is optional 790 + 791 +{{code language="http" title="**Request**"}} 792 +POST /ledger/customer/v1/{ownerNo}/customers/{customerNo}/billing-address HTTP/1.1 793 +Host: - 794 +Authorization: Bearer<Token> 795 +Content-Type: application/json 796 + 797 +{ 798 + "addressee": "Test Testsson", 799 + "streetAddress": "Test street 1", 800 + "zipCode": "60000", 801 + "city": "Test town", 802 + "coAddress": "Co address", 803 + "countryCode": "SE" 804 +} 805 +{{/code}} 806 + 807 + 808 +**Request object specification** 809 + 810 +(% class="table-bordered table-striped" %) 811 +|=Property |=Data type|=Format|=Required|=Description 812 +|addressee |string | |No |\\ 813 +|streetAddress |string | |No |\\ 814 +|zipCode |string | |No |\\ 815 +|city |string | |No |\\ 816 +|coAddress |string | |No |\\ 817 +|countryCode |string | |No | 818 + 819 +{{code language="http" title="**Response**"}} 820 +HTTP/1.1 201 CREATED 821 +Content-Type: application/json 822 + 823 +{ 824 +} 825 +{{/code}} 826 + 827 +==== 6.3 Replace Billing-address ==== 828 + 829 +Use this operation to update the address, the "PUT" body of the request should be according to the properties of the resource. 830 + 831 +{{code language="http" title="**Request**"}} 832 +PUT /ledger/customer/v1/{ownerNo}/customers/{customerNo}/billing-address HTTP/1.1 833 +Host: - 834 +Authorization: Bearer<Token> 835 +Content-Type: application/json 836 + 837 +{ 838 + "addressee": "Test Testsson", 839 + "streetAddress": "Test street 1", 840 + "zipCode": "60000", 841 + "city": "Test town", 842 + "coAddress": "Co address", 843 + "countryCode": "SE" 844 +} 845 +{{/code}} 846 + 847 + 848 +**Request object specification** 849 + 850 +(% class="table-bordered table-striped" %) 851 +|=Property |=Data type|=Format|=Required|=Description 852 +|addressee |string | |No |\\ 853 +|streetAddress |string | |No |\\ 854 +|zipCode |string | |No |\\ 855 +|city |string | |No |\\ 856 +|coAddress |string | |No |\\ 857 +|countryCode |string | |No | 858 + 859 +{{code language="http" title="**Response**"}} 860 +HTTP/1.1 200 OK 861 +Content-Type: application/json 862 + 863 +{ 864 +} 865 +{{/code}} 866 + 867 +==== 6.4 Delete Billing-address ==== 868 + 869 +Use this operation to delete the billing address. 870 + 871 +{{code language="http" title="**Request**"}} 872 +DELETE /ledger/customer/v1/{ownerNo}/customers/{customerNo}/billing-address HTTP/1.1 873 +Host: - 874 +Authorization: Bearer<Token> 875 +Content-Type: application/json 876 + 877 +{{/code}} 878 + 879 +{{code language="http" title="**Response**"}} 880 +HTTP/1.1 204 NO CONTENT 881 +Content-Type: application/json 882 + 883 +{ 884 +} 885 +{{/code}} 886 + 887 + 888 +**Possible problems** 889 + 890 +(% class="table-bordered table-striped" %) 891 +|=Http status |=Problem type |=Description 892 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support. 893 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support. 894 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support. 895 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details. 896 +|400 |validation |Validation error when accessing resource . Please refer to the problems property for additional details. 897 +|404 |customer-does-not-exists |The requested resource '' was not found. 898 +|404 |customer-not-found |The requested resource '' was not found. 899 + 900 + 901 +**Response object specification** 902 + 903 +(% class="table-bordered table-striped" %) 904 +|=Property |=Data type|=Format|=Description 905 +|@id |string | |Uri identifier of the current resource 906 +|addressee |string | |\\ 907 +|streetAddress |string | |\\ 908 +|zipCode |string | |\\ 909 +|city |string | |\\ 910 +|coAddress |string | |\\ 911 +|countryCode |string | |\\ 912 +|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]] 913 + 914 +== 7. Consent == 915 + 916 + 917 +Underlying resources that display information or enable registration of a customer's consent. 918 + 919 +==== 7.1 Get list of Consent ==== 920 + 921 +{{code language="http" title="**Request**"}} 922 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/consent HTTP/1.1 923 +Host: - 924 +Authorization: Bearer<Token> 925 +Content-Type: application/json 926 + 927 +{{/code}} 928 + 929 +Get customer consent 930 + 931 +{{code language="http" title="**Response**"}} 932 +HTTP/1.1 200 OK 933 +Content-Type: application/json 934 + 935 +{ 936 + "recurringCard": "/ledger/customer/v1/xxx/customers/yyy/consent/recurring-card", 937 + "recurringCardRedirectRegistration": "/ledger/customer/v1/xxx/customers/yyy/consent/recurring-card-redirect-registration", 938 + "trustedSellerGroups": "/ledger/customer/v1/xxx/customers/yyy/consent/trusted-seller-groups", 939 + "availableTrustedSellerGroupConsents": [], 940 + "operations": [ 941 + { 942 + "rel": "add-trusted-seller-group", 943 + "method": "POST", 944 + "href": "/ledger/customer/v1/xxx/customers/yyy/consent/trusted-seller-groups" 945 + }, 946 + { 947 + "rel": "add-recurring-card-redirect-registration", 948 + "method": "POST", 949 + "href": "/ledger/customer/v1/xxx/customers/yyy/consent/recurring-card-redirect-registration" 950 + } 951 + ] 952 +} 953 +{{/code}} 954 + 955 + 956 + 957 +**Response object specification** 958 + 959 +(% class="table-bordered table-striped" %) 960 +|=Property |=Data type|=Format|=Description 961 +|@id |string | |Uri identifier of the current resource 962 +|recurringCard |dynamic | |\\ 963 +|recurringCardRedirectRegistration |dynamic | |\\ 964 +|trustedSellerGroups |dynamic | |\\ 965 +|=availableTrustedSellerGroupConsents |array | | 966 +| |string | |\\ 967 +|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]] 968 + 969 +== 8. Trusted-seller-groups == 970 + 971 + 972 +Get details about the customer's active Consent. 973 + 974 +==== 8.1 Get list of Trusted-seller-groups ==== 975 + 976 +{{code language="http" title="**Request**"}} 977 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/consent/trusted-seller-groups HTTP/1.1 978 +Host: - 979 +Authorization: Bearer<Token> 980 +Content-Type: application/json 981 + 982 +{{/code}} 983 + 984 +Get consent list 985 + 986 +{{code language="http" title="**Response**"}} 987 +HTTP/1.1 200 OK 988 +Content-Type: application/json 989 + 990 +{ 991 + "items": [ 992 + { 993 + "consentType": "ccccc1", 994 + "operations": [ 995 + { 996 + "rel": "delete-trusted-seller-group", 997 + "method": "DELETE", 998 + "href": "/ledger/customer/v1/xxx/customers/yyy/consent/trusted-seller-groups/ccccc1" 999 + } 1000 + ], 1001 + "@id": "/ledger/customer/v1/xxx/customers/yyy/consent/trusted-seller-groups/ccccc1" 1002 + }, 1003 + { 1004 + "consentType": "ccccc2", 1005 + "operations": [ 1006 + { 1007 + "rel": "delete-trusted-seller-group", 1008 + "method": "DELETE", 1009 + "href": "/ledger/customer/v1/xxx/customers/yyy/consent/trusted-seller-groups/ccccc2" 1010 + } 1011 + ], 1012 + "@id": "/ledger/customer/v1/xxx/customers/yyy/consent/trusted-seller-groups/ccccc2" 1013 + } 1014 + ], 1015 + "navigation": { 1016 + "@id": "/ledger/customer/v1/xxx/customers/yyy/consent/trusted-seller-groups" 1017 + } 1018 +} 1019 +{{/code}} 1020 + 1021 + 1022 +Get details about the customer's active Consent. 1023 + 1024 +==== 8.2 Get specific Trusted-seller-group ==== 1025 + 1026 +{{code language="http" title="**Request**"}} 1027 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/consent/trusted-seller-groups/{consentType} HTTP/1.1 1028 +Host: - 1029 +Authorization: Bearer<Token> 1030 +Content-Type: application/json 1031 + 1032 +{{/code}} 1033 + 1034 +Get single consent 1035 + 1036 +{{code language="http" title="**Response**"}} 1037 +HTTP/1.1 200 OK 1038 +Content-Type: application/json 1039 + 1040 +{ 1041 + "consentType": "ccccc", 1042 + "operations": [ 1043 + { 1044 + "rel": "delete-trusted-seller-group", 1045 + "method": "DELETE", 1046 + "href": "/ledger/customer/v1/xxx/customers/yyy/consent/trusted-seller-groups/ccccc" 1047 + } 1048 + ] 1049 +} 1050 +{{/code}} 1051 + 1052 + 1053 +==== 8.3 Create Trusted-seller-group ==== 1054 + 1055 +Save a pdf Consent document as a Base64 string for specific CustomerNo and ConsentType. 1056 + 1057 +{{code language="http" title="**Request**"}} 1058 +POST /ledger/customer/v1/{ownerNo}/customers/{customerNo}/consent/trusted-seller-groups HTTP/1.1 1059 +Host: - 1060 +Authorization: Bearer<Token> 1061 +Content-Type: application/json 1062 + 1063 +{ 1064 + "consentType": "PharmaciesSE", 1065 + "applicationDocument": { 1066 + "content": "JVBERi0xLjQKJ...", 1067 + "fileType": "pdf" 1068 + } 1069 +} 1070 +{{/code}} 1071 + 1072 + 1073 +**Request object specification** 1074 + 1075 +(% class="table-bordered table-striped" %) 1076 +|=Property |=Data type|=Format|=Required|=Description 1077 +|consentType |string | |Yes |Name of the Consent Type 1078 +|=applicationDocument |object | |Yes | 1079 +| content |string | |Yes |A base64 encoded string representing the content of the document. 1080 +| 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. 1081 + 1082 +Save a consent document 1083 + 1084 +{{code language="http" title="**Response**"}} 1085 +HTTP/1.1 200 OK 1086 +Content-Type: application/json 1087 + 1088 +{ 1089 + "consentType": "cccc", 1090 + "operations": [ 1091 + { 1092 + "rel": "delete-trusted-seller-group", 1093 + "method": "DELETE", 1094 + "href": "/ledger/customer/v1/xxx/customers/yyy/consent/trusted-seller-groups/cccc" 1095 + } 1096 + ], 1097 + "@id": "/ledger/customer/v1/xxx/customers/yyy/consent/trusted-seller-groups/cccc" 1098 +} 1099 +{{/code}} 1100 + 1101 +==== 8.4 Delete Trusted-seller-group ==== 1102 + 1103 +Delete a active consent from customer. 1104 + 1105 +{{code language="http" title="**Request**"}} 1106 +DELETE /ledger/customer/v1/{ownerNo}/customers/{customerNo}/consent/trusted-seller-groups/{consentType} HTTP/1.1 1107 +Host: - 1108 +Authorization: Bearer<Token> 1109 +Content-Type: application/json 1110 + 1111 +{{/code}} 1112 + 1113 +{{code language="http" title="**Response**"}} 1114 +HTTP/1.1 204 NO CONTENT 1115 +Content-Type: application/json 1116 + 1117 +{ 1118 +} 1119 +{{/code}} 1120 + 1121 + 1122 +**Possible problems** 1123 + 1124 +(% class="table-bordered table-striped" %) 1125 +|=Http status |=Problem type |=Description 1126 +|400 |validation |Occurs if the validation of the request fails, it is described in the problem why the input is invalid. 1127 +|404 |not-found |Occurs if the requested resource is not found. 1128 +|409 |conflict |Occurs if the requested resource already exists. 1129 +|500 |fatal |Unexpected error, logs may give details about the problem 1130 + 1131 + 1132 +**Response object specification** 1133 + 1134 +(% class="table-bordered table-striped" %) 1135 +|=Property |=Data type|=Format|=Description 1136 +|@id |string | |Uri identifier of the current resource 1137 +|consentType |string | |\\ 1138 +|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]] 1139 + 1140 +== 9. Recurring-card == 1141 + 1142 + 1143 +Get details about the customer's active Recurring Card Consent. 1144 + 1145 +==== 9.1 Get list of Recurring-card ==== 1146 + 1147 +{{code language="http" title="**Request**"}} 1148 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/consent/recurring-card HTTP/1.1 1149 +Host: - 1150 +Authorization: Bearer<Token> 1151 +Content-Type: application/json 1152 + 1153 +{{/code}} 1154 + 1155 +Get customer active Recurring Card Consent. 1156 + 1157 +{{code language="http" title="**Response**"}} 1158 +HTTP/1.1 200 OK 1159 +Content-Type: application/json 1160 + 1161 +{ 1162 + "cardToken": "2eb28854-07ec-4e88-b672-7c61cc54b461", 1163 + "consentExpiryDate": "04-2035", 1164 + "instrumentDisplayName": "551000******1232", 1165 + "cardExpiryDate": "04/2035", 1166 + "cardBrand": "Visa", 1167 + "operations": [ 1168 + { 1169 + "rel": "delete-recurring-card", 1170 + "method": "DELETE", 1171 + "href": "/ledger/customer/v1/xxx/customers/yyy/consent/recurring-card" 1172 + } 1173 + ] 1174 +} 1175 +{{/code}} 1176 + 1177 + 1178 +==== 9.2 Delete Recurring-card ==== 1179 + 1180 +Delete the customer's active Recurring Card Consent. 1181 + 1182 +{{code language="http" title="**Request**"}} 1183 +DELETE /ledger/customer/v1/{ownerNo}/customers/{customerNo}/consent/recurring-card HTTP/1.1 1184 +Host: - 1185 +Authorization: Bearer<Token> 1186 +Content-Type: application/json 1187 + 1188 +{{/code}} 1189 + 1190 +{{code language="http" title="**Response**"}} 1191 +HTTP/1.1 204 NO CONTENT 1192 +Content-Type: application/json 1193 + 1194 +{ 1195 +} 1196 +{{/code}} 1197 + 1198 + 1199 +**Response object specification** 1200 + 1201 +(% class="table-bordered table-striped" %) 1202 +|=Property |=Data type|=Format|=Description 1203 +|@id |string | |Uri identifier of the current resource 1204 +|cardToken |string | |Unique token representing the card for which the recurring card consent has been granted. 1205 +|consentExpiryDate |string | |Expiration date of the recurring card consent. After this date, the consent is no longer valid and must be renewed. 1206 +|instrumentDisplayName |string | |Masked representation of the payment card associated with the consent, displayed in a customer-friendly format. 1207 +|cardExpiryDate |string | |Expiration date of the payment card associated with the recurring card consent. 1208 +|cardBrand |string | |Brand of the payment card, for example Visa or Mastercard. 1209 +|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]] 1210 + 1211 +== 10. Recurring-card-redirect-registration == 1212 + 1213 + 1214 +Get details about the customer's ongoing Recurring Card registration. 1215 + 1216 +==== 10.1 Get list of Recurring-card-redirect-registration ==== 1217 + 1218 +{{code language="http" title="**Request**"}} 1219 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/consent/recurring-card-redirect-registration HTTP/1.1 1220 +Host: - 1221 +Authorization: Bearer<Token> 1222 +Content-Type: application/json 1223 + 1224 +{{/code}} 1225 + 1226 +Customer's ongoing Recurring Card Registration. 1227 + 1228 +{{code language="http" title="**Response**"}} 1229 +HTTP/1.1 200 OK 1230 +Content-Type: application/json 1231 + 1232 +{ 1233 + "redirectUrl": "https://ecom.externalintegration.payex.com/checkout/abc123", 1234 + "status": "Initialized", 1235 + "operations": [] 1236 +} 1237 +{{/code}} 1238 + 1239 + 1240 +==== 10.2 Create Recurring-card-redirect-registration ==== 1241 + 1242 +Initializes the customer's Recurring Card registration with redirect to SwedbankPay. 1243 + 1244 +{{code language="http" title="**Request**"}} 1245 +POST /ledger/customer/v1/{ownerNo}/customers/{customerNo}/consent/recurring-card-redirect-registration HTTP/1.1 1246 +Host: - 1247 +Authorization: Bearer<Token> 1248 +Content-Type: application/json 1249 + 1250 +{ 1251 + "completeUrl": "https://www.google.com/search?q=completeurl", 1252 + "cancelUrl": "https://www.google.com/search?q=cancelurl", 1253 + "language": "en-US" 1254 +} 1255 +{{/code}} 1256 + 1257 + 1258 +**Request object specification** 1259 + 1260 +(% class="table-bordered table-striped" %) 1261 +|=Property |=Data type|=Format|=Required|=Description 1262 +|completeUrl |string |Type: uri |Yes |URL to which the customer is redirected after successfully completing the recurring card registration process. 1263 +|cancelUrl |string |Type: uri |Yes |URL to which the customer is redirected if the recurring card registration process is cancelled or abandoned. 1264 +|language |string | |Yes |Language and regional settings for the recurring card registration page. Allowed values are: sv-SE, da-DK, en-US, fi-FI, nb-NO. 1265 + 1266 +Customer's ongoing Recurring Card Registration. 1267 + 1268 +{{code language="http" title="**Response**"}} 1269 +HTTP/1.1 200 OK 1270 +Content-Type: application/json 1271 + 1272 +{ 1273 + "redirectUrl": "https://ecom.externalintegration.payex.com/checkout/abc123", 1274 + "status": "Initialized", 1275 + "operations": [], 1276 + "@id": "/ledger/customer/v1/xxx/customers/yyy/consent/recurring-card-redirect-registration" 1277 +} 1278 +{{/code}} 1279 + 1280 + 1281 +**Response object specification** 1282 + 1283 +(% class="table-bordered table-striped" %) 1284 +|=Property |=Data type|=Format|=Description 1285 +|@id |string | |Uri identifier of the current resource 1286 +|redirectUrl |string | |URL where the customer should be redirected to complete the recurring card registration process. 1287 +|status |string | |Current state of the recurring card registration process. Possible values are: (Initialized~|Completed~|Aborted~|Failed) 1288 +|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]] 1289 + 1290 +== 11. Update-kyc-answers == 1291 + 1292 + 1293 +==== 11.1 Create Update-kyc-answer ==== 1294 + 1295 +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 1296 + 1297 +{{code language="http" title="**Request**"}} 1298 +POST /ledger/customer/v1/{ownerNo}/customers/{customerNo}/update-kyc-answers HTTP/1.1 1299 +Host: - 1300 +Authorization: Bearer<Token> 1301 +Content-Type: application/json 1302 + 1303 +{ 1304 + "answers": [ 1305 + { 1306 + "questionCode": "taxable_outside_sweden", 1307 + "answerCode": "no" 1308 + }, 1309 + { 1310 + "questionCode": "multiple_citizenship", 1311 + "answerCode": "yes" 1312 + }, 1313 + { 1314 + "questionCode": "citizen_ship_country_codes", 1315 + "answerCode": "SWE" 1316 + }, 1317 + { 1318 + "questionCode": "citizen_ship_country_codes", 1319 + "answerCode": "NOR" 1320 + } 1321 + ] 1322 +} 1323 +{{/code}} 1324 + 1325 + 1326 +**Request object specification** 1327 + 1328 +(% class="table-bordered table-striped" %) 1329 +|=Property |=Data type|=Format|=Required|=Description 1330 +|=answers |array | |Yes | 1331 +| questionCode |string | |Yes |The code definition of the question 1332 +| answerCode |string | |Yes |The code definition of the answer 1333 + 1334 +{{code language="http" title="**Response**"}} 1335 +HTTP/1.1 201 CREATED 1336 +Content-Type: application/json 1337 + 1338 +{ 1339 +} 1340 +{{/code}} 1341 + 1342 + 1343 +**Possible problems** 1344 + 1345 +(% class="table-bordered table-striped" %) 1346 +|=Http status |=Problem type |=Description 1347 +|400 |validation |Occurs if the validation of the request fails, it is described in the problem why the input is invalid. 1348 +|404 |not-found |Occurs if the customer not found or if KYC is not configured on this ledger. 1349 +|409 |company-kyc-questions-not-configured |Occurs if ledger is not currently configured for KYC 1350 +|500 |fatal |Unexpected error, logs may give details about the problem 1351 + 1352 +== 12. Find-customer == 1353 + 1354 + 1355 +==== 12.1 Create Find-customer ==== 1356 + 1357 + It is used to find customer with nationalIdentifier. 1358 + 1359 +{{code language="http" title="**Request**"}} 1360 +POST /ledger/customer/v1/{ownerNo}/find-customer HTTP/1.1 1361 +Host: - 1362 +Authorization: Bearer<Token> 1363 +Content-Type: application/json 1364 + 1365 +{ 1366 + "nationalIdentifier": { 1367 + "regNo": "YYYYMMDD-NNNN", 1368 + "countryCode": "SE" 1369 + } 1370 +} 1371 +{{/code}} 1372 + 1373 + 1374 +**Request object specification** 1375 + 1376 +(% class="table-bordered table-striped" %) 1377 +|=Property |=Data type|=Format|=Required|=Description 1378 +|=nationalIdentifier |object | |No | 1379 +| regNo |string | |Yes |\\ 1380 +| countryCode |string | |No | 1381 + 1382 +Find customer with nationalIdentifier, regno and countrycode, returns CustomerNo = YYY 1383 + 1384 +{{code language="http" title="**Response**"}} 1385 +HTTP/1.1 200 OK 1386 +Content-Type: application/json 1387 + 1388 +{ 1389 + "customerNo": "YYY" 1390 +} 1391 +{{/code}} 1392 + 1393 + 1394 +**Possible problems** 1395 + 1396 +(% class="table-bordered table-striped" %) 1397 +|=Http status |=Problem type |=Description 1398 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support. 1399 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support. 1400 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support. 1401 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details. 1402 +|400 |validation |Validation error when accessing resource . Please refer to the problems property for additional details. 1403 +|400 |invalid-reg-no |Validation error when accessing resource . Please refer to the problems property for additional details. 1404 +|404 |customer-does-not-exists |The requested resource '' was not found. 1405 +|404 |customer-not-found |The requested resource '' was not found. 1406 + 1407 + 1408 +**Response object specification** 1409 + 1410 +(% class="table-bordered table-striped" %) 1411 +|=Property |=Data type|=Format|=Description 1412 +|@id |string | |Uri identifier of the current resource 1413 +|customerNo |string | |\\ 1414 + 1415 +== 13. Kyc-questions == 1416 + 1417 + 1418 +Get KYC questions from ledger using company number as identifier 1419 + 1420 +==== 13.1 Get list of Kyc-questions ==== 1421 + 1422 +{{code language="http" title="**Request**"}} 1423 +GET /ledger/customer/v1/{ownerNo}/kyc-questions?language={language} HTTP/1.1 1424 +Host: - 1425 +Authorization: Bearer<Token> 1426 +Content-Type: application/json 1427 + 1428 +{{/code}} 1429 + 1430 +Get CompanyInstance KYC questions if configured or a 404 company-kyc-questions-not-configured response if not 1431 + 1432 +{{code language="http" title="**Response**"}} 1433 +HTTP/1.1 200 OK 1434 +Content-Type: application/json 1435 + 1436 +{ 1437 + "kycQuestions": [ 1438 + { 1439 + "questionText": "What is your current employment?", 1440 + "answer": { 1441 + "type": "single", 1442 + "required": true, 1443 + "possibleAnswers": [ 1444 + { 1445 + "answerCode": "selfemployed", 1446 + "answerText": "Own business" 1447 + }, 1448 + { 1449 + "answerCode": "private_employee", 1450 + "answerText": "Private employee" 1451 + }, 1452 + { 1453 + "answerCode": "goverment_employee", 1454 + "answerText": "Government employee" 1455 + } 1456 + ] 1457 + }, 1458 + "questionCode": "employment" 1459 + }, 1460 + { 1461 + "questionText": "What is your yearly income", 1462 + "answer": { 1463 + "type": "single", 1464 + "required": true, 1465 + "possibleAnswers": [ 1466 + { 1467 + "answerCode": "incomeinterval1", 1468 + "answerText": "0-100 000 SEK" 1469 + }, 1470 + { 1471 + "answerCode": "incomeinterval2", 1472 + "answerText": "100 001-200 000 SEK" 1473 + }, 1474 + { 1475 + "answerCode": "incomeinterval3", 1476 + "answerText": "200 001-300 000 SEK" 1477 + }, 1478 + { 1479 + "answerCode": "incomeinterval4", 1480 + "answerText": "Over 300 001 SEK" 1481 + } 1482 + ] 1483 + }, 1484 + "questionCode": "income" 1485 + } 1486 + ], 1487 + "operations": [] 1488 +} 1489 +{{/code}} 1490 + 1491 + 1492 + 1493 +**Query parameters** 1494 + 1495 +(% class="table-bordered table-striped" %) 1496 +|=Name |=Required |=Description 1497 +|language |False |format ISO639-1, if not supported or none given request defaults to language code 'en'(English) 1498 + 1499 + 1500 +**Possible problems** 1501 + 1502 +(% class="table-bordered table-striped" %) 1503 +|=Http status |=Problem type |=Description 1504 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support. 1505 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support. 1506 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support. 1507 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details. 1508 +|404 |company-kyc-questions-not-configured |The requested resource '' was not found. 1509 + 1510 + 1511 +**Response object specification** 1512 + 1513 +(% class="table-bordered table-striped" %) 1514 +|=Property |=Data type|=Format|=Description 1515 +|@id |string | |Uri identifier of the current resource 1516 +|=kycQuestions |array | | 1517 +| questionCode |string | |The code definition of the question 1518 +| questionText |string | |The translated text of the question 1519 +|= answer |object | | 1520 +| type |string | |The type of the expected answer: single ~| multi ~| text 1521 +| required |boolean | |If the answer is required 1522 +| textValidationRegEx |string | |The regex the answer should match 1523 +|= possibleAnswers |array | | 1524 +| answerCode |string | |The code definition of the answer 1525 +| answerText |string | |The translated text of the answer 1526 +|= subQuestions |array | | 1527 +|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]] 1528 + 1529 +== 14. Affordability-questions == 1530 + 1531 + 1532 +Get affordability questions from ledger using company number as identifier 1533 + 1534 +==== 14.1 Get list of Affordability-questions ==== 1535 + 1536 +{{code language="http" title="**Request**"}} 1537 +GET /ledger/customer/v1/{ownerNo}/affordability-questions?language={language} HTTP/1.1 1538 +Host: - 1539 +Authorization: Bearer<Token> 1540 +Content-Type: application/json 1541 + 1542 +{{/code}} 1543 + 1544 +Get CompanyInstance affordability questions if configured. It's expected that not all credit assessment levels are configured for every company. 1545 + 1546 +{{code language="http" title="**Response**"}} 1547 +HTTP/1.1 200 OK 1548 +Content-Type: application/json 1549 + 1550 +{ 1551 + "creditAssessmentLevel1": [ 1552 + { 1553 + "questionCode": "yearly_revenue", 1554 + "questionText": "What is your yearly revenue?", 1555 + "answer": { 1556 + "type": "single", 1557 + "required": true, 1558 + "possibleAnswers": [ 1559 + { 1560 + "answerCode": "interval1", 1561 + "answerText": "0-500 000 SEK" 1562 + }, 1563 + { 1564 + "answerCode": "interval2", 1565 + "answerText": "500 001-1 000 000 SEK" 1566 + } 1567 + ] 1568 + } 1569 + } 1570 + ], 1571 + "creditAssessmentLevel2": [ 1572 + { 1573 + "questionCode": "number_of_employees", 1574 + "questionText": "How many employees does the company have?", 1575 + "answer": { 1576 + "type": "single", 1577 + "required": true, 1578 + "possibleAnswers": [ 1579 + { 1580 + "answerCode": "interval1", 1581 + "answerText": "1-10" 1582 + }, 1583 + { 1584 + "answerCode": "interval2", 1585 + "answerText": "11-50" 1586 + } 1587 + ] 1588 + } 1589 + } 1590 + ], 1591 + "operations": [] 1592 +} 1593 +{{/code}} 1594 + 1595 + 1596 + 1597 +**Query parameters** 1598 + 1599 +(% class="table-bordered table-striped" %) 1600 +|=Name |=Required |=Description 1601 +|language |False |format ISO639-1, if not supported or none given request defaults to language code 'en'(English) 1602 + 1603 + 1604 +**Possible problems** 1605 + 1606 +(% class="table-bordered table-striped" %) 1607 +|=Http status |=Problem type |=Description 1608 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support. 1609 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support. 1610 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support. 1611 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details. 1612 + 1613 + 1614 +**Response object specification** 1615 + 1616 +(% class="table-bordered table-striped" %) 1617 +|=Property |=Data type|=Format|=Description 1618 +|@id |string | |Uri identifier of the current resource 1619 +|=creditAssessmentLevel1 |array | | 1620 +| questionCode |string | |The code definition of the question 1621 +| questionText |string | |The translated text of the question 1622 +|= answer |object | | 1623 +| type |string | |The type of the expected answer: single ~| multi ~| text 1624 +| required |boolean | |If the answer is required 1625 +| textValidationRegEx |string | |The regex the answer should match 1626 +|= possibleAnswers |array | | 1627 +| answerCode |string | |The code definition of the answer 1628 +| answerText |string | |The translated text of the answer 1629 +|= subQuestions |array | | 1630 +|=creditAssessmentLevel2 |array | | 1631 +|=creditAssessmentLevel3 |array | | 1632 +|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]] 1633 + 1634 +{{display reference="developer:Main.Invoicing.ledger-api-general-docs.api-section-problems.WebHome"/}}
- Screenshot 2026-07-08 141842.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.thomashedstrom - Size
-
... ... @@ -1,0 +1,1 @@ 1 +76.0 KB - Content
- Swagger_Releases-506348.txt
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.MatsLyth - Size
-
... ... @@ -1,0 +1,1 @@ 1 +145.8 KB - Content
- 1789469234102-782.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.MatsLyth - Size
-
... ... @@ -1,0 +1,1 @@ 1 +36.6 KB - Content
- 1612164530151-211.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.dap - Size
-
... ... @@ -1,0 +1,1 @@ 1 +8.3 KB - Content
- 1789395141258-404.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.MatsLyth - Size
-
... ... @@ -1,0 +1,1 @@ 1 +75.1 KB - Content
- image260819.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.JennyEklund - Size
-
... ... @@ -1,0 +1,1 @@ 1 +69.3 KB - Content
- customerapi-2025-02.PNG
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.djr - Size
-
... ... @@ -1,0 +1,1 @@ 1 +76.7 KB - Content
- 1789469187004-133.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.MatsLyth - Size
-
... ... @@ -1,0 +1,1 @@ 1 +36.8 KB - Content
- 1789468954666-503.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.MatsLyth - Size
-
... ... @@ -1,0 +1,1 @@ 1 +94.8 KB - Content
- 1661344288319-663.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.dap - Size
-
... ... @@ -1,0 +1,1 @@ 1 +111.1 KB - Content
- Swagger_Releases-506536.txt
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.MatsLyth - Size
-
... ... @@ -1,0 +1,1 @@ 1 +150.3 KB - Content
- Swagger_Releases-502848.txt
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.JennyEklund - Size
-
... ... @@ -1,0 +1,1 @@ 1 +144.4 KB - Content
- 1789469386909-296.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.MatsLyth - Size
-
... ... @@ -1,0 +1,1 @@ 1 +86.5 KB - 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 +16.8 KB - Content
- 1789468720058-108.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.MatsLyth - Size
-
... ... @@ -1,0 +1,1 @@ 1 +47.4 KB - Content
- Swagger_Releases-499976(3).txt
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.thomashedstrom - Size
-
... ... @@ -1,0 +1,1 @@ 1 +135.5 KB - Content
- 1612164561442-820.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.dap - Size
-
... ... @@ -1,0 +1,1 @@ 1 +12.9 KB - Content
- PayEx - Ledger API's - customer.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.kxf - Size
-
... ... @@ -1,0 +1,1 @@ 1 +78.8 KB - Content
- PayEx - Ledger API's - Customer Wiki Visual.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.kxf - Size
-
... ... @@ -1,0 +1,1 @@ 1 +156.4 KB - Content
- 1789469296231-389.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.MatsLyth - Size
-
... ... @@ -1,0 +1,1 @@ 1 +48.7 KB - Content
- 1789395090901-778.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.MatsLyth - Size
-
... ... @@ -1,0 +1,1 @@ 1 +76.3 KB - Content