Changes for page 2. Customer

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