Changes for page ../credit-account

Last modified by David Persson on 2022/08/11 10:52
From empty
To version 65.1
edited by David Persson
on 2020/01/16 23:14
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,615 @@
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 +
15 +== Accounts ==
16 +
17 +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.
18 +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.
19 +
20 +The following operations is supported
21 +
22 +* Change the account credit limit
23 +* Add extra cards
24 +* Request cancellation of account
25 +* Turn on/off charity donation
26 +
27 +=== Requesting details of a specific account ===
28 +
29 +
30 +{{code language="http" title="**Request**"}}
31 +GET /ledger/credit-account/v1/XXX/accounts/YYY HTTP/1.1
32 +Host: -
33 +Authorization: Bearer <Token>
34 +Content-Type: application/json
35 +{{/code}}
36 +
37 +
38 +{{code language="http" title="**Response**"}}
39 +HTTP/1.1 200 OK
40 +Content-Type: application/json
41 +
42 +{
43 + "@id": "/ledger/credit-account/v1/501/accounts/1234567",
44 + "accountNo": "1234567",
45 + "startDate": "2018-05-21",
46 + "description": null,
47 + "accountProfileType": "accountType1 | accountType2 | accountType3 etc.",
48 + "accountAlias" : "accountAlias1 | accountAlias2 etc.",
49 + "customerNo" : "123789654",
50 + "status" : "open | pending-close | closed",
51 + "creditLimit": 2000.00,
52 + "totalBalance" : -1900.0,
53 + "reservedAmount": 50.0,
54 + "availableAmount": 50.0,
55 + "openBill" : "/ledger/credit-account/v1/501/accounts/123456/bills/456",
56 + "charityDonation": true,
57 + "interestRate": {
58 + "debtInterest" : 10.00,
59 + "penaltyInterest": 15.00
60 + },
61 + "bankPayment": {
62 + "bankAccountNo": "123",
63 + "bankAccountType": "BGSE",
64 + "bic": "123456",
65 + "iban": "SE12345678945631",
66 + "paymentReference": "54867165675646"
67 + },
68 + "activePaymentOrders": "/ledger/credit-account/v1/501/accounts/123456/active-payment-orders",
69 + "recurringPaymentConsent": "/ledger/credit-account/v1/501/accounts/123456/recurring-payment",
70 + "cards": "/ledger/credit-account/v1/501/accounts/123456/cards",
71 + "transactions": "/ledger/credit-account/v1/501/accounts/123456/transactions",
72 + "currency": "sek",
73 + "bills": "/ledger/credit-account/v1/501/accounts/123456/bills",
74 + "customer": "/ledger/customers/v1/501/customer/123456",
75 + "operation" : [
76 + {
77 + "rel" : "add-card-info",
78 + "method" : "post",
79 + "href" : "/ledger/credit-account/v1/501/accounts/123456/cards"
80 + },
81 + {
82 + "rel" : "request-close-account",
83 + "method" : "post",
84 + "href" : "/ledger/credit-account/v1/501/accounts/123456/request-close-account"
85 + },
86 + {
87 + "rel" : "apply-for-raised-credit-limit",
88 + "method" : "post",
89 + "href" : "/ledger/credit-account-onboardings/v1/501/accounts/123456/apply-for-raised-credit-limit"
90 + },
91 + {
92 + "rel" : "partial-update",
93 + "method" : "patch",
94 + "href" : "/ledger/credit-account-onboardings/v1/501/accounts/123456"
95 + }
96 + ]
97 +}
98 +{{/code}}
99 +
100 +**Resource properties**
101 +
102 +(% class="table-bordered table-striped" %)
103 +|=(% style="width: 215px;" %)Property|=(% style="width: 114px;" %)Data type|=(% style="width: 161px;" %)Format|=(% style="width: 61px;" %)Modify (patch)|=(% style="width: 877px;" %)Description
104 +|(% style="width:215px" %)@id |(% style="width:114px" %)string|(% style="width:161px" %)Maxlength: |(% style="width:61px" %) |(% style="width:877px" %)Uri of the specific account
105 +|(% style="width:215px" %)accountNo |(% style="width:114px" %)string|(% style="width:161px" %)Maxlength: 50|(% style="width:61px" %) |(% style="width:877px" %)The identifier of the account
106 +|(% 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
107 +|(% 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
108 +|(% 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//
109 +|(% 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//
110 +|(% 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)
111 +|(% style="width:215px" %)status |(% style="width:114px" %)string|(% style="width:161px" %)Maxlength: 25|(% style="width:61px" %) |(% style="width:877px" %)Status of the account(((
112 +* **pending-close**: the customer has requested the account to be closed, the account will be closed when possible.
113 +* **open**: the account is open and active
114 +* **closed**: the account has been closed
115 +)))
116 +|(% 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
117 +|(% 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.)
118 +|(% 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)
119 +|(% 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)
120 +|(% style="width:215px" %)openBill.amountToPay |(% style="width:114px" %)decimal|(% style="width:161px" %) |(% style="width:61px" %) |(% style="width:877px" %)The minimum amount to pay on the currently open bill
121 +|(% style="width:215px" %)openBill.bill |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
122 +|(% style="width:215px" %)openBill.dueDate |(% 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" %)
123 +|(% style="width:215px" %)openBill.billType |(% style="width:114px" %)string|(% style="width:161px" %)Maxlength: 25|(% style="width:61px" %) |(% style="width:877px" %)(((
124 +BillTypes:
125 +
126 +* Bill
127 +* Reminder1
128 +* Reminder2
129 +* Collection
130 +)))
131 +|(% 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
132 +|(% style="width:215px" %)interestRate.debtInterest|(% style="width:114px" %)decimal|(% style="width:161px" %)Percentage|(% style="width:61px" %) |(% style="width:877px" %)yearly debt interestrate
133 +|(% style="width:215px" %)interestRate.penaltyInterest|(% style="width:114px" %)decimal|(% style="width:161px" %)Percentage|(% style="width:61px" %) |(% style="width:877px" %)yearly penalty interestrate
134 +|(% style="width:215px" %)offer |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
135 +|(% style="width:215px" %)recurringPaymentConsent|(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
136 +|(% style="width:215px" %)cards |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
137 +|(% style="width:215px" %)transactions |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
138 +|(% 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" %)
139 +|(% style="width:215px" %)bills |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
140 +|(% style="width:215px" %)customer |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
141 +|(% style="width:337px" %)activePaymentOrder.paymentMethod|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 15|(% style="width:61px" %)(((
142 +
143 +)))|(% style="width:877px" %)(((
144 +PaymentTypes:
145 +
146 +* AUTOGIRO
147 +)))
148 +|(% 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)
149 +|(% 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
150 +|(% style="width:215px" %) |(% style="width:114px" %) |(% style="width:161px" %) |(% style="width:61px" %) |(% style="width:877px" %)
151 +
152 +=== Bills ===
153 +
154 +The bills resources contains all the documents produced in the accounts billing cycle.
155 +
156 +
157 +==== Requesting list of bills belonging to a specific account ====
158 +
159 +
160 +{{code language="http" title="**Request**"}}
161 +GET /ledger/credit-account/v1/XXX/accounts/123/bills HTTP/1.1
162 +Host: -
163 +Authorization: Bearer <Token>
164 +Content-Type: application/json
165 +
166 +{{/code}}
167 +
168 +
169 +{{code language="http" title="**Response**"}}
170 +HTTP/1.1 200 OK
171 +Content-Type: application/json
172 +
173 +{
174 + "@id": "/ledger/credit-account/v1/501/accounts/123456/bills?status=open",
175 + "items" : [
176 + {
177 + "@id": "/ledger/credit-account/v1/501/accounts/123456/bills/reminder-123645",
178 + "dueDate": "2018-12-05",
179 + "billDate": "2018-11-15",
180 + "billNo": "124645",
181 + "billAmount": 240.00,
182 + "billType" : "reminder",
183 + "status": "open",
184 + "activePaymentDetails": {
185 + "minimumAmountToBePayed": 240.00,
186 + "bankAccountNo": "123",
187 + "bankAccountType": "BGSE",
188 + "bic": "123456",
189 + "iban": "SE12345678945631",
190 + "paymentReference": "5465164654663",
191 + "paymentOrdersExists": true,
192 + },
193 + "document": "/ledger/credit-account/v1/501/accounts/123456/bills/reminder-124645/document"
194 + },
195 + {
196 + "@id": "/ledger/credit-account/v1/501/accounts/123456/bills/reminder-123645",
197 + "dueDate": "2018-12-05",
198 + "billDate": "2018-11-15",
199 + "billNo": "124645",
200 + "billAmount": 240.00,
201 + "billType" : "bill",
202 + "status": "closed",
203 + "activePaymentDetails": null,
204 + "document": "/ledger/credit-account/v1/501/accounts/123456/bills/reminder-124645/document"
205 + },
206 + {
207 + "@id": "/ledger/credit-account/v1/501/accounts/123456/bills/bill-123645",
208 + "dueDate": "2018-12-05",
209 + "billDate": "2018-11-15",
210 + "billNo": "124645",
211 + "billAmount": 240.00,
212 + "billType" : "bill",
213 + "status": "closed",
214 + "activePaymentDetails": null,
215 + "document": "/ledger/credit-account/v1/501/accounts/123456/bills/reminder-124645/document"
216 + }
217 + ]
218 +}
219 +{{/code}}
220 +
221 +==== ====
222 +
223 +==== Requesting details of a specific bill ====
224 +
225 +
226 +{{code language="http" title="**Request**"}}
227 +GET /ledger/credit-account/v1/XXX/accounts/123/bills/456 HTTP/1.1
228 +Host: -
229 +Authorization: Bearer <Token>
230 +Content-Type: application/json
231 +
232 +{{/code}}
233 +
234 +
235 +{{code language="http" title="**Response**"}}
236 +HTTP/1.1 200 OK
237 +Content-Type: application/json
238 +
239 +{
240 + "@id": "/ledger/credit-account/v1/501/accounts/123456/bills/reminder-123645",
241 + "dueDate": "2018-12-05",
242 + "billDate": "2018-11-15",
243 + "billNo": "124645",
244 + "billAmount": 240.00,
245 + "billType" : "reminder",
246 + "status": "open",
247 + "activePaymentDetails": {
248 + "minimumAmountToBePayed": 240.00,
249 + "bankAccountNo": "123",
250 + "bankAccountType": "BGSE",
251 + "bic": "123456",
252 + "iban": "SE12345678945631",
253 + "paymentReference": "5465164654663",
254 + "paymentOrdersExists": true,
255 + },
256 + "document": "/ledger/credit-account/v1/501/accounts/123456/bills/reminder-124645/document"
257 +}
258 +{{/code}}
259 +
260 +== ==
261 +
262 +(% class="table-bordered table-striped" %)
263 +|=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 621px;" %)Description
264 +|(% style="width:337px" %)@id|(% style="width:205px" %)string|(% style="width:208px" %)Uri|(% style="width:621px" %)
265 +|(% 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" %)
266 +|(% style="width:337px" %)billDate|(% style="width:205px" %)date|(% style="width:208px" %) |(% style="width:621px" %)Date when bill was created
267 +|(% style="width:337px" %)billNo|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 50|(% style="width:621px" %)The identifier of the bill
268 +|(% style="width:337px" %)billAmount|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %)the amount that is stated on the actual bill/document
269 +|(% style="width:337px" %)billType|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 25|(% style="width:621px" %)(((
270 +BillTypes:
271 +
272 +* Bill
273 +* Reminder1
274 +* Reminder2
275 +* Collection
276 +)))
277 +|(% style="width:337px" %)status|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:621px" %)"open" / "closed"
278 +|(% style="width:337px" %)activePaymentDetails|(% style="width:205px" %)object|(% style="width:208px" %) |(% style="width:621px" %)only set if status of bill is "open"
279 +|(% style="width:337px" %)activePaymentDetails.minimumAmountToBePayed|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %)The least amount to pay on the bill
280 +|(% style="width:337px" %)activePaymentDetails.bankAccountNo|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 15|(% style="width:621px" %)bankaccount for payment
281 +|(% style="width:337px" %)activePaymentDetails.bankAccountType|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 10|(% style="width:621px" %)BankAccountTypes:(((
282 +* BKSE (swedish bankaccount)
283 +* PKSE (swedish plusgiro)
284 +* BGSE (swedish bankgiro)
285 +* PGSE (swedish plusgiro OCR)
286 +)))
287 +|(% style="width:337px" %)activePaymentDetails.bic|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 11|(% style="width:621px" %)Bank Identifier Code (BIC)
288 +|(% style="width:337px" %)activePaymentDetails.iban|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 34|(% style="width:621px" %)International Bank Account Number (IBAN)
289 +|(% style="width:337px" %)activePaymentDetails.paymentReference|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 50|(% style="width:621px" %)reference to specify on the payment
290 +|(% 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".
291 +//More detailed information about the payment order can be found on the accounts resource//
292 +|(% style="width:337px" %)document|(% style="width:205px" %)string|(% style="width:208px" %)Url|(% style="width:621px" %)Url to download pdf document
293 +
294 +=== ===
295 +
296 +=== recurring-payment-consent ===
297 +
298 +This resource contain information/settings related to how recurring payments should behave on this account.
299 +
300 +
301 +{{code language="http" title="**Request**"}}
302 +POST /ledger/credit-account/v1/XXX/accounts/123/recurring-payment-consent HTTP/1.1
303 +Host: -
304 +Authorization: Bearer <Token>
305 +Content-Type: application/json
306 +{{/code}}
307 +
308 +
309 +{{code language="http" title="**Response**"}}
310 +HTTP/1.1 200 OK
311 +Content-Type: application/json
312 +
313 +{
314 + "@id" : "/ledger/credit-account/v1/501/accounts/123456/recurring-payment-consent",
315 + "recurringPaymentMethod" : "autogiro",
316 + "recurringPaymentScope" : "fixedRecurring | totalDebt | billedAmount | onDemand",
317 + "fixedRecurringAmount" : 1500.00,
318 + "parentHREF": "/ledger/credit-account/v1/501/accounts/123456"
319 +}
320 +
321 +{{/code}}
322 +
323 +
324 +(% class="table-bordered table-striped" %)
325 +|=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 58px;" %)Modify (patch)|=(% style="width: 1176px;" %)Description
326 +|(% style="width:337px" %)recurringPaymentMethod|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="background-color:palegreen; width:58px" %) |(% style="width:1176px" %)recurringPaymentMethods:(((
327 +* autogiro
328 +)))
329 +|(% style="width:337px" %)recurringPaymentScope|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="background-color:palegreen; width:58px" %) |(% style="width:1176px" %)(((
330 +recurringPaymentScopes:
331 +
332 +* fixedRecurring (Fixed amount to debit monthly)
333 +* totalDebt (Total credit-account debt will be debited)
334 +* billedAmount (Only the minimum amount to pay will be debited)
335 +)))
336 +|(% style="width:337px" %)fixedRecurringAmount|(% 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")
337 +
338 +=== Cards ===
339 +
340 +List cards
341 +
342 +{{code language="http" title="**Request**"}}
343 +POST /ledger/credit-account/v1/XXX/accounts/123/cards HTTP/1.1
344 +Host: -
345 +Authorization: Bearer <Token>
346 +Content-Type: application/json
347 +
348 +
349 +{{/code}}
350 +
351 +
352 +{{code language="http" title="**Response**"}}
353 +HTTP/1.1 200 OK
354 +Content-Type: application/json
355 +
356 +{
357 + "operations": null,
358 + "items": [
359 + {
360 + "token": "954c8699-b38f-47a2-b568-668b8837dad8",
361 + "PanTrunc": "85479*********648",
362 + "deleted" : false,
363 + "mainCard": true,
364 + "cardHolder" : {
365 + "number" : "123465",
366 + "name": "test testsson",
367 + "nationalConsumerIdentifier": {
368 + "value": "19101010-1010",
369 + "countryCode": "SE"
370 + }
371 + },
372 + "@id": "/ledger/credit-account/v1/501/accounts/123456/cards/741"
373 + },
374 + {
375 + "token": "274c8699-b38f-47a2-b568-668b8837dat7",
376 + "PanTrunc": "78979*********321",
377 + "deleted" : false,
378 + "mainCard": false,
379 + "cardHolder" : {
380 + "number" : "987654",
381 + "name": "test testsson",
382 + "nationalConsumerIdentifier": {
383 + "value": "19101010-1010",
384 + "countryCode": "SE"
385 + }
386 + },
387 + "@id": "/ledger/credit-account/v1/501/accounts/123456/cards/742"
388 + }
389 + ],
390 + "@id": "/ledger/credit-account/v1/501/accounts/123456/cards",
391 + "view": {
392 + "@id": "/ledger/credit-account/v1/501/accounts/123456/cards?$top=2&$skip=0",
393 + "next": "/ledger/credit-account/v1/501/accounts/123456/cards?$top=2&$skip=2"
394 + }
395 +}
396 +{{/code}}
397 +
398 +{{code language="http" title="**Request**"}}
399 +POST /ledger/credit-account/v1/XXX/accounts/123/cards/456 HTTP/1.1
400 +Host: -
401 +Authorization: Bearer <Token>
402 +Content-Type: application/json
403 +
404 +
405 +{{/code}}
406 +
407 +==== Get ====
408 +
409 +{{code language="http" title="**Response**"}}
410 +HTTP/1.1 201 Created
411 +Content-Type: application/json
412 +
413 +{
414 + "token": "954c8699-b38f-47a2-b568-668b8837dad8",
415 + "PanTrunc": "85479*********648",
416 + "deleted" : false,
417 + "mainCard": true,
418 + "cardHolder" : {
419 + "number" : "123465",
420 + "name": "test testsson",
421 + "nationalConsumerIdentifier": {
422 + "value": "19101010-1010",
423 + "countryCode": "SE"
424 + }
425 + },
426 + "@id": "/ledger/credit-account/v1/501/accounts/123456/cards/741",
427 + "parentHREF": "/ledger/credit-account/v1/501/accounts/123456",
428 + "operation" : [
429 + {
430 + "rel" : "partial-update",
431 + "method" : "patch",
432 + "href" : "/ledger/credit-account/v1/501/accounts/123456/cards/741"
433 + }
434 + ]
435 +}
436 +{{/code}}
437 +
438 +(% class="table-bordered table-striped" %)
439 +|=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 62px;" %)Modify (patch)|=(% style="width: 1401px;" %)Description
440 +|(% style="width:337px" %)token|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)token identifier of the card
441 +|(% style="width:337px" %)panTrunc|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)truncated PAN
442 +|(% 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
443 +|(% 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)
444 +|(% style="width:337px" %)cardHolder.number|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)Cardholder customernumber
445 +|(% style="width:337px" %)cardHolder.name|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)Cardholder fullname
446 +|(% style="width:337px" %)cardHolder.nationalConsumerIdentifier.value|(% style="width:205px" %)string|(% style="width:208px" %)YYYYMMDD-NNNC|(% style="width:62px" %) |(% style="width:1401px" %)
447 +|(% 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" %)
448 +
449 +=== Transactions ===
450 +
451 +
452 +{{code language="http" title="**Request**"}}
453 +POST /ledger/credit-account/v1/XXX/accounts/123/transactions HTTP/1.1
454 +Host: -
455 +Authorization: Bearer <Token>
456 +Content-Type: application/json
457 +
458 +
459 +{{/code}}
460 +
461 +
462 +{{code language="http" title="**Response**"}}
463 +HTTP/1.1 201 Created
464 +Content-Type: application/json
465 +
466 +{
467 + "operations": null,
468 + "items": [
469 + {
470 + "type": "payment",
471 + "description": "",
472 + "amount": 200.00,
473 + "billed": false|true,
474 + "date": "2019-10-09",
475 + "reserveDate": null
476 + },
477 + {
478 + "type": "purchase",
479 + "description": "testbutiken, köpref. 12345689",
480 + "amount": 200.00,
481 + "billed": false|true,
482 + "date": "2019-10-09",
483 + "reserveDate": "2019-10-05",
484 + },
485 + {
486 + "type": "credit",
487 + "description": "",
488 + "amount": 200.00,
489 + "billed": false|true,
490 + "date": "2019-10-09",
491 + "reserveDate": "2019-10-05"
492 + }
493 + ],
494 + "@id": "/ledger/credit-account/v1/501/accounts/123456/transactions?fromDate=2019-10-01",
495 + "view": {
496 + "@id": "/ledger/credit-account/v1/501/accounts/123456/transactions?fromDate=2019-10-01&$top=2&$skip=0",
497 + "next": "/ledger/credit-account/v1/501/accounts/123456/transactions?fromDate=2019-10-01&$top=2&$skip=2"
498 + }
499 +}
500 +{{/code}}
501 +
502 +(% class="table-bordered table-striped" %)
503 +|=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 621px;" %)Description
504 +|(% style="width:337px" %)type|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:621px" %)(((
505 +Type of transaction
506 +
507 +* Payment
508 +* Purchase
509 +* Credit
510 +)))
511 +|(% 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"
512 +|(% style="width:337px" %)amount|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %)
513 +|(% 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)
514 +|(% style="width:337px" %)date|(% style="width:205px" %)date|(% style="width:208px" %) |(% style="width:621px" %)//Valuedate//
515 +
516 +=== Reservations ===
517 +
518 +
519 +{{code language="http" title="**Request**"}}
520 +POST /ledger/credit-account/v1/XXX/accounts/123/reservations HTTP/1.1
521 +Host: -
522 +Authorization: Bearer <Token>
523 +Content-Type: application/json
524 +
525 +
526 +{{/code}}
527 +
528 +
529 +{{code language="http" title="**Response**"}}
530 +HTTP/1.1 201 Created
531 +Content-Type: application/json
532 +
533 +{
534 + "operations": null,
535 + "items": [
536 + {
537 + "amount": 200.00,
538 + "description" : "",
539 + "date": "2019-10-05",
540 + },
541 + {
542 + "amount": 450.00,
543 + "description" : "",
544 + "date": "2019-10-02",
545 + },
546 + ],
547 + "@id": "/ledger/credit-account/v1/501/accounts/123456/reservations",
548 +}
549 +{{/code}}
550 +
551 +(% class="table-bordered table-striped" %)
552 +|=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 621px;" %)Description
553 +|(% style="width:337px" %)amount|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %)
554 +|(% style="width:337px" %)description|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:621px" %)Description of the reservation, normally "point of sale".
555 +|(% style="width:337px" %)date|(% style="width:205px" %)date|(% style="width:208px" %) |(% style="width:621px" %)Date when the reservation occured
556 +
557 +Problems
558 +
559 +If an error occur or any validation failed, a "problem" response will be returned.
560 +Below is a list of problems that can occur:
561 +
562 +**HttpStatus 401 Unauthorized**
563 +
564 +* Token expired
565 +* Token invalid
566 +* SellerNumber does not match token
567 +* CompanyNumber does not match token
568 +
569 +**HttpStatus 400 Error**
570 +
571 +* Validation: Argument required
572 +* Validation: Invalid value
573 +
574 +**HttpStatus 422 Unprocessable entity**
575 +
576 +* Authorization declined
577 +
578 +**HttpStatus 409 Conflict**
579 +
580 +* Invoice already authorized
581 +* Duplicate InvoiceNumber
582 +* Authorization is cancelled
583 +* Authorization already captured
584 +* Authorization has expired
585 +* Insufficient debited amount XXX
586 +
587 +**HttpStatus 501 NotImplemented**
588 +
589 +* CompanyNumber XXX not configured
590 +* SellerNumber XXX not configured at PayEx
591 +* CompanyNumber XXX missing configuration
592 +
593 +**HttpStatus 404 NotFound**
594 +
595 +* Authorization not found
596 +
597 +Below is an example of a problem that will be returned if buyer##.nationalConsumerIdentifier.value## is not valid in the authorization post request.
598 +
599 +{{code language="http" title="**Response**"}}
600 +HTTP/1.1 400 Error
601 +Content-Type: application/problem+json
602 +
603 +{
604 + "Type": "http://[DNS]/ledger/invoice-purchase/problems/validation",
605 + "Title": "A validation error occurred",
606 + "Status": 400,
607 + "Instance": null,
608 + "Detail": "A validation error occurred. Please fix the problems mentioned in the 'problems' property below.",
609 + "Problems": [
610 + {
611 + "buyer.nationalConsumerIdentifier.value": "Not a valid SE nationalConsumerIdentifier"
612 + }
613 + ]
614 +}
615 +{{/code}}
1578554263550-159.png
Author
... ... @@ -1,0 +1,1 @@
1 +xwiki:XWiki.dap
Size
... ... @@ -1,0 +1,1 @@
1 +0 bytes
Content