Changes for page ../credit-account

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