Changes for page 2. Customer

Last modified by Mats Lyth on 2026/09/14 16:12
From empty
To version 252.1
edited by Mats Lyth
on 2026/09/14 16:12
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.MatsLyth
Default language
... ... @@ -1,0 +1,1 @@
1 +en
Tags
... ... @@ -1,0 +1,1 @@
1 +px-custom-page-content
Content
... ... @@ -1,0 +1,1458 @@
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:1789395141258-404.png||height="883" width="632"]]
15 +
16 +
17 +Each resource in the API corresponds to its own route. All routes are structured according to a specific standard, explained below
18 +
19 +The below route is an example of a route towards resource2Id, to operate on this resource you must also include the ids of its parentresources in the route.
20 +//lf-api.payex.com/ledger/**{Subdomain}**/v1/**{LedgerNumber}**/resource1/**{resource1Id}**/resource2/**{resource2Id}**//
21 +
22 +(% class="table-bordered table-striped" %)
23 +|=(% style="width: 604px;" %)Route segment|=(% style="width: 2790px;" %)Description
24 +|(% style="width:604px" %)Subdomain|(% style="width:2790px" %)In this part of the API it will be **customer**
25 +|(% style="width:604px" %)LedgerNumber|(% style="width:2790px" %)The ledger identifier/number at PayEx
26 +|(% style="width:604px" %)resource1Id|(% style="width:2790px" %)Identifier of resource1
27 +|(% style="width:604px" %)resource2Id|(% style="width:2790px" %)identifier of resource2, subresource to resource1
28 +
29 +(% class="wikigeneratedid" %)
30 +Routes that occurs in examples of this documentation will use the following identifiers
31 +
32 +(% class="table-bordered table-striped" %)
33 +|=(% style="width: 488px;" %)Resource|=(% style="width: 2271px;" %)Identifier
34 +|(% style="width:488px" %)LedgerNumber|(% style="width:2271px" %)XXX
35 +|(% style="width:488px" %)Customer|(% style="width:2271px" %)NNN (CustomerNo)
36 +
37 += Swagger =
38 +
39 +[[Swagger.json-2026-08-19>>attach:Swagger_Releases-502848.txt]]
40 +
41 +== Changelog ==
42 +
43 +2023-01-17
44 +Added //surpluses// property to the Customer resource with planned release 2024-01-23
45 +
46 +2023-11-27
47 +Added new resource Surpluses & added a general 404 not-found to problems list.
48 +
49 +2024-04-26
50 +
51 +Added TaxIdentificationNumber to the Customer resource with planned release 2024-05-28
52 +
53 +2024-05-15
54 +
55 +Added Consent and underlying resources with planned release 2024-05-28. Updated Introduction API overview visual.
56 +
57 +2025-02-14
58 +
59 +Added operation Update-Kyc-Answers and updates to the Customer resource Operations list to reflect that. Planned release 2025-03-04
60 +
61 +Added resource Kyc-Questions. Planned release 2025-03-04
62 +
63 +2026-01-27
64 +Added new possible value for to ActiveConsents - PharmaciesSE
65 +
66 +2026-07-08
67 +Added new secontion for Trusted Seller Group Consents
68 +
69 +2026-08-19
70 +Added resource Affordability-Questions. Planned release 2026-09-22
71 +
72 +
73 +== 1. Customers ==
74 +
75 +
76 +Get a customer from ledger using customer number as identifier
77 +
78 +==== 1.1 Get specific Customer ====
79 +
80 +{{code language="http" title="**Request**"}}
81 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo} HTTP/1.1
82 +Host: -
83 +Authorization: Bearer<Token>
84 +Content-Type: application/json
85 +
86 +{{/code}}
87 +
88 +Get customer
89 +
90 +{{code language="http" title="**Response**"}}
91 +HTTP/1.1 200 OK
92 +Content-Type: application/json
93 +
94 +{
95 + "customerNo": "YYY",
96 + "nationalIdentifier": {
97 + "regNo": "YYYYMMDD-NNNN",
98 + "countryCode": "SE"
99 + },
100 + "vatNo": "SE101010101001",
101 + "legalEntity": "consumer",
102 + "name": "Test Testsson",
103 + "emailAddress": "Test@test.se",
104 + "protectedIdentity": false,
105 + "preferredLanguageCode": "SV",
106 + "legalStatus": "active",
107 + "msisdn": "+467040000000",
108 + "activeConsents": [
109 + "Betalingsservice",
110 + "Avtalegiro",
111 + "RecurringCard"
112 + ],
113 + "ediAddressInfo": {
114 + "van": "ABCXYZ",
115 + "interChangeRecipient": "Recipient_ID1",
116 + "buyerId": "123465"
117 + },
118 + "surpluses": "/ledger/customer/v1/xxx/customers/yyy/surpluses",
119 + "legalAddress": "/ledger/customer/v1/xxx/customers/yyy/legal-address",
120 + "billingAddress": "/ledger/customer/v1/xxx/customers/yyy/billing-address",
121 + "consent": "/ledger/customer/v1/xxx/customers/yyy/consent",
122 + "operations": [
123 + {
124 + "rel": "partial-update-customer",
125 + "method": "PATCH",
126 + "href": "/ledger/customer/v1/xxx/customers/yyy"
127 + },
128 + {
129 + "rel": "add-billing-address",
130 + "method": "POST",
131 + "href": "/ledger/customer/v1/xxx/customers/yyy/billing-address"
132 + },
133 + {
134 + "rel": "update-kyc-answers",
135 + "method": "POST",
136 + "href": "/ledger/customer/v1/xxx/customers/yyy/update-kyc-answers"
137 + }
138 + ],
139 + "taxIdentificationNumber": "1234567890"
140 +}
141 +{{/code}}
142 +
143 +
144 +
145 +**Possible problems**
146 +
147 +(% class="table-bordered table-striped" %)
148 +|=Http status |=Problem type |=Description
149 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support.
150 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support.
151 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support.
152 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details.
153 +|400 |validation |Validation error when accessing resource . Please refer to the problems property for additional details.
154 +|404 |customer-does-not-exists |The requested resource '' was not found.
155 +|404 |customer-not-found |The requested resource '' was not found.
156 +
157 +==== 1.2 Create Customer ====
158 +
159 +Create a new customer in ledger
160 +
161 +{{code language="http" title="**Request**"}}
162 +POST /ledger/customer/v1/{ownerNo}/customers HTTP/1.1
163 +Host: -
164 +Authorization: Bearer<Token>
165 +Content-Type: application/json
166 +
167 +
168 +{{/code}}
169 +
170 +
171 +**Request object specification**
172 +
173 +(% class="table-bordered table-striped" %)
174 +|=Property |=Data type|=Format|=Required|=Description
175 +|customerNo |string | |No |
176 +|=ediAddressInfo |object | |No |
177 +| van |string | |No |
178 +| interChangeRecipient |string | |No |
179 +| buyerId |string | |No |
180 +|emailAddress |string | |No |
181 +|=legalAddress |object | |No |
182 +| addressee |string | |No |
183 +| streetAddress |string | |No |
184 +| zipCode |string | |No |
185 +| city |string | |No |
186 +| coAddress |string | |No |
187 +| countryCode |string | |No |
188 +|=billingAddress |object | |No |
189 +|legalEntity |string | |No |
190 +|msisdn |string | |No |
191 +|name |string | |No |
192 +|=nationalIdentifier |object | |No |
193 +| regNo |string | |Yes |
194 +| countryCode |string |Pattern: ^[A-Z]{2}$ |Yes |
195 +|protectedIdentity |boolean | |Yes |
196 +|preferredLanguageCode |string | |No |
197 +|vatNo |string | |No |
198 +|distributionType |string | |No |
199 +|taxIdentificationNumber |string | |No |
200 +
201 +Create a customer response
202 +
203 +{{code language="http" title="**Response**"}}
204 +HTTP/1.1 201 Created
205 +Content-Type: application/json
206 +
207 +{
208 + "customerNo": "YYY",
209 + "@id": "/ledger/customer/v1/xxx/customers/yyy"
210 +}
211 +{{/code}}
212 +
213 +
214 +**Possible problems**
215 +
216 +(% class="table-bordered table-striped" %)
217 +|=Http status |=Problem type |=Description
218 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support.
219 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support.
220 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support.
221 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details.
222 +|400 |validation |Validation error when accessing resource . Please refer to the problems property for additional details.
223 +|400 |invalid-reg-no |Validation error when accessing resource . Please refer to the problems property for additional details.
224 +|400 |invalid-phone-no |Validation error when accessing resource . Please refer to the problems property for additional details.
225 +|422 |customer-already-exists |The requested resource '' could not be processed. Customer Already Exists
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 +**Response object specification**
695 +
696 +(% class="table-bordered table-striped" %)
697 +|=Property |=Data type|=Format|=Description
698 +|@id |string | |Uri identifier of the current resource
699 +|consentType |string | |
700 +|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]]
701 +
702 +== 5. Legal-address ==
703 +
704 +
705 +The legal address is where claims is normally sent to. It is required for a customer to have a legal address registered
706 +
707 +==== 5.1 Get list of Legal-address ====
708 +
709 +{{code language="http" title="**Request**"}}
710 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/legal-address HTTP/1.1
711 +Host: -
712 +Authorization: Bearer<Token>
713 +Content-Type: application/json
714 +
715 +{{/code}}
716 +
717 +Get customer legal-address
718 +
719 +{{code language="http" title="**Response**"}}
720 +HTTP/1.1 200 OK
721 +Content-Type: application/json
722 +
723 +{
724 + "addressee": "Test Testsson",
725 + "streetAddress": "Test street 1",
726 + "zipCode": "60000",
727 + "city": "Test town",
728 + "coAddress": "Co address",
729 + "countryCode": "SE",
730 + "operations": [
731 + {
732 + "rel": "update-legal-address",
733 + "method": "PUT",
734 + "href": "/ledger/customer/v1/xxx/customers/yyy/legal-address"
735 + },
736 + {
737 + "rel": "update-legal-address-from-population-register",
738 + "method": "POST",
739 + "href": "/ledger/customer/v1/xxx/customers/yyy/legal-address/update-legal-address-from-population-register"
740 + }
741 + ]
742 +}
743 +{{/code}}
744 +
745 +
746 +
747 +**Possible problems**
748 +
749 +(% class="table-bordered table-striped" %)
750 +|=Http status |=Problem type |=Description
751 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support.
752 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support.
753 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support.
754 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details.
755 +|400 |validation |Validation error when accessing resource . Please refer to the problems property for additional details.
756 +|404 |customer-does-not-exists |The requested resource '' was not found.
757 +|404 |customer-not-found |The requested resource '' was not found.
758 +
759 +**Response object specification**
760 +
761 +(% class="table-bordered table-striped" %)
762 +|=Property |=Data type|=Format|=Description
763 +|@id |string | |Uri identifier of the current resource
764 +|addressee |string | |
765 +|streetAddress |string | |
766 +|zipCode |string | |
767 +|city |string | |
768 +|coAddress |string | |
769 +|countryCode |string | |
770 +|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]]
771 +
772 +== 6. Update-kyc-answers ==
773 +
774 +
775 +==== 6.1 Create Update-kyc-answer ====
776 +
777 +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
778 +
779 +{{code language="http" title="**Request**"}}
780 +POST /ledger/customer/v1/{ownerNo}/customers/{customerNo}/update-kyc-answers HTTP/1.1
781 +Host: -
782 +Authorization: Bearer<Token>
783 +Content-Type: application/json
784 +
785 +{
786 + "answers": [
787 + {
788 + "questionCode": "taxable_outside_sweden",
789 + "answerCode": "no"
790 + },
791 + {
792 + "questionCode": "multiple_citizenship",
793 + "answerCode": "yes"
794 + },
795 + {
796 + "questionCode": "citizen_ship_country_codes",
797 + "answerCode": "SWE"
798 + },
799 + {
800 + "questionCode": "citizen_ship_country_codes",
801 + "answerCode": "NOR"
802 + }
803 + ]
804 +}
805 +{{/code}}
806 +
807 +
808 +**Request object specification**
809 +
810 +(% class="table-bordered table-striped" %)
811 +|=Property |=Data type|=Format|=Required|=Description
812 +|=answers |array | |Yes |
813 +| questionCode |string | |Yes |The code definition of the question
814 +| answerCode |string | |Yes |The code definition of the answer
815 +
816 +{{code language="http" title="**Response**"}}
817 +HTTP/1.1 201 CREATED
818 +Content-Type: application/json
819 +
820 +{
821 +}
822 +{{/code}}
823 +
824 +
825 +**Possible problems**
826 +
827 +(% class="table-bordered table-striped" %)
828 +|=Http status |=Problem type |=Description
829 +|400 |validation |Occurs if the validation of the request fails, it is described in the problem why the input is invalid.
830 +|404 |not-found |Occurs if the customer not found or if KYC is not configured on this ledger.
831 +|409 |company-kyc-questions-not-configured |Occurs if ledger is not currently configured for KYC
832 +|500 |fatal |Unexpected error, logs may give details about the problem
833 +
834 +== 7. Update-legal-address-from-population-register ==
835 +
836 +
837 +==== 7.1 Create Update-legal-address-from-population-register ====
838 +
839 +Execution of this operation will result in an attempt to retrieve (and replace) the customer's legal address from the population registry.
840 +
841 +{{code language="http" title="**Request**"}}
842 +POST /ledger/customer/v1/{ownerNo}/customers/{customerNo}/legal-address/update-legal-address-from-population-register HTTP/1.1
843 +Host: -
844 +Authorization: Bearer<Token>
845 +Content-Type: application/json
846 +
847 +{
848 +}
849 +{{/code}}
850 +
851 +
852 +
853 +{{code language="http" title="**Response**"}}
854 +HTTP/1.1 204 NO CONTENT
855 +Content-Type: application/json
856 +
857 +{}
858 +{{/code}}
859 +
860 +
861 +**Possible problems**
862 +
863 +(% class="table-bordered table-striped" %)
864 +|=Http status |=Problem type |=Description
865 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support.
866 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support.
867 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support.
868 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details.
869 +|400 |validation |Validation error when accessing resource . Please refer to the problems property for additional details.
870 +|404 |customer-does-not-exists |The requested resource '' was not found.
871 +|404 |customer-not-found |The requested resource '' was not found.
872 +
873 +== 8. Billing-address ==
874 +
875 +
876 +The billing address is where invoices/bills/letters etc. is normally sent to. This address is optional
877 +
878 +==== 8.1 Get list of Billing-address ====
879 +
880 +{{code language="http" title="**Request**"}}
881 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/billing-address HTTP/1.1
882 +Host: -
883 +Authorization: Bearer<Token>
884 +Content-Type: application/json
885 +
886 +{{/code}}
887 +
888 +Get customer billing-address
889 +
890 +{{code language="http" title="**Response**"}}
891 +HTTP/1.1 200 OK
892 +Content-Type: application/json
893 +
894 +{
895 + "addressee": "Test Testsson",
896 + "streetAddress": "Test street 1",
897 + "zipCode": "60000",
898 + "city": "Test town",
899 + "coAddress": "Co address",
900 + "countryCode": "SE",
901 + "operations": [
902 + {
903 + "rel": "update-billing-address",
904 + "method": "PUT",
905 + "href": "/ledger/customer/v1/xxx/customers/yyy/billing-address"
906 + },
907 + {
908 + "rel": "delete-billing-address",
909 + "method": "DELETE",
910 + "href": "/ledger/customer/v1/xxx/customers/yyy/billing-address"
911 + }
912 + ]
913 +}
914 +{{/code}}
915 +
916 +
917 +
918 +**Possible problems**
919 +
920 +(% class="table-bordered table-striped" %)
921 +|=Http status |=Problem type |=Description
922 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support.
923 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support.
924 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support.
925 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details.
926 +|400 |validation |Validation error when accessing resource . Please refer to the problems property for additional details.
927 +|404 |customer-does-not-exists |The requested resource '' was not found.
928 +|404 |customer-not-found |The requested resource '' was not found.
929 +
930 +==== 8.2 Create Billing-addre ====
931 +
932 +Add a billing address to customer. The billing address is where invoices/bills/letters etc. is normally sent to. This address is optional
933 +
934 +{{code language="http" title="**Request**"}}
935 +POST /ledger/customer/v1/{ownerNo}/customers/{customerNo}/billing-address HTTP/1.1
936 +Host: -
937 +Authorization: Bearer<Token>
938 +Content-Type: application/json
939 +
940 +{
941 + "addressee": "Test Testsson",
942 + "streetAddress": "Test street 1",
943 + "zipCode": "60000",
944 + "city": "Test town",
945 + "coAddress": "Co address",
946 + "countryCode": "SE"
947 +}
948 +{{/code}}
949 +
950 +
951 +**Request object specification**
952 +
953 +(% class="table-bordered table-striped" %)
954 +|=Property |=Data type|=Format|=Required|=Description
955 +|addressee |string | |No |
956 +|streetAddress |string | |No |
957 +|zipCode |string | |No |
958 +|city |string | |No |
959 +|coAddress |string | |No |
960 +|countryCode |string | |No |
961 +
962 +{{code language="http" title="**Response**"}}
963 +HTTP/1.1 201 CREATED
964 +Content-Type: application/json
965 +
966 +{
967 +}
968 +{{/code}}
969 +
970 +
971 +**Possible problems**
972 +
973 +(% class="table-bordered table-striped" %)
974 +|=Http status |=Problem type |=Description
975 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support.
976 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support.
977 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support.
978 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details.
979 +|400 |validation |Validation error when accessing resource . Please refer to the problems property for additional details.
980 +|404 |customer-does-not-exists |The requested resource '' was not found.
981 +|404 |customer-not-found |The requested resource '' was not found.
982 +
983 +**Response object specification**
984 +
985 +(% class="table-bordered table-striped" %)
986 +|=Property |=Data type|=Format|=Description
987 +|@id |string | |Uri identifier of the current resource
988 +|addressee |string | |
989 +|streetAddress |string | |
990 +|zipCode |string | |
991 +|city |string | |
992 +|coAddress |string | |
993 +|countryCode |string | |
994 +|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]]
995 +
996 +== 9. Consent ==
997 +
998 +
999 +Underlying resources that display information or enable registration of a customer's consent.
1000 +
1001 +==== 9.1 Get list of Consent ====
1002 +
1003 +{{code language="http" title="**Request**"}}
1004 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/consent HTTP/1.1
1005 +Host: -
1006 +Authorization: Bearer<Token>
1007 +Content-Type: application/json
1008 +
1009 +{{/code}}
1010 +
1011 +Get customer consent
1012 +
1013 +{{code language="http" title="**Response**"}}
1014 +HTTP/1.1 200 OK
1015 +Content-Type: application/json
1016 +
1017 +{
1018 + "recurringCard": "/ledger/customer/v1/xxx/customers/yyy/consent/recurring-card",
1019 + "recurringCardRedirectRegistration": "/ledger/customer/v1/xxx/customers/yyy/consent/recurring-card-redirect-registration",
1020 + "trustedSellerGroups": "/ledger/customer/v1/xxx/customers/yyy/consent/trusted-seller-groups",
1021 + "availableTrustedSellerGroupConsents": [],
1022 + "operations": [
1023 + {
1024 + "rel": "add-trusted-seller-group",
1025 + "method": "POST",
1026 + "href": "/ledger/customer/v1/xxx/customers/yyy/consent/trusted-seller-groups"
1027 + },
1028 + {
1029 + "rel": "add-recurring-card-redirect-registration",
1030 + "method": "POST",
1031 + "href": "/ledger/customer/v1/xxx/customers/yyy/consent/recurring-card-redirect-registration"
1032 + }
1033 + ]
1034 +}
1035 +{{/code}}
1036 +
1037 +
1038 +
1039 +**Response object specification**
1040 +
1041 +(% class="table-bordered table-striped" %)
1042 +|=Property |=Data type|=Format|=Description
1043 +|@id |string | |Uri identifier of the current resource
1044 +|recurringCard |dynamic | |
1045 +|recurringCardRedirectRegistration |dynamic | |
1046 +|trustedSellerGroups |dynamic | |
1047 +|=availableTrustedSellerGroupConsents |array | |
1048 +| |string | |
1049 +|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]]
1050 +
1051 +== 10. Find-customer ==
1052 +
1053 +
1054 +==== 10.1 Create Find-customer ====
1055 +
1056 + It is used to find customer with nationalIdentifier.
1057 +
1058 +{{code language="http" title="**Request**"}}
1059 +POST /ledger/customer/v1/{ownerNo}/find-customer HTTP/1.1
1060 +Host: -
1061 +Authorization: Bearer<Token>
1062 +Content-Type: application/json
1063 +
1064 +{
1065 + "nationalIdentifier": {
1066 + "regNo": "YYYYMMDD-NNNN",
1067 + "countryCode": "SE"
1068 + }
1069 +}
1070 +{{/code}}
1071 +
1072 +
1073 +**Request object specification**
1074 +
1075 +(% class="table-bordered table-striped" %)
1076 +|=Property |=Data type|=Format|=Required|=Description
1077 +|=nationalIdentifier |object | |No |
1078 +| regNo |string | |Yes |
1079 +| countryCode |string | |No |
1080 +
1081 +Find customer with nationalIdentifier, regno and countrycode, returns CustomerNo = YYY
1082 +
1083 +{{code language="http" title="**Response**"}}
1084 +HTTP/1.1 200 OK
1085 +Content-Type: application/json
1086 +
1087 +{
1088 + "customerNo": "YYY"
1089 +}
1090 +{{/code}}
1091 +
1092 +
1093 +**Possible problems**
1094 +
1095 +(% class="table-bordered table-striped" %)
1096 +|=Http status |=Problem type |=Description
1097 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support.
1098 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support.
1099 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support.
1100 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details.
1101 +|400 |validation |Validation error when accessing resource . Please refer to the problems property for additional details.
1102 +|400 |invalid-reg-no |Validation error when accessing resource . Please refer to the problems property for additional details.
1103 +|404 |customer-does-not-exists |The requested resource '' was not found.
1104 +|404 |customer-not-found |The requested resource '' was not found.
1105 +
1106 +**Response object specification**
1107 +
1108 +(% class="table-bordered table-striped" %)
1109 +|=Property |=Data type|=Format|=Description
1110 +|@id |string | |Uri identifier of the current resource
1111 +|customerNo |string | |
1112 +
1113 +== 11. Recurring-card ==
1114 +
1115 +
1116 +Get details about the customer's active Recurring Card Consent.
1117 +
1118 +==== 11.1 Get list of Recurring-card ====
1119 +
1120 +{{code language="http" title="**Request**"}}
1121 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/consent/recurring-card HTTP/1.1
1122 +Host: -
1123 +Authorization: Bearer<Token>
1124 +Content-Type: application/json
1125 +
1126 +{{/code}}
1127 +
1128 +Get customer active Recurring Card Consent.
1129 +
1130 +{{code language="http" title="**Response**"}}
1131 +HTTP/1.1 200 OK
1132 +Content-Type: application/json
1133 +
1134 +{
1135 + "cardToken": "2eb28854-07ec-4e88-b672-7c61cc54b461",
1136 + "consentExpiryDate": "04-2035",
1137 + "instrumentDisplayName": "551000******1232",
1138 + "cardExpiryDate": "04/2035",
1139 + "cardBrand": "Visa",
1140 + "operations": [
1141 + {
1142 + "rel": "delete-recurring-card",
1143 + "method": "DELETE",
1144 + "href": "/ledger/customer/v1/xxx/customers/yyy/consent/recurring-card"
1145 + }
1146 + ]
1147 +}
1148 +{{/code}}
1149 +
1150 +
1151 +
1152 +**Response object specification**
1153 +
1154 +(% class="table-bordered table-striped" %)
1155 +|=Property |=Data type|=Format|=Description
1156 +|@id |string | |Uri identifier of the current resource
1157 +|cardToken |string | |
1158 +|consentExpiryDate |string | |
1159 +|instrumentDisplayName |string | |
1160 +|cardExpiryDate |string | |
1161 +|cardBrand |string | |
1162 +|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]]
1163 +
1164 +== 12. Recurring-card-redirect-registration ==
1165 +
1166 +
1167 +Get details about the customer's ongoing Recurring Card registration.
1168 +
1169 +==== 12.1 Get list of Recurring-card-redirect-registration ====
1170 +
1171 +{{code language="http" title="**Request**"}}
1172 +GET /ledger/customer/v1/{ownerNo}/customers/{customerNo}/consent/recurring-card-redirect-registration HTTP/1.1
1173 +Host: -
1174 +Authorization: Bearer<Token>
1175 +Content-Type: application/json
1176 +
1177 +{{/code}}
1178 +
1179 +Customer's ongoing Recurring Card Registration.
1180 +
1181 +{{code language="http" title="**Response**"}}
1182 +HTTP/1.1 200 OK
1183 +Content-Type: application/json
1184 +
1185 +{
1186 + "redirectUrl": "https://ecom.externalintegration.payex.com/checkout/abc123",
1187 + "status": "Initialized",
1188 + "operations": []
1189 +}
1190 +{{/code}}
1191 +
1192 +
1193 +==== 12.2 Create Recurring-card-redirect-registration ====
1194 +
1195 +Initializes the customer's Recurring Card registration with redirect to SwedbankPay.
1196 +
1197 +{{code language="http" title="**Request**"}}
1198 +POST /ledger/customer/v1/{ownerNo}/customers/{customerNo}/consent/recurring-card-redirect-registration HTTP/1.1
1199 +Host: -
1200 +Authorization: Bearer<Token>
1201 +Content-Type: application/json
1202 +
1203 +{
1204 + "completeUrl": "https://www.google.com/search?q=cancelurl",
1205 + "cancelUrl": "https://www.google.com/search?q=completeurl",
1206 + "language": "en-US"
1207 +}
1208 +{{/code}}
1209 +
1210 +
1211 +**Request object specification**
1212 +
1213 +(% class="table-bordered table-striped" %)
1214 +|=Property |=Data type|=Format|=Required|=Description
1215 +|completeUrl |string |Type: uri |Yes |
1216 +|cancelUrl |string |Type: uri |Yes |
1217 +|language |string | |Yes |
1218 +
1219 +Customer's ongoing Recurring Card Registration.
1220 +
1221 +{{code language="http" title="**Response**"}}
1222 +HTTP/1.1 200 OK
1223 +Content-Type: application/json
1224 +
1225 +{
1226 + "redirectUrl": "https://ecom.externalintegration.payex.com/checkout/abc123",
1227 + "status": "Initialized",
1228 + "operations": [],
1229 + "@id": "/ledger/customer/v1/xxx/customers/yyy/consent/recurring-card-redirect-registration"
1230 +}
1231 +{{/code}}
1232 +
1233 +
1234 +**Response object specification**
1235 +
1236 +(% class="table-bordered table-striped" %)
1237 +|=Property |=Data type|=Format|=Description
1238 +|@id |string | |Uri identifier of the current resource
1239 +|redirectUrl |string | |
1240 +|status |string | |
1241 +|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]]
1242 +
1243 +== 13. Kyc-questions ==
1244 +
1245 +
1246 +Get KYC questions from ledger using company number as identifier
1247 +
1248 +==== 13.1 Get list of Kyc-questions ====
1249 +
1250 +{{code language="http" title="**Request**"}}
1251 +GET /ledger/customer/v1/{ownerNo}/kyc-questions?language={language} HTTP/1.1
1252 +Host: -
1253 +Authorization: Bearer<Token>
1254 +Content-Type: application/json
1255 +
1256 +{{/code}}
1257 +
1258 +Get CompanyInstance KYC questions if configured or a 404 company-kyc-questions-not-configured response if not
1259 +
1260 +{{code language="http" title="**Response**"}}
1261 +HTTP/1.1 200 OK
1262 +Content-Type: application/json
1263 +
1264 +{
1265 + "kycQuestions": [
1266 + {
1267 + "questionText": "What is your current employment?",
1268 + "answer": {
1269 + "type": "single",
1270 + "required": true,
1271 + "possibleAnswers": [
1272 + {
1273 + "answerCode": "selfemployed",
1274 + "answerText": "Own business"
1275 + },
1276 + {
1277 + "answerCode": "private_employee",
1278 + "answerText": "Private employee"
1279 + },
1280 + {
1281 + "answerCode": "goverment_employee",
1282 + "answerText": "Government employee"
1283 + }
1284 + ]
1285 + },
1286 + "questionCode": "employment"
1287 + },
1288 + {
1289 + "questionText": "What is your yearly income",
1290 + "answer": {
1291 + "type": "single",
1292 + "required": true,
1293 + "possibleAnswers": [
1294 + {
1295 + "answerCode": "incomeinterval1",
1296 + "answerText": "0-100 000 SEK"
1297 + },
1298 + {
1299 + "answerCode": "incomeinterval2",
1300 + "answerText": "100 001-200 000 SEK"
1301 + },
1302 + {
1303 + "answerCode": "incomeinterval3",
1304 + "answerText": "200 001-300 000 SEK"
1305 + },
1306 + {
1307 + "answerCode": "incomeinterval4",
1308 + "answerText": "Over 300 001 SEK"
1309 + }
1310 + ]
1311 + },
1312 + "questionCode": "income"
1313 + }
1314 + ],
1315 + "operations": []
1316 +}
1317 +{{/code}}
1318 +
1319 +
1320 +
1321 +**Query parameters**
1322 +
1323 +(% class="table-bordered table-striped" %)
1324 +|=Name |=Required |=Description
1325 +|language |False |format ISO639-1, if not supported or none given request defaults to language code 'en'(English)
1326 +
1327 +**Possible problems**
1328 +
1329 +(% class="table-bordered table-striped" %)
1330 +|=Http status |=Problem type |=Description
1331 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support.
1332 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support.
1333 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support.
1334 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details.
1335 +|404 |company-kyc-questions-not-configured |The requested resource '' was not found.
1336 +
1337 +**Response object specification**
1338 +
1339 +(% class="table-bordered table-striped" %)
1340 +|=Property |=Data type|=Format|=Description
1341 +|@id |string | |Uri identifier of the current resource
1342 +|=kycQuestions |array | |
1343 +| questionCode |string | |The code definition of the question
1344 +| questionText |string | |The translated text of the question
1345 +|= answer |object | |
1346 +| type |string | |The type of the expected answer: single ~| multi ~| text
1347 +| required |boolean | |If the answer is required
1348 +| textValidationRegEx |string | |The regex the answer should match
1349 +|= possibleAnswers |array | |
1350 +| answerCode |string | |The code definition of the answer
1351 +| answerText |string | |The translated text of the answer
1352 +|= subQuestions |array | |
1353 +|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]]
1354 +
1355 +== 14. Affordability-questions ==
1356 +
1357 +
1358 +Get affordability questions from ledger using company number as identifier
1359 +
1360 +==== 14.1 Get list of Affordability-questions ====
1361 +
1362 +{{code language="http" title="**Request**"}}
1363 +GET /ledger/customer/v1/{ownerNo}/affordability-questions?language={language} HTTP/1.1
1364 +Host: -
1365 +Authorization: Bearer<Token>
1366 +Content-Type: application/json
1367 +
1368 +{{/code}}
1369 +
1370 +Get CompanyInstance affordability questions if configured. It's expected that not all credit assessment levels are configured for every company.
1371 +
1372 +{{code language="http" title="**Response**"}}
1373 +HTTP/1.1 200 OK
1374 +Content-Type: application/json
1375 +
1376 +{
1377 + "creditAssessmentLevel1": [
1378 + {
1379 + "questionCode": "yearly_revenue",
1380 + "questionText": "What is your yearly revenue?",
1381 + "answer": {
1382 + "type": "single",
1383 + "required": true,
1384 + "possibleAnswers": [
1385 + {
1386 + "answerCode": "interval1",
1387 + "answerText": "0-500 000 SEK"
1388 + },
1389 + {
1390 + "answerCode": "interval2",
1391 + "answerText": "500 001-1 000 000 SEK"
1392 + }
1393 + ]
1394 + }
1395 + }
1396 + ],
1397 + "creditAssessmentLevel2": [
1398 + {
1399 + "questionCode": "number_of_employees",
1400 + "questionText": "How many employees does the company have?",
1401 + "answer": {
1402 + "type": "single",
1403 + "required": true,
1404 + "possibleAnswers": [
1405 + {
1406 + "answerCode": "interval1",
1407 + "answerText": "1-10"
1408 + },
1409 + {
1410 + "answerCode": "interval2",
1411 + "answerText": "11-50"
1412 + }
1413 + ]
1414 + }
1415 + }
1416 + ],
1417 + "operations": []
1418 +}
1419 +{{/code}}
1420 +
1421 +
1422 +
1423 +**Query parameters**
1424 +
1425 +(% class="table-bordered table-striped" %)
1426 +|=Name |=Required |=Description
1427 +|language |False |format ISO639-1, if not supported or none given request defaults to language code 'en'(English)
1428 +
1429 +**Possible problems**
1430 +
1431 +(% class="table-bordered table-striped" %)
1432 +|=Http status |=Problem type |=Description
1433 +|500 |internal-server-error |The requested resource '' could not be processed. Please contact support.
1434 +|500 |handled-exception |The requested resource '' could not be processed. Please contact support.
1435 +|500 |unhandled-exception |The requested resource '' could not be processed. Please contact support.
1436 +|400 |general-validation-error |Validation error when accessing resource . Please refer to the problems property for additional details.
1437 +
1438 +**Response object specification**
1439 +
1440 +(% class="table-bordered table-striped" %)
1441 +|=Property |=Data type|=Format|=Description
1442 +|@id |string | |Uri identifier of the current resource
1443 +|=creditAssessmentLevel1 |array | |
1444 +| questionCode |string | |The code definition of the question
1445 +| questionText |string | |The translated text of the question
1446 +|= answer |object | |
1447 +| type |string | |The type of the expected answer: single ~| multi ~| text
1448 +| required |boolean | |If the answer is required
1449 +| textValidationRegEx |string | |The regex the answer should match
1450 +|= possibleAnswers |array | |
1451 +| answerCode |string | |The code definition of the answer
1452 +| answerText |string | |The translated text of the answer
1453 +|= subQuestions |array | |
1454 +|=creditAssessmentLevel2 |array | |
1455 +|=creditAssessmentLevel3 |array | |
1456 +|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]]
1457 +
1458 +{{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
1789395141258-404.png
Author
... ... @@ -1,0 +1,1 @@
1 +xwiki:XWiki.MatsLyth
Size
... ... @@ -1,0 +1,1 @@
1 +75.1 KB
Content
image260819.png
Author
... ... @@ -1,0 +1,1 @@
1 +xwiki:XWiki.JennyEklund
Size
... ... @@ -1,0 +1,1 @@
1 +69.3 KB
Content
customerapi-2025-02.PNG
Author
... ... @@ -1,0 +1,1 @@
1 +xwiki:XWiki.djr
Size
... ... @@ -1,0 +1,1 @@
1 +76.7 KB
Content
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
1789395090901-778.png
Author
... ... @@ -1,0 +1,1 @@
1 +xwiki:XWiki.MatsLyth
Size
... ... @@ -1,0 +1,1 @@
1 +76.3 KB
Content