Show last authors
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-01-31
18 renamed resource "recurring-payment-consent" to "recurring-payment-setting" (not implemented in API yet)
19
20 (% class="lead" %)
21 This api is used to retrieve information and to change properties related to the customer's credit account.
22 (% contenteditable="false" tabindex="-1" %)[[image:1579213343157-343.png||data-widget="image" height="325" width="346"]]
23
24 (% id="HRoutesegments" %)
25 == Introduction ==
26
27 Each resource in the API corresponds to its own route. All routes are structured according to a specific standard, explained below
28 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.
29 //api.payex.com/ledger/**{Subdomain}**/v1/**{LedgerNumber}**/resource1/**{resource1Id}**/resource2/**{resource2Id}**/resource3/**{resource3Id}**//
30
31 (% class="table-bordered table-striped" %)
32 |=(% style="width: 604px;" %)Route segment|=(% style="width: 2790px;" %)Description
33 |(% style="width:604px" %)Subdomain|(% style="width:2790px" %)In this part of the API it will be credit-account
34 |(% style="width:604px" %)LedgerNumber|(% style="width:2790px" %)The ledger identifier/number at PayEx
35 |(% style="width:604px" %)resource1Id|(% style="width:2790px" %)Identifier of resource1
36 |(% style="width:604px" %)resource2Id|(% style="width:2790px" %)identifier of resource2, subresource to resource1
37 |(% style="width:604px" %)resource3Id|(% style="width:2790px" %)identifier of resource3, subresource to resource2
38
39 (% class="wikigeneratedid" %)
40 Routes that occurs in examples of this documentation will use the following identifiers
41
42 (% class="table-bordered table-striped" %)
43 |=(% style="width: 488px;" %)Resource|=(% style="width: 2271px;" %)Identifier
44 |(% style="width:488px" %)LedgerNumber|(% style="width:2271px" %)XXX
45 |(% style="width:488px" %)Accounts|(% style="width:2271px" %)NNN
46 |(% style="width:488px" %)Bills|(% style="width:2271px" %)reminder-123
47 bill-456
48 |(% style="width:488px" %)Cards|(% style="width:2271px" %)954c8699-b38f-47a2-b568-668b8837dad8
49 274c8699-b38f-47a2-b568-668b8837dat7
50
51 == Accounts ==
52
53 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.
54 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.
55 The following operations is supported
56
57 * Change the account credit limit
58 * Add extra cards
59 * Request cancellation of account
60 * Turn on/off charity donation
61 * Set behaviour of recurring payments
62
63 === Requesting details of a specific account ===
64
65 (% contenteditable="false" tabindex="-1" %)
66 (((
67 {{code language="http" title="**Request**"}}
68 GET /ledger/credit-account/v1/XXX/accounts/NNN HTTP/1.1 Host: - Authorization: Bearer <Token> Content-Type: application/json
69 {{/code}}
70 )))
71
72 (% contenteditable="false" tabindex="-1" %)
73 (((
74 {{code language="http" title="**Response**"}}
75 HTTP/1.1 200 OK Content-Type: application/json { "@id": "/ledger/credit-account/v1/XXX/accounts/NNN", "accountNo": "1234567", "startDate": "2018-05-21", "description": null, "accountProfileType": "accountType1 | accountType2 | accountType3 etc.", "accountAlias" : "accountAlias1 | accountAlias2 etc.", "customerNo" : "123789654", "status" : "open | pending-close | closed", "creditLimit": 2000.00, "totalBalance" : -1900.0, "reservedAmount": 50.0, "availableAmount": 50.0, "openBill" : "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-456", "charityDonation": true, "interestRate": { "debtInterest" : 10.00, "penaltyInterest": 15.00 }, "bankPayment": { "bankAccountNo": "123", "bankAccountType": "BGSE", "bic": "123456", "iban": "SE12345678945631", "paymentReference": "54867165675646" }, "activePaymentOrders": "/ledger/credit-account/v1/XXX/accounts/NNN/active-payment-orders", "recurringPaymentConsent": "/ledger/credit-account/v1/XXX/accounts/NNN/recurring-payment-setting", "cards": "/ledger/credit-account/v1/XXX/accounts/123456/cards", "transactions": "/ledger/credit-account/v1/XXX/accounts/NNN/transactions", "currency": "sek", "bills": "/ledger/credit-account/v1/XXX/accounts/NNN/bills", "customer": "/ledger/customers/v1/XXX/customer/123456", "operation" : [ { "rel" : "add-card-info", "method" : "post", "href" : "/ledger/credit-account/v1/XXX/accounts/NNN/cards" }, { "rel" : "request-close-account", "method" : "post", "href" : "/ledger/credit-account/v1/XXX/accounts/NNN/request-close-account" }, { "rel" : "apply-for-raised-credit-limit", "method" : "post", "href" : "/ledger/credit-account-onboardings/v1/XXX/accounts/NNN/apply-for-raised-credit-limit" }, { "rel" : "partial-update", "method" : "patch", "href" : "/ledger/credit-account-onboardings/v1/XXX/accounts/NNN" } ] }
76 {{/code}}
77 )))
78
79 **Resource properties**
80
81 (% class="table-bordered table-striped" %)
82 |=(% style="width: 215px;" %)Property|=(% style="width: 114px;" %)Data type|=(% style="width: 161px;" %)Format|=(% style="width: 61px;" %)Modify (patch)|=(% style="width: 877px;" %)Description
83 |(% style="width:215px" %)@id |(% style="width:114px" %)string|(% style="width:161px" %)Maxlength: |(% style="width:61px" %) |(% style="width:877px" %)Uri of the specific account
84 |(% style="width:215px" %)accountNo |(% style="width:114px" %)string|(% style="width:161px" %)Maxlength: 50|(% style="width:61px" %) |(% style="width:877px" %)The identifier of the account
85 |(% 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
86 |(% 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
87 |(% 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//
88 |(% 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//
89 |(% 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)
90 |(% style="width:215px" %)status |(% style="width:114px" %)string|(% style="width:161px" %)Maxlength: 25|(% style="width:61px" %) |(% style="width:877px" %)Status of the account(((
91 * **pending-close**: the customer has requested the account to be closed, the account will be closed when possible.
92 * **open**: the account is open and active
93 * **closed**: the account has been closed
94 )))
95 |(% 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
96 |(% 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.)
97 |(% 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)
98 |(% 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)
99 |(% style="width:215px" %)openBill|(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
100 |(% 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
101 |(% style="width:215px" %)interestRate.debtInterest|(% style="width:114px" %)decimal|(% style="width:161px" %)Percentage|(% style="width:61px" %) |(% style="width:877px" %)yearly debt interestrate
102 |(% style="width:215px" %)interestRate.penaltyInterest|(% style="width:114px" %)decimal|(% style="width:161px" %)Percentage|(% style="width:61px" %) |(% style="width:877px" %)yearly penalty interestrate
103 |(% style="width:215px" %)offer |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
104 |(% style="width:215px" %)recurringPaymentConsent|(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
105 |(% style="width:215px" %)cards |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
106 |(% style="width:215px" %)transactions |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
107 |(% 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" %)
108 |(% style="width:215px" %)bills |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
109 |(% style="width:215px" %)customer |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
110 |(% style="width:337px" %)activePaymentOrder.paymentMethod|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 15|(% style="width:61px" %)(((
111
112 )))|(% style="width:877px" %)(((
113 PaymentTypes:
114
115 * AUTOGIRO
116 )))
117 |(% 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)
118 |(% 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
119 |(% style="width:215px" %) |(% style="width:114px" %) |(% style="width:161px" %) |(% style="width:61px" %) |(% style="width:877px" %)
120
121 === Bills ===
122
123 The bills resources contains all the documents produced in the accounts billing cycle.
124
125 ==== Requesting list of bills belonging to a specific account ====
126
127 (% contenteditable="false" tabindex="-1" %)
128 (((
129 {{code language="http" title="**Request**"}}
130 GET /ledger/credit-account/v1/XXX/accounts/NNN/bills HTTP/1.1 Host: - Authorization: Bearer <Token> Content-Type: application/json
131 {{/code}}
132 )))
133
134 (% contenteditable="false" tabindex="-1" %)
135 (((
136 {{code language="http" title="**Response**"}}
137 HTTP/1.1 200 OK Content-Type: application/json { "@id": "/ledger/credit-account/v1/501/accounts/NNN/bills?status=open", "items" : [ { "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-123645", "dueDate": "2018-12-05", "billDate": "2018-11-15", "billNo": "124645", "billAmount": 240.00, "billType" : "reminder", "status": "open", "activePaymentDetails": { "minimumAmountToBePayed": 240.00, "bankAccountNo": "123", "bankAccountType": "BGSE", "bic": "123456", "iban": "SE12345678945631", "paymentReference": "5465164654663", "paymentOrdersExists": true, }, "document": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-124645/document" }, { "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-123645", "dueDate": "2018-12-05", "billDate": "2018-11-15", "billNo": "124645", "billAmount": 240.00, "billType" : "bill", "status": "closed", "activePaymentDetails": null, "document": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-124645/document" }, { "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/bill-123645", "dueDate": "2018-12-05", "billDate": "2018-11-15", "billNo": "124645", "billAmount": 240.00, "billType" : "bill", "status": "closed", "activePaymentDetails": null, "document": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-124645/document" } ] }
138 {{/code}}
139 )))
140
141 ==== ====
142
143 ==== Requesting details of a specific bill ====
144
145 (% contenteditable="false" tabindex="-1" %)
146 (((
147 {{code language="http" title="**Request**"}}
148 GET /ledger/credit-account/v1/XXX/accounts/NNN/bills/456 HTTP/1.1 Host: - Authorization: Bearer <Token> Content-Type: application/json
149 {{/code}}
150 )))
151
152 (% contenteditable="false" tabindex="-1" %)
153 (((
154 {{code language="http" title="**Response**"}}
155 HTTP/1.1 200 OK Content-Type: application/json { "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-123645", "dueDate": "2018-12-05", "billDate": "2018-11-15", "billNo": "124645", "billAmount": 240.00, "billType" : "reminder", "status": "open", "activePaymentDetails": { "minimumAmountToBePayed": 240.00, "bankAccountNo": "123", "bankAccountType": "BGSE", "bic": "123456", "iban": "SE12345678945631", "paymentReference": "5465164654663", "paymentOrdersExists": true, }, "document": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-124645/document" }
156 {{/code}}
157 )))
158
159 == ==
160
161 (% class="table-bordered table-striped" %)
162 |=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 621px;" %)Description
163 |(% style="width:337px" %)@id|(% style="width:205px" %)string|(% style="width:208px" %)Uri|(% style="width:621px" %)
164 |(% 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" %)
165 |(% style="width:337px" %)billDate|(% style="width:205px" %)date|(% style="width:208px" %) |(% style="width:621px" %)Date when bill was created
166 |(% style="width:337px" %)billNo|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 50|(% style="width:621px" %)The identifier of the bill
167 |(% style="width:337px" %)billAmount|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %)the amount that is stated on the actual bill/document
168 |(% style="width:337px" %)billType|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 25|(% style="width:621px" %)(((
169 BillTypes:
170
171 * Bill
172 * Reminder1
173 * Reminder2
174 * Collection
175 )))
176 |(% style="width:337px" %)status|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:621px" %)"open" / "closed"
177 |(% style="width:337px" %)activePaymentDetails|(% style="width:205px" %)object|(% style="width:208px" %) |(% style="width:621px" %)only set if status of bill is "open"
178 |(% style="width:337px" %)activePaymentDetails.minimumAmountToBePayed|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %)The least amount to pay on the bill
179 |(% style="width:337px" %)activePaymentDetails.bankAccountNo|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 15|(% style="width:621px" %)bankaccount for payment
180 |(% style="width:337px" %)activePaymentDetails.bankAccountType|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 10|(% style="width:621px" %)BankAccountTypes:(((
181 * BKSE (swedish bankaccount)
182 * PKSE (swedish plusgiro)
183 * BGSE (swedish bankgiro)
184 * PGSE (swedish plusgiro OCR)
185 )))
186 |(% style="width:337px" %)activePaymentDetails.bic|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 11|(% style="width:621px" %)Bank Identifier Code (BIC)
187 |(% style="width:337px" %)activePaymentDetails.iban|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 34|(% style="width:621px" %)International Bank Account Number (IBAN)
188 |(% style="width:337px" %)activePaymentDetails.paymentReference|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 50|(% style="width:621px" %)reference to specify on the payment
189 |(% 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".
190 //More detailed information about the payment order can be found on the accounts resource//
191 |(% style="width:337px" %)document|(% style="width:205px" %)string|(% style="width:208px" %)Url|(% style="width:621px" %)Url to download pdf document
192
193 === ===
194
195 === recurring-payment-setting ===
196
197 (% class="wikigeneratedid" %)
198 This resource contain information/settings related to how recurring payments should behave on this account.
199
200 =====
201 Requesting the resource =====
202
203 (% contenteditable="false" tabindex="-1" %)
204 (((
205 {{code language="http" title="**Request**"}}
206 GET /ledger/credit-account/v1/XXX/accounts/NNN/recurring-payment-setting/ HTTP/1.1 Host: - Authorization: Bearer <Token> Content-Type: application/json
207 {{/code}}
208 )))
209
210 (% contenteditable="false" tabindex="-1" %)
211 (((
212 {{code language="http" title="**Response**"}}
213 HTTP/1.1 200 OK Content-Type: application/json { "@id" : "/ledger/credit-account/v1/XXX/accounts/NNN/recurring-payment-setting", "recurringPaymentMethod" : "autogiro", "recurringPaymentScope" : "fixedRecurring", "fixedRecurringAmount" : 1500.00, "parentHREF": "/ledger/credit-account/v1/XXX/accounts/NNN", "operation" : [ { "rel" : "partially-update-recurring-payment-consent", "method" : "patch", "href" : "/ledger/credit-account/v1/XXX/accounts/NNN/recurring-payment-consent" } ] }
214 {{/code}}
215 )))
216
217 ===== Update settings =====
218
219 (% class="wikigeneratedid" %)
220 Execute http patch towards this resource to change how recurring payments should behave on the specified account
221
222 (% contenteditable="false" tabindex="-1" %)
223 (((
224 {{code language="http" title="**Request**"}}
225 PATCH /ledger/credit-account/v1/XXX/accounts/NNN/recurring-payment-setting HTTP/1.1 Host: - Authorization: Bearer <Token> Content-Type: application/json { "recurringPaymentScope" : "billedAmount", "fixedRecurringAmount" : 0.00 }
226 {{/code}}
227 )))
228
229 (% class="table-bordered table-striped" %)
230 |=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 58px;" %)Modify (patch)|=(% style="width: 1176px;" %)Description
231 |(% style="width:337px" %)recurringPaymentMethod|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="background-color:palegreen; width:58px" %) |(% style="width:1176px" %)recurringPaymentMethods:(((
232 * autogiro
233 )))
234 |(% style="width:337px" %)recurringPaymentScope|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="background-color:palegreen; width:58px" %) |(% style="width:1176px" %)(((
235 recurringPaymentScopes:
236
237 * fixedRecurring (Fixed amount to debit monthly)
238 * totalDebt (Total credit-account debt will be debited)
239 * billedAmount (Only the minimum amount to pay will be debited)
240 )))
241 |(% 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")
242
243 === Cards ===
244
245 ==== Post ====
246
247 Execute http post towards this resource to add a new card to the specified account
248
249 (% contenteditable="false" tabindex="-1" %)
250 (((
251 {{code language="http" title="**Request**"}}
252 POST /ledger/credit-account/v1/XXX/accounts/NNN/cards HTTP/1.1 Host: - Authorization: Bearer <Token> Content-Type: application/json { "token": "954c8699-b38f-47a2-b568-668b8837dad8", "PanTrunc": "85479*********648", "deleted" : false, "mainCard": true, "cardHolder" : { "number" : "123465", "name": "test testsson", "nationalConsumerIdentifier": { "value": "19101010-1010", "countryCode": "SE" } } }
253 {{/code}}
254 )))
255
256 ==== List cards ====
257
258 (% contenteditable="false" tabindex="-1" %)
259 (((
260 {{code language="http" title="**Request**"}}
261 GET /ledger/credit-account/v1/XXX/accounts/NNN/cards HTTP/1.1 Host: - Authorization: Bearer <Token> Content-Type: application/json
262 {{/code}}
263 )))
264
265 (% contenteditable="false" tabindex="-1" %)
266 (((
267 {{code language="http" title="**Response**"}}
268 HTTP/1.1 200 OK Content-Type: application/json { "operations": null, "items": [ { "token": "954c8699-b38f-47a2-b568-668b8837dad8", "PanTrunc": "85479*********648", "deleted" : false, "mainCard": true, "cardHolder" : { "number" : "123465", "name": "test testsson", "nationalConsumerIdentifier": { "value": "19101010-1010", "countryCode": "SE" } }, "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/cards/741" }, { "token": "274c8699-b38f-47a2-b568-668b8837dat7", "PanTrunc": "78979*********321", "deleted" : false, "mainCard": false, "cardHolder" : { "number" : "987654", "name": "test testsson", "nationalConsumerIdentifier": { "value": "19101010-1010", "countryCode": "SE" } }, "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/cards/274c8699-b38f-47a2-b568-668b8837dat7" } ], "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/cards", "view": { "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/cards?$top=2&$skip=0", "next": "/ledger/credit-account/v1/XXX/accounts/NNN/cards?$top=2&$skip=2" } }
269 {{/code}}
270 )))
271
272 ==== Get ====
273
274 (% contenteditable="false" tabindex="-1" %)
275 (((
276 {{code language="http" title="**Response**"}}
277 HTTP/1.1 200 OK Content-Type: application/json { "token": "954c8699-b38f-47a2-b568-668b8837dad8", "PanTrunc": "85479*********648", "deleted" : false, "mainCard": true, "cardHolder" : { "number" : "123465", "name": "test testsson", "nationalConsumerIdentifier": { "value": "19101010-1010", "countryCode": "SE" } }, "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/cards/954c8699-b38f-47a2-b568-668b8837dad8", "parentHREF": "/ledger/credit-account/v1/XXX/accounts/NNN", "operation" : [ { "rel" : "partial-update", "method" : "patch", "href" : "/ledger/credit-account/v1/XXX/accounts/NNN/cards/954c8699-b38f-47a2-b568-668b8837dad8" } ] }
278 {{/code}}
279 )))
280
281 (% class="table-bordered table-striped" %)
282 |=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 62px;" %)Modify (patch)|=(% style="width: 1401px;" %)Description
283 |(% style="width:337px" %)token|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)token identifier of the card
284 |(% style="width:337px" %)panTrunc|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)truncated PAN
285 |(% 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
286 |(% 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)
287 |(% style="width:337px" %)cardHolder.number|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)Cardholder customernumber
288 |(% style="width:337px" %)cardHolder.name|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)Cardholder fullname
289 |(% style="width:337px" %)cardHolder.nationalConsumerIdentifier.value|(% style="width:205px" %)string|(% style="width:208px" %)YYYYMMDD-NNNC|(% style="width:62px" %) |(% style="width:1401px" %)
290 |(% 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" %)
291
292 === Transactions ===
293
294 (% contenteditable="false" tabindex="-1" %)
295 (((
296 {{code language="http" title="**Request**"}}
297 GET /ledger/credit-account/v1/XXX/accounts/NNN/transactions HTTP/1.1 Host: - Authorization: Bearer <Token> Content-Type: application/json
298 {{/code}}
299 )))
300
301 (% contenteditable="false" tabindex="-1" %)
302 (((
303 {{code language="http" title="**Response**"}}
304 HTTP/1.1 200 OK Content-Type: application/json { "operations": null, "items": [ { "type": "payment", "description": "", "amount": 200.00, "billed": false|true, "date": "2019-10-09", "reserveDate": null }, { "type": "purchase", "description": "testbutiken, köpref. 12345689", "amount": 200.00, "billed": false|true, "date": "2019-10-09", "reserveDate": "2019-10-05", }, { "type": "credit", "description": "", "amount": 200.00, "billed": false|true, "date": "2019-10-09", "reserveDate": "2019-10-05" } ], "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/transactions?fromDate=2019-10-01", "view": { "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/transactions?fromDate=2019-10-01&$top=2&$skip=0", "next": "/ledger/credit-account/v1/XXX/accounts/NNN/transactions?fromDate=2019-10-01&$top=2&$skip=2" } }
305 {{/code}}
306 )))
307
308 (% class="table-bordered table-striped" %)
309 |=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 621px;" %)Description
310 |(% style="width:337px" %)type|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:621px" %)(((
311 Type of transaction
312
313 * Payment
314 * Purchase
315 * Credit
316 )))
317 |(% 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"
318 |(% style="width:337px" %)amount|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %)
319 |(% 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)
320 |(% style="width:337px" %)date|(% style="width:205px" %)date|(% style="width:208px" %) |(% style="width:621px" %)//Valuedate//
321
322 === Reservations ===
323
324 (% contenteditable="false" tabindex="-1" %)
325 (((
326 {{code language="http" title="**Request**"}}
327 GET /ledger/credit-account/v1/XXX/accounts/NNN/reservations HTTP/1.1 Host: - Authorization: Bearer <Token> Content-Type: application/json
328 {{/code}}
329 )))
330
331 (% contenteditable="false" tabindex="-1" %)
332 (((
333 {{code language="http" title="**Response**"}}
334 HTTP/1.1 201 Created Content-Type: application/json { "operations": null, "items": [ { "amount": 200.00, "description" : "", "date": "2019-10-05", }, { "amount": 450.00, "description" : "", "date": "2019-10-02", }, ], "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/reservations", }
335 {{/code}}
336 )))
337
338 (% class="table-bordered table-striped" %)
339 |=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 621px;" %)Description
340 |(% style="width:337px" %)amount|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %)
341 |(% style="width:337px" %)description|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:621px" %)Description of the reservation, normally "point of sale".
342 |(% style="width:337px" %)date|(% style="width:205px" %)date|(% style="width:208px" %) |(% style="width:621px" %)Date when the reservation occured
343 Problems
344 If an error occur or any validation failed, a "problem" response will be returned.
345 Below is a list of problems that can occur:
346 **HttpStatus 401 Unauthorized**
347
348 * Token expired
349 * Token invalid
350 * SellerNumber does not match token
351 * CompanyNumber does not match token
352 **HttpStatus 400 Error**
353 * Validation: Argument required
354 * Validation: Invalid value
355 **HttpStatus 422 Unprocessable entity**
356 * Authorization declined
357 **HttpStatus 409 Conflict**
358 * Invoice already authorized
359 * Duplicate InvoiceNumber
360 * Authorization is cancelled
361 * Authorization already captured
362 * Authorization has expired
363 * Insufficient debited amount XXX
364 **HttpStatus 501 NotImplemented**
365 * CompanyNumber XXX not configured
366 * SellerNumber XXX not configured at PayEx
367 * CompanyNumber XXX missing configuration
368 **HttpStatus 404 NotFound**
369 * Authorization not found
370 Below is an example of a problem that will be returned if buyer##.nationalConsumerIdentifier.value## is not valid in the authorization post request.(% contenteditable="false" tabindex="-1" %)
371 (((
372 {{code language="http" title="**Response**"}}
373 HTTP/1.1 400 Error Content-Type: application/problem+json { "Type": "http://[DNS]/ledger/invoice-purchase/problems/validation", "Title": "A validation error occurred", "Status": 400, "Instance": null, "Detail": "A validation error occurred. Please fix the problems mentioned in the 'problems' property below.", "Problems": [ { "buyer.nationalConsumerIdentifier.value": "Not a valid SE nationalConsumerIdentifier" } ] }
374 {{/code}}
375 )))

Tips

You can click on the arrows next to the breadcrumb elements to quickly navigate to sibling and children pages.

Need help?

If you need help with XWiki you can contact: