Changes for page 2. Customer

Last modified by thomas hedstrom on 2026/07/08 15:00
From empty
To version 245.1
edited by thomas hedstrom
on 2026/07/08 15:00
Change comment: There is no comment for this version

Summary

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