Changes for page ../credit-account

Last modified by David Persson on 2022/08/11 10:52
From empty
To version 120.1
edited by David Persson
on 2020/02/13 12:09
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,0 +1,1 @@
1 +../credit-account
Parent
... ... @@ -1,0 +1,1 @@
1 +Main.credit-account.api.WebHome
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.XWikiGuest
1 +xwiki:XWiki.dap
Default language
... ... @@ -1,0 +1,1 @@
1 +en
Tags
... ... @@ -1,0 +1,1 @@
1 +px-custom-page-content
Content
... ... @@ -1,0 +1,768 @@
1 +(% class="jumbotron" %)
2 +(((
3 +(% class="container" %)
4 +(((
5 +Integrate to **PayEx Credit Account API **
6 +)))
7 +)))
8 +
9 +(% class="box errormessage" %)
10 +(((
11 +Todo: Saknar operation för att hitta konton som tillhör en person/ett personnummer
12 +)))
13 +
14 +(% id="HChangelog" %)
15 += Changelog =
16 +
17 +2020-02-13
18 +
19 +* Changed name on resource **recurring-payment-setting** to **recurring-payment-configuration**
20 +* Adjusted propertynames om resource recurring-payment-configuration
21 +recurringPaymentMethod -> paymentMethod
22 +recurringPaymentScope -> paymentScope
23 +fixedRecurringAmount -> fixedAmount
24 +
25 +2020-02-06
26 +Added resource "active-payment-orders"
27 +
28 +2020-01-31
29 +renamed resource "recurring-payment-consent" to "recurring-payment-setting" (not implemented in API yet)
30 +
31 +(% class="lead" %)
32 +This api is used to retrieve information and to change properties related to the customer's credit account.
33 +
34 +[[image:1581025117966-675.png||height="416" width="433"]]
35 +
36 +(% id="HRoutesegments" %)
37 +== Introduction ==
38 +
39 +Each resource in the API corresponds to its own route. All routes are structured according to a specific standard, explained below
40 +
41 +The below route is an example of a route towards resource3Id, to operate on this resource you must also include the ids of its parentresources in the route.
42 +//api.payex.com/ledger/**{Subdomain}**/v1/**{LedgerNumber}**/resource1/**{resource1Id}**/resource2/**{resource2Id}**/resource3/**{resource3Id}**//
43 +
44 +(% class="table-bordered table-striped" %)
45 +|=(% style="width: 604px;" %)Route segment|=(% style="width: 2790px;" %)Description
46 +|(% style="width:604px" %)Subdomain|(% style="width:2790px" %)In this part of the API it will be credit-account
47 +|(% style="width:604px" %)LedgerNumber|(% style="width:2790px" %)The ledger identifier/number at PayEx
48 +|(% style="width:604px" %)resource1Id|(% style="width:2790px" %)Identifier of resource1
49 +|(% style="width:604px" %)resource2Id|(% style="width:2790px" %)identifier of resource2, subresource to resource1
50 +|(% style="width:604px" %)resource3Id|(% style="width:2790px" %)identifier of resource3, subresource to resource2
51 +
52 +(% class="wikigeneratedid" %)
53 +Routes that occurs in examples of this documentation will use the following identifiers
54 +
55 +(% class="table-bordered table-striped" %)
56 +|=(% style="width: 488px;" %)Resource|=(% style="width: 2271px;" %)Identifier
57 +|(% style="width:488px" %)LedgerNumber|(% style="width:2271px" %)XXX
58 +|(% style="width:488px" %)Accounts|(% style="width:2271px" %)NNN
59 +|(% style="width:488px" %)Bills|(% style="width:2271px" %)reminder-123
60 +bill-456
61 +|(% style="width:488px" %)Cards|(% style="width:2271px" %)954c8699-b38f-47a2-b568-668b8837dad8
62 +274c8699-b38f-47a2-b568-668b8837dat7
63 +
64 +== Accounts ==
65 +
66 +The **accounts** resource is located under **ledger/credit-account/v1/ **api**. **The accounts- and its sub-resources are used to create, read and modify information related to a credit-account.
67 +The accounts resource provides an overview of the end customer's account, it contains information such as current balance, credit limit etc. The resource also contains URIs for additional sub-resources such as bills, cards, recurring payments, etc.
68 +
69 +The following operations is supported
70 +
71 +* Change the account credit limit
72 +* Add extra cards
73 +* Request cancellation of account
74 +* Turn on/off charity donation
75 +* Set behaviour of recurring payments
76 +
77 +==== Get a specific account ====
78 +
79 +==== ====
80 +
81 +{{code language="http" title="**Request**"}}
82 +GET /ledger/credit-account/v1/XXX/accounts/NNN HTTP/1.1
83 +Host: -
84 +Authorization: Bearer <Token>
85 +Content-Type: application/json
86 +{{/code}}
87 +
88 +
89 +{{code language="http" title="**Response**"}}
90 +HTTP/1.1 200 OK
91 +Content-Type: application/json
92 +
93 +{
94 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN",
95 + "accountNo": "1234567",
96 + "startDate": "2018-05-21",
97 + "description": null,
98 + "accountProfileType": "accountType1 | accountType2 | accountType3 etc.",
99 + "accountAlias" : "accountAlias1 | accountAlias2 etc.",
100 + "customerNo" : "123789654",
101 + "status" : "open | pending-close | closed",
102 + "creditLimit": 2000.00,
103 + "totalBalance" : -1900.0,
104 + "reservedAmount": 50.0,
105 + "availableAmount": 50.0,
106 + "openBill" : "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-456",
107 + "charityDonation": true,
108 + "interestRate": {
109 + "debtInterest" : 10.00,
110 + "penaltyInterest": 15.00
111 + },
112 + "bankPayment": {
113 + "bankAccountNo": "123",
114 + "bankAccountType": "BGSE",
115 + "bic": "123456",
116 + "iban": "SE12345678945631",
117 + "paymentReference": "54867165675646"
118 + },
119 + "activePaymentOrders": "/ledger/credit-account/v1/XXX/accounts/NNN/active-payment-orders",
120 + "recurringPaymentSetting": "/ledger/credit-account/v1/XXX/accounts/NNN/recurring-payment-setting",
121 + "cards": "/ledger/credit-account/v1/XXX/accounts/123456/cards",
122 + "transactions": "/ledger/credit-account/v1/XXX/accounts/NNN/transactions",
123 + "currency": "sek",
124 + "bills": "/ledger/credit-account/v1/XXX/accounts/NNN/bills",
125 + "customer": "/ledger/customers/v1/XXX/customer/123456",
126 + "operation" : [
127 + {
128 + "rel" : "add-card-info",
129 + "method" : "post",
130 + "href" : "/ledger/credit-account/v1/XXX/accounts/NNN/cards"
131 + },
132 + {
133 + "rel" : "request-close-account",
134 + "method" : "post",
135 + "href" : "/ledger/credit-account/v1/XXX/accounts/NNN/request-close-account"
136 + },
137 + {
138 + "rel" : "apply-for-raised-credit-limit",
139 + "method" : "post",
140 + "href" : "/ledger/credit-account-onboardings/v1/XXX/accounts/NNN/apply-for-raised-credit-limit"
141 + },
142 + {
143 + "rel" : "partial-update",
144 + "method" : "patch",
145 + "href" : "/ledger/credit-account-onboardings/v1/XXX/accounts/NNN"
146 + }
147 + ]
148 +}
149 +{{/code}}
150 +
151 +==== Account resource properties ====
152 +
153 +(% class="table-bordered table-striped" %)
154 +|=(% style="width: 215px;" %)Property|=(% style="width: 114px;" %)Data type|=(% style="width: 161px;" %)Format|=(% style="width: 61px;" %)Modify (patch)|=(% style="width: 877px;" %)Description
155 +|(% style="width:215px" %)@id |(% style="width:114px" %)string|(% style="width:161px" %)Maxlength: |(% style="width:61px" %) |(% style="width:877px" %)Uri of the specific account
156 +|(% style="width:215px" %)accountNo |(% style="width:114px" %)string|(% style="width:161px" %)Maxlength: 50|(% style="width:61px" %) |(% style="width:877px" %)The identifier of the account
157 +|(% style="width:215px" %)startDate |(% style="width:114px" %)date|(% style="width:161px" %)[[ISO 8601>>url:http://en.wikipedia.org/wiki/ISO_8601||rel="noreferrer" title="ISO8601 on Wikipedia"]]|(% style="width:61px" %) |(% style="width:877px" %)Date when the account was started
158 +|(% style="width:215px" %)description |(% style="width:114px" %)string|(% style="width:161px" %)Maxlength: 200|(% style="width:61px" %) |(% style="width:877px" %)A description of the type of account
159 +|(% style="width:215px" %)accountProfileType |(% style="width:114px" %)string|(% style="width:161px" %)Maxlength: 50|(% style="width:61px" %) |(% style="width:877px" %)The defined code of the accounttype, //Examples: kontodebet, kontokredit, kontofaktura//
160 +|(% style="width:215px" %)accountAlias |(% style="width:114px" %)string|(% style="width:161px" %)Maxlength: 50|(% style="width:61px" %) |(% style="width:877px" %)A descriptive name for the account type, //Examples: kontokredit1, matkonto1//
161 +|(% style="width:215px" %)customerNo |(% style="width:114px" %)string|(% style="width:161px" %)Maxlength: 50|(% style="width:61px" %) |(% style="width:877px" %)Identifier of the customer (account owner)
162 +|(% style="width:215px" %)status |(% style="width:114px" %)string|(% style="width:161px" %)Maxlength: 25|(% style="width:61px" %) |(% style="width:877px" %)Status of the account(((
163 +* **pending-close**: the customer has requested the account to be closed, the account will be closed when possible.
164 +* **open**: the account is open and active
165 +* **closed**: the account has been closed
166 +)))
167 +|(% style="width:215px" %)creditLimit |(% style="width:114px" %)decimal|(% style="width:161px" %) |(% style="background-color:palegreen; width:61px" %) |(% style="width:877px" %)The creditlimit of the account, support patch operation but only lower
168 +|(% style="width:215px" %)totalBalance|(% style="width:114px" %)decimal|(% style="width:161px" %) |(% style="width:61px" %) |(% style="width:877px" %)Total current sum of all balances (including capital / interest / fees, etc.)
169 +|(% style="width:215px" %)reservedAmount |(% style="width:114px" %)decimal|(% style="width:161px" %) |(% style="width:61px" %) |(% style="width:877px" %)Sum of all outstanding reservations (which are valid and not captured)
170 +|(% style="width:215px" %)availableAmount |(% style="width:114px" %)decimal|(% style="width:161px" %) |(% style="width:61px" %) |(% style="width:877px" %)Available credit (cannot be calculated from the above amounts as fees can be included there, which does not affect available credit)
171 +|(% style="width:215px" %)openBill|(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
172 +|(% style="width:215px" %)charityDonation |(% style="width:114px" %)bool|(% style="width:161px" %) |(% style="background-color:palegreen; width:61px" %) |(% style="width:877px" %)If donations should be made from the account
173 +|(% style="width:215px" %)interestRate.debtInterest|(% style="width:114px" %)decimal|(% style="width:161px" %)Percentage|(% style="width:61px" %) |(% style="width:877px" %)yearly debt interestrate
174 +|(% style="width:215px" %)interestRate.penaltyInterest|(% style="width:114px" %)decimal|(% style="width:161px" %)Percentage|(% style="width:61px" %) |(% style="width:877px" %)yearly penalty interestrate
175 +|(% style="width:215px" %)recurringPaymentConsent|(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
176 +|(% style="width:215px" %)cards |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
177 +|(% style="width:215px" %)transactions |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
178 +|(% style="width:215px" %)currency |(% style="width:114px" %)string|(% style="width:161px" %)[[ISO 4217>>https://sv.wikipedia.org/wiki/ISO_4217]]|(% style="width:61px" %) |(% style="width:877px" %)
179 +|(% style="width:215px" %)bills |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
180 +|(% style="width:215px" %)customer |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
181 +|(% style="width:337px" %)activePaymentOrder.paymentMethod|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 15|(% style="width:61px" %)(((
182 +
183 +)))|(% style="width:877px" %)(((
184 +PaymentTypes:
185 +
186 +* AUTOGIRO
187 +)))
188 +|(% style="width:337px" %)activePaymentOrder.executionDate|(% style="width:205px" %)date|(% style="width:208px" %)[[ISO 8601>>url:http://en.wikipedia.org/wiki/ISO_8601||rel="noreferrer" title="ISO8601 on Wikipedia"]]|(% style="width:61px" %) |(% style="width:877px" %)Date when the paymentorder will be executed (when end-customer will be debited)
189 +|(% style="width:337px" %)activePaymentOrder.amount|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:61px" %) |(% style="width:877px" %)Amount that will be charged, this amount may be adjusted when the payment order is executed, if the "amount to pay" on the bill has decreased
190 +|(% style="width:215px" %) |(% style="width:114px" %) |(% style="width:161px" %) |(% style="width:61px" %) |(% style="width:877px" %)
191 +
192 +== Bills ==
193 +
194 +The bills resources contains all the documents produced in the accounts billing cycle.
195 +
196 +
197 +==== List all bills of an account ====
198 +
199 +
200 +{{code language="http" title="**Request**"}}
201 +GET /ledger/credit-account/v1/XXX/accounts/NNN/bills HTTP/1.1
202 +Host: -
203 +Authorization: Bearer <Token>
204 +Content-Type: application/json
205 +
206 +{{/code}}
207 +
208 +
209 +{{code language="http" title="**Response**"}}
210 +HTTP/1.1 200 OK
211 +Content-Type: application/json
212 +
213 +{
214 + "@id": "/ledger/credit-account/v1/501/accounts/NNN/bills?status=open",
215 + "items" : [
216 + {
217 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-123645",
218 + "dueDate": "2018-12-05",
219 + "billDate": "2018-11-15",
220 + "billNo": "124645",
221 + "billAmount": 240.00,
222 + "billType" : "reminder",
223 + "status": "open",
224 + "activePaymentDetails": {
225 + "minimumAmountToBePayed": 240.00,
226 + "bankAccountNo": "123",
227 + "bankAccountType": "BGSE",
228 + "bic": "123456",
229 + "iban": "SE12345678945631",
230 + "paymentReference": "5465164654663",
231 + "paymentOrdersExists": true,
232 + },
233 + "document": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-124645/document"
234 + },
235 + {
236 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-123645",
237 + "dueDate": "2018-12-05",
238 + "billDate": "2018-11-15",
239 + "billNo": "124645",
240 + "billAmount": 240.00,
241 + "billType" : "bill",
242 + "status": "closed",
243 + "activePaymentDetails": null,
244 + "document": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-124645/document"
245 + },
246 + {
247 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/bill-123645",
248 + "dueDate": "2018-12-05",
249 + "billDate": "2018-11-15",
250 + "billNo": "124645",
251 + "billAmount": 240.00,
252 + "billType" : "bill",
253 + "status": "closed",
254 + "activePaymentDetails": null,
255 + "document": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-124645/document"
256 + }
257 + ]
258 +}
259 +{{/code}}
260 +
261 +==== ====
262 +
263 +==== Get specific bill ====
264 +
265 +
266 +{{code language="http" title="**Request**"}}
267 +GET /ledger/credit-account/v1/XXX/accounts/NNN/bills/456 HTTP/1.1
268 +Host: -
269 +Authorization: Bearer <Token>
270 +Content-Type: application/json
271 +
272 +{{/code}}
273 +
274 +
275 +{{code language="http" title="**Response**"}}
276 +HTTP/1.1 200 OK
277 +Content-Type: application/json
278 +
279 +{
280 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-123645",
281 + "dueDate": "2018-12-05",
282 + "billDate": "2018-11-15",
283 + "billNo": "124645",
284 + "billAmount": 240.00,
285 + "billType" : "reminder",
286 + "status": "open",
287 + "activePaymentDetails": {
288 + "minimumAmountToBePayed": 240.00,
289 + "bankAccountNo": "123",
290 + "bankAccountType": "BGSE",
291 + "bic": "123456",
292 + "iban": "SE12345678945631",
293 + "paymentReference": "5465164654663",
294 + "paymentOrdersExists": true,
295 + },
296 + "document": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-124645/document"
297 +}
298 +{{/code}}
299 +
300 +==== Bill resource properties ====
301 +
302 +(% class="table-bordered table-striped" %)
303 +|=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 621px;" %)Description
304 +|(% style="width:337px" %)@id|(% style="width:205px" %)string|(% style="width:208px" %)Uri|(% style="width:621px" %)
305 +|(% style="width:337px" %)dueDate|(% style="width:205px" %)date|(% style="width:208px" %)[[ISO 8601>>url:http://en.wikipedia.org/wiki/ISO_8601||rel="noreferrer" title="ISO8601 on Wikipedia"]]|(% style="width:621px" %)
306 +|(% style="width:337px" %)billDate|(% style="width:205px" %)date|(% style="width:208px" %) |(% style="width:621px" %)Date when bill was created
307 +|(% style="width:337px" %)billNo|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 50|(% style="width:621px" %)The identifier of the bill
308 +|(% style="width:337px" %)billAmount|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %)the amount that is stated on the actual bill/document
309 +|(% style="width:337px" %)billType|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 25|(% style="width:621px" %)(((
310 +BillTypes:
311 +
312 +* Bill
313 +* Reminder1
314 +* Reminder2
315 +* Collection
316 +)))
317 +|(% style="width:337px" %)status|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:621px" %)"open" / "closed"
318 +|(% style="width:337px" %)activePaymentDetails|(% style="width:205px" %)object|(% style="width:208px" %) |(% style="width:621px" %)only set if status of bill is "open"
319 +|(% style="width:337px" %)activePaymentDetails.minimumAmountToBePayed|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %)The least amount to pay on the bill
320 +|(% style="width:337px" %)activePaymentDetails.bankAccountNo|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 15|(% style="width:621px" %)bankaccount for payment
321 +|(% style="width:337px" %)activePaymentDetails.bankAccountType|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 10|(% style="width:621px" %)BankAccountTypes:(((
322 +* BKSE (swedish bankaccount)
323 +* PKSE (swedish plusgiro)
324 +* BGSE (swedish bankgiro)
325 +* PGSE (swedish plusgiro OCR)
326 +)))
327 +|(% style="width:337px" %)activePaymentDetails.bic|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 11|(% style="width:621px" %)Bank Identifier Code (BIC)
328 +|(% style="width:337px" %)activePaymentDetails.iban|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 34|(% style="width:621px" %)International Bank Account Number (IBAN)
329 +|(% style="width:337px" %)activePaymentDetails.paymentReference|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 50|(% style="width:621px" %)reference to specify on the payment
330 +|(% style="width:337px" %)activePaymentDetails.paymentOrdersExists|(% style="width:205px" %)bool|(% style="width:208px" %) |(% style="width:621px" %)if there is an active payment order to be executed related to this bill for "recurring payments".
331 +//More detailed information about the payment order can be found on the accounts resource//
332 +|(% style="width:337px" %)document|(% style="width:205px" %)string|(% style="width:208px" %)Url|(% style="width:621px" %)Url to download pdf document
333 +
334 +== Cards ==
335 +
336 +==== Add card to account ====
337 +
338 +Execute http post towards this resource to add a new card to the specified account
339 +
340 +{{code language="http" title="**Request**"}}
341 +POST /ledger/credit-account/v1/XXX/accounts/NNN/cards HTTP/1.1
342 +Host: -
343 +Authorization: Bearer <Token>
344 +Content-Type: application/json
345 +
346 +{
347 + "token": "954c8699-b38f-47a2-b568-668b8837dad8",
348 + "PanTrunc": "85479*********648",
349 + "deleted" : false,
350 + "mainCard": true,
351 + "cardHolder" : {
352 + "number" : "123465",
353 + "name": "test testsson",
354 + "nationalConsumerIdentifier": {
355 + "value": "19101010-1010",
356 + "countryCode": "SE"
357 + }
358 + }
359 +}
360 +{{/code}}
361 +
362 +==== List cards on an account ====
363 +
364 +{{code language="http" title="**Request**"}}
365 +GET /ledger/credit-account/v1/XXX/accounts/NNN/cards HTTP/1.1
366 +Host: -
367 +Authorization: Bearer <Token>
368 +Content-Type: application/json
369 +
370 +
371 +{{/code}}
372 +
373 +
374 +{{code language="http" title="**Response**"}}
375 +HTTP/1.1 200 OK
376 +Content-Type: application/json
377 +
378 +{
379 + "operations": null,
380 + "items": [
381 + {
382 + "token": "954c8699-b38f-47a2-b568-668b8837dad8",
383 + "PanTrunc": "85479*********648",
384 + "deleted" : false,
385 + "mainCard": true,
386 + "cardHolder" : {
387 + "number" : "123465",
388 + "name": "test testsson",
389 + "nationalConsumerIdentifier": {
390 + "value": "19101010-1010",
391 + "countryCode": "SE"
392 + }
393 + },
394 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/cards/741"
395 + },
396 + {
397 + "token": "274c8699-b38f-47a2-b568-668b8837dat7",
398 + "PanTrunc": "78979*********321",
399 + "deleted" : false,
400 + "mainCard": false,
401 + "cardHolder" : {
402 + "number" : "987654",
403 + "name": "test testsson",
404 + "nationalConsumerIdentifier": {
405 + "value": "19101010-1010",
406 + "countryCode": "SE"
407 + }
408 + },
409 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/cards/274c8699-b38f-47a2-b568-668b8837dat7"
410 + }
411 + ],
412 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/cards",
413 + "view": {
414 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/cards?$top=2&$skip=0",
415 + "next": "/ledger/credit-account/v1/XXX/accounts/NNN/cards?$top=2&$skip=2"
416 + }
417 +}
418 +{{/code}}
419 +
420 +==== Get a specific card ====
421 +
422 +
423 +{{code language="http" title="**Request**"}}
424 +GET /ledger/credit-account/v1/XXX/accounts/NNN/cards/954c8699-b38f-47a2-b568-668b8837dad8 HTTP/1.1
425 +Host: -
426 +Authorization: Bearer <Token>
427 +Content-Type: application/json
428 +
429 +
430 +{{/code}}
431 +
432 +{{code language="http" title="**Response**"}}
433 +HTTP/1.1 200 OK
434 +Content-Type: application/json
435 +
436 +{
437 + "token": "954c8699-b38f-47a2-b568-668b8837dad8",
438 + "PanTrunc": "85479*********648",
439 + "deleted" : false,
440 + "mainCard": true,
441 + "cardHolder" : {
442 + "number" : "123465",
443 + "name": "test testsson",
444 + "nationalConsumerIdentifier": {
445 + "value": "19101010-1010",
446 + "countryCode": "SE"
447 + }
448 + },
449 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/cards/954c8699-b38f-47a2-b568-668b8837dad8",
450 + "parentHREF": "/ledger/credit-account/v1/XXX/accounts/NNN",
451 + "operation" : [
452 + {
453 + "rel" : "partial-update",
454 + "method" : "patch",
455 + "href" : "/ledger/credit-account/v1/XXX/accounts/NNN/cards/954c8699-b38f-47a2-b568-668b8837dad8"
456 + }
457 + ]
458 +}
459 +{{/code}}
460 +
461 +==== Card resource properties ====
462 +
463 +(% class="table-bordered table-striped" %)
464 +|=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 62px;" %)Modify (patch)|=(% style="width: 1401px;" %)Description
465 +|(% style="width:337px" %)token|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)token identifier of the card
466 +|(% style="width:337px" %)panTrunc|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)truncated PAN
467 +|(% style="width:337px" %)deleted|(% style="width:205px" %)bool|(% style="width:208px" %) |(% style="background-color:palegreen; width:62px" %) |(% style="width:1401px" %)indicates wheter the card has been deleted
468 +|(% style="width:337px" %)mainCard|(% style="width:205px" %)bool|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)indicated whether this card is the main card of the account (cardholder is always owner of account)
469 +|(% style="width:337px" %)cardHolder.number|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)Cardholder customernumber
470 +|(% style="width:337px" %)cardHolder.name|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)Cardholder fullname
471 +|(% style="width:337px" %)cardHolder.nationalConsumerIdentifier.value|(% style="width:205px" %)string|(% style="width:208px" %)YYYYMMDD-NNNC|(% style="width:62px" %) |(% style="width:1401px" %)
472 +|(% style="width:337px" %)cardHolder.nationalConsumerIdentifier.countryCode|(% style="width:205px" %)string|(% style="width:208px" %)[[ISO 3166-1 alpha-2>>url:https://sv.wikipedia.org/wiki/ISO_3166]]|(% style="width:62px" %) |(% style="width:1401px" %)
473 +
474 +== Transactions ==
475 +
476 +==== List transactions on an account ====
477 +
478 +{{code language="http" title="**Request**"}}
479 +GET /ledger/credit-account/v1/XXX/accounts/NNN/transactions HTTP/1.1
480 +Host: -
481 +Authorization: Bearer <Token>
482 +Content-Type: application/json
483 +
484 +
485 +{{/code}}
486 +
487 +
488 +{{code language="http" title="**Response**"}}
489 +HTTP/1.1 200 OK
490 +Content-Type: application/json
491 +
492 +{
493 + "operations": null,
494 + "items": [
495 + {
496 + "type": "payment",
497 + "description": "",
498 + "amount": 200.00,
499 + "billed": false|true,
500 + "date": "2019-10-09",
501 + "reserveDate": null
502 + },
503 + {
504 + "type": "purchase",
505 + "description": "testbutiken, köpref. 12345689",
506 + "amount": 200.00,
507 + "billed": false|true,
508 + "date": "2019-10-09",
509 + "reserveDate": "2019-10-05",
510 + },
511 + {
512 + "type": "credit",
513 + "description": "",
514 + "amount": 200.00,
515 + "billed": false|true,
516 + "date": "2019-10-09",
517 + "reserveDate": "2019-10-05"
518 + }
519 + ],
520 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/transactions?fromDate=2019-10-01",
521 + "view": {
522 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/transactions?fromDate=2019-10-01&$top=2&$skip=0",
523 + "next": "/ledger/credit-account/v1/XXX/accounts/NNN/transactions?fromDate=2019-10-01&$top=2&$skip=2"
524 + }
525 +}
526 +{{/code}}
527 +
528 +==== Transaction resource properties ====
529 +
530 +(% class="table-bordered table-striped" %)
531 +|=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 621px;" %)Description
532 +|(% style="width:337px" %)type|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:621px" %)(((
533 +Type of transaction
534 +
535 +* Payment
536 +* Purchase
537 +* Credit
538 +)))
539 +|(% style="width:337px" %)description|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:621px" %)Description of the transaction, for purchases it usually includes "point of sale" and "receipt reference"
540 +|(% style="width:337px" %)amount|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %)
541 +|(% style="width:337px" %)billed|(% style="width:205px" %)bool|(% style="width:208px" %) |(% style="width:621px" %)Indicates wheter a bill has been created after the transaction (ie. if the transaction is included in any bill or not)
542 +|(% style="width:337px" %)date|(% style="width:205px" %)date|(% style="width:208px" %) |(% style="width:621px" %)//Valuedate//
543 +
544 +== Reservations ==
545 +
546 +==== List reservations in an account ====
547 +
548 +{{code language="http" title="**Request**"}}
549 +GET /ledger/credit-account/v1/XXX/accounts/NNN/reservations HTTP/1.1
550 +Host: -
551 +Authorization: Bearer <Token>
552 +Content-Type: application/json
553 +
554 +
555 +{{/code}}
556 +
557 +
558 +{{code language="http" title="**Response**"}}
559 +HTTP/1.1 201 Created
560 +Content-Type: application/json
561 +
562 +{
563 + "operations": null,
564 + "items": [
565 + {
566 + "amount": 200.00,
567 + "description" : "",
568 + "date": "2019-10-05",
569 + },
570 + {
571 + "amount": 450.00,
572 + "description" : "",
573 + "date": "2019-10-02",
574 + },
575 + ],
576 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/reservations",
577 +}
578 +{{/code}}
579 +
580 +==== Reservation resource properties ====
581 +
582 +(% class="table-bordered table-striped" %)
583 +|=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 621px;" %)Description
584 +|(% style="width:337px" %)amount|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %)
585 +|(% style="width:337px" %)description|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:621px" %)Description of the reservation, normally "point of sale".
586 +|(% style="width:337px" %)date|(% style="width:205px" %)date|(% style="width:208px" %) |(% style="width:621px" %)Date when the reservation occured
587 +
588 +== Recurring-payment-setting ==
589 +
590 +(% class="wikigeneratedid" %)
591 +This resource contain information/settings related to how recurring payments should behave on this account.
592 +
593 +====
594 +Get settings on an account ====
595 +
596 +
597 +{{code language="http" title="**Request**"}}
598 +GET /ledger/credit-account/v1/XXX/accounts/NNN/recurring-payment-setting/ HTTP/1.1
599 +Host: -
600 +Authorization: Bearer <Token>
601 +Content-Type: application/json
602 +{{/code}}
603 +
604 +
605 +{{code language="http" title="**Response**"}}
606 +HTTP/1.1 200 OK
607 +Content-Type: application/json
608 +
609 +{
610 + "@id" : "/ledger/credit-account/v1/XXX/accounts/NNN/recurring-payment-configurations",
611 + "paymentMethod" : "autogiro",
612 + "paymentScope" : "fixedRecurring",
613 + "fixedAmount" : 1500.00,
614 + "parentHREF": "/ledger/credit-account/v1/XXX/accounts/NNN",
615 + "operation" : [
616 + {
617 + "rel" : "partially-update-recurring-payment-consent",
618 + "method" : "patch",
619 + "href" : "/ledger/credit-account/v1/XXX/accounts/NNN/recurring-payment-consent"
620 + }
621 + ]
622 +}
623 +{{/code}}
624 +
625 +==== Update settings on an account ====
626 +
627 +(% class="wikigeneratedid" %)
628 +Execute http patch towards this resource to change how recurring payments should behave on the specified account
629 +
630 +{{code language="http" title="**Request**"}}
631 +PATCH /ledger/credit-account/v1/XXX/accounts/NNN/recurring-payment-setting HTTP/1.1
632 +Host: -
633 +Authorization: Bearer <Token>
634 +Content-Type: application/json
635 +
636 +{
637 + "paymentScope" : "billedAmount",
638 + "fixedAmount" : 0.00
639 +}
640 +{{/code}}
641 +
642 +==== Recurring-payment-setting resource properties ====
643 +
644 +(% class="table-bordered table-striped" %)
645 +|=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 58px;" %)Modify (patch)|=(% style="width: 1176px;" %)Description
646 +|(% style="width:337px" %)recurringMethod|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="background-color:palegreen; width:58px" %) |(% style="width:1176px" %)recurringPaymentMethods:(((
647 +* autogiro
648 +)))
649 +|(% style="width:337px" %)recurringScope|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="background-color:palegreen; width:58px" %) |(% style="width:1176px" %)(((
650 +recurringPaymentScopes:
651 +
652 +* fixedRecurring (Fixed amount to debit monthly)
653 +* totalDebt (Total credit-account debt will be debited)
654 +* billedAmount (Only the minimum amount to pay will be debited)
655 +* NotSet
656 +)))
657 +|(% style="width:337px" %)fixedAmount|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="background-color:palegreen; width:58px" %) |(% style="width:1176px" %)amount to monthly debit end-customers bankaccount (Only valid if recurringPaymentScope is set to "fixedRecurring")
658 +
659 +== Active-payment-orders ==
660 +
661 +(% class="wikigeneratedid" %)
662 +This resource corresponds to an active / scheduled payment order placed against the specific account, the end-customer will be debited at the given executeDate.
663 +
664 +====
665 +Get active payment orders for an account ====
666 +
667 +
668 +{{code language="http" title="**Request**"}}
669 +GET /ledger/credit-account/v1/XXX/accounts/NNN/active-payment-orders/ HTTP/1.1
670 +Host: -
671 +Authorization: Bearer <Token>
672 +Content-Type: application/json
673 +{{/code}}
674 +
675 +
676 +{{code language="http" title="**Response**"}}
677 +HTTP/1.1 200 OK
678 +Content-Type: application/json
679 +
680 +{
681 + "operations": null,
682 + "items": [
683 + {
684 + "paymentMethod": "autogiro",
685 + "executeDate": "2020-02-15",
686 + "amount": 200.00
687 + }
688 + ],
689 + "view": {
690 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/active-payment-orders?$top=2&$skip=0",
691 + "next": "/ledger/credit-account/v1/XXX/accounts/NNN/active-payment-orders?$top=2&$skip=2"
692 + }
693 +}
694 +{{/code}}
695 +
696 +==== ====
697 +
698 +==== Active-payment-orders resource properties ====
699 +
700 +(% class="table-bordered table-striped" %)
701 +|=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 58px;" %)Modify (patch)|=(% style="width: 1176px;" %)Description
702 +|(% style="width:337px" %)paymentMethod|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:58px" %) |(% style="width:1176px" %)paymentMethods:(((
703 +* autogiro
704 +)))
705 +|(% style="width:337px" %)executeDate|(% style="width:205px" %)Date|(% style="width:208px" %) |(% style="width:58px" %) |(% style="width:1176px" %)(((
706 +The date when the payment order will be executed
707 +)))
708 +|(% style="width:337px" %)amount|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:58px" %) |(% style="width:1176px" %)The amount to debit the owner of the consent
709 +
710 +=== Problems ===
711 +
712 +If an error occur or any validation failed, a "problem" response will be returned.
713 +Below is a list of problems that can occur:
714 +
715 +**HttpStatus 401 Unauthorized**
716 +
717 +* Token expired
718 +* Token invalid
719 +* SellerNumber does not match token
720 +* CompanyNumber does not match token
721 +
722 +**HttpStatus 400 Error**
723 +
724 +* Validation: Argument required
725 +* Validation: Invalid value
726 +
727 +**HttpStatus 422 Unprocessable entity**
728 +
729 +* Authorization declined
730 +
731 +**HttpStatus 409 Conflict**
732 +
733 +* Invoice already authorized
734 +* Duplicate InvoiceNumber
735 +* Authorization is cancelled
736 +* Authorization already captured
737 +* Authorization has expired
738 +* Insufficient debited amount XXX
739 +
740 +**HttpStatus 501 NotImplemented**
741 +
742 +* CompanyNumber XXX not configured
743 +* SellerNumber XXX not configured at PayEx
744 +* CompanyNumber XXX missing configuration
745 +
746 +**HttpStatus 404 NotFound**
747 +
748 +* Authorization not found
749 +
750 +Below is an example of a problem that will be returned if buyer##.nationalConsumerIdentifier.value## is not valid in the authorization post request.
751 +
752 +{{code language="http" title="**Response**"}}
753 +HTTP/1.1 400 Error
754 +Content-Type: application/problem+json
755 +
756 +{
757 + "Type": "http://[DNS]/ledger/invoice-purchase/problems/validation",
758 + "Title": "A validation error occurred",
759 + "Status": 400,
760 + "Instance": null,
761 + "Detail": "A validation error occurred. Please fix the problems mentioned in the 'problems' property below.",
762 + "Problems": [
763 + {
764 + "buyer.nationalConsumerIdentifier.value": "Not a valid SE nationalConsumerIdentifier"
765 + }
766 + ]
767 +}
768 +{{/code}}
1578554263550-159.png
Author
... ... @@ -1,0 +1,1 @@
1 +xwiki:XWiki.dap
Size
... ... @@ -1,0 +1,1 @@
1 +0 bytes
Content
1579213180493-564.png
Author
... ... @@ -1,0 +1,1 @@
1 +xwiki:XWiki.dap
Size
... ... @@ -1,0 +1,1 @@
1 +0 bytes
Content
1579213237427-955.png
Author
... ... @@ -1,0 +1,1 @@
1 +xwiki:XWiki.dap
Size
... ... @@ -1,0 +1,1 @@
1 +0 bytes
Content
1579213343157-343.png
Author
... ... @@ -1,0 +1,1 @@
1 +xwiki:XWiki.dap
Size
... ... @@ -1,0 +1,1 @@
1 +0 bytes
Content
1581025117966-675.png
Author
... ... @@ -1,0 +1,1 @@
1 +xwiki:XWiki.dap
Size
... ... @@ -1,0 +1,1 @@
1 +0 bytes
Content