Changes for page 2. Customer

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