Wiki source code of account

Last modified by Jenny Eklund on 2025/09/29 10:46
Hide last authors
Rasmus Enekvist 1.1 1 (% class="jumbotron" %)
2 (((
3 (% class="container" %)
4 (((
Rasmus Enekvist 3.1 5 Integrate to **PayEx Account API **
Rasmus Enekvist 1.1 6 )))
7 )))
8
9 === Changelog ===
10
Jenny Eklund 66.1 11 2025-09-29
12 Added active-complaints; possibility to get active complaints registered on an account (Estimated release 2025-10-14)
Rasmus Enekvist 1.1 13
14 (% id="HRoutesegments" %)
15 == Introduction ==
16
17 (% class="lead" %)
Rasmus Enekvist 3.1 18 This api is used to retrieve information and to change properties related to the customer's account.
Rasmus Enekvist 1.1 19
Jenny Eklund 70.1 20 [[image:accountapi2509292.png]]
Rasmus Enekvist 1.1 21
22 Each resource in the API corresponds to its own route. All routes are structured according to a specific standard, explained below
23
24 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.
25 //api.payex.com/ledger/**{Subdomain}**/v1/**{LedgerNumber}**/resource1/**{resource1Id}**/resource2/**{resource2Id}**/resource3/**{resource3Id}**//
26
27 (% class="table-bordered table-striped" %)
28 |=(% style="width: 604px;" %)Route segment|=(% style="width: 2790px;" %)Description
Rasmus Enekvist 4.1 29 |(% style="width:604px" %)Subdomain|(% style="width:2790px" %)In this part of the API it will be account
Rasmus Enekvist 1.1 30 |(% style="width:604px" %)LedgerNumber|(% style="width:2790px" %)The ledger identifier/number at PayEx
31 |(% style="width:604px" %)resource1Id|(% style="width:2790px" %)Identifier of resource1
32 |(% style="width:604px" %)resource2Id|(% style="width:2790px" %)identifier of resource2, subresource to resource1
33 |(% style="width:604px" %)resource3Id|(% style="width:2790px" %)identifier of resource3, subresource to resource2
34
35 (% class="wikigeneratedid" %)
36 Routes that occurs in examples of this documentation will use the following identifiers
37
38 (% class="table-bordered table-striped" %)
39 |=(% style="width: 488px;" %)Resource|=(% style="width: 2271px;" %)Identifier
40 |(% style="width:488px" %)LedgerNumber|(% style="width:2271px" %)XXX
41 |(% style="width:488px" %)Accounts|(% style="width:2271px" %)NNN
42 |(% style="width:488px" %)Bills|(% style="width:2271px" %)reminder-123
43 bill-456
44 |(% style="width:488px" %)Cards|(% style="width:2271px" %)954c8699-b38f-47a2-b568-668b8837dad8
45 274c8699-b38f-47a2-b568-668b8837dat7
46
47 == Accounts ==
48
Rasmus Enekvist 5.1 49 The **accounts** resource is located under **ledger/account/v1/ **api**. **The accounts- and its sub-resources are used to create, read and modify information related to a account.
Rasmus Enekvist 1.1 50 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.
51
52 The following operations is supported
53
54 * Change the account credit limit
55 * Add extra cards
56 * Request cancellation of account
57 * Turn on/off charity donation
58 * Set behaviour of recurring payments
59
Simon Melin 29.1 60 ==== Get a list of accounts ====
61
David Persson 65.1 62 ==== ====
Simon Melin 29.1 63
Joel Klasson 40.1 64 These querystring parameters are optional. preferably select one or the other, If both accountNo and customerNo is provided in querystring accountNo have to belong to the customerNo
Simon Melin 36.1 65
Simon Melin 29.1 66 {{code language="http" title="**Request**"}}
Simon Melin 30.1 67 GET /ledger/account/v1/XXX/accounts?accountNo=123&customerNo=456 HTTP/1.1
Simon Melin 29.1 68 Host: -
69 Authorization: Bearer <Token>
70 Content-Type: application/json
71 {{/code}}
72
73
74 {{code language="http" title="**Response**"}}
75 HTTP/1.1 200 OK
76 Content-Type: application/json
77 {
Simon Melin 36.1 78 "items": [
Simon Melin 33.1 79 {
80 "@id": "/ledger/account/v1/XXX/accounts/NNN",
81 "accountNo": "1234567",
82 "startDate": "2018-05-21",
83 "description": null,
84 "accountProfileType": "accountType1 | accountType2 | accountType3 etc.",
85 "accountAlias" : "accountAlias1 | accountAlias2 etc.",
86 "customerNo" : "123789654",
87 "status" : "Open | PendingClose | Closed",
88 "creditLimit": 2000.00,
Rasmus Enekvist 49.1 89 "totalBalance" : -1900.00,
90 "reservedAmount": 50.00,
91 "availableAmount": 3850.00,
92 "maxPaymentAmount": 51900.00,
Simon Melin 33.1 93 "openBill" : "/ledger/account/v1/XXX/accounts/NNN/bills/reminder-456",
94 "charityDonation": true,
95 "interestRate": {
96 "debtInterest" : 10.00,
97 "penaltyInterest": 15.00
98 },
99 "bankPayment": {
100 "bankAccountNo": "123",
101 "bankAccountType": "BGSE",
102 "bic": "123456",
103 "iban": "SE12345678945631",
104 "paymentReference": "54867165675646"
105 },
106 "activePaymentOrders": "/ledger/account/v1/XXX/accounts/NNN/active-payment-orders",
107 "recurringPaymentConfiguration": "/ledger/account/v1/XXX/accounts/NNN/recurring-payment-configuration",
108 "cards": "/ledger/account/v1/XXX/accounts/123456/cards",
109 "transactions": "/ledger/account/v1/XXX/accounts/NNN/transactions",
Jenny Eklund 66.1 110 "reservations": "/ledger/account/v1/XXX/accounts/NNN/reservations",
111 "activeComplaints": "/ledger/account/v1/XXX/accounts/NNN/active-complaints",
Simon Melin 33.1 112 "currency": "sek",
113 "bills": "/ledger/account/v1/XXX/accounts/NNN/bills",
114 "customer": "/ledger/customers/v1/XXX/customer/123456",
115 "operation" : [
Simon Melin 29.1 116 {
117 "rel" : "add-card-info",
118 "method" : "post",
119 "href" : "/ledger/account/v1/XXX/accounts/NNN/cards"
120 },
121 {
122 "rel" : "request-close-account",
123 "method" : "post",
124 "href" : "/ledger/account/v1/XXX/accounts/NNN/request-close-account"
125 },
126 {
127 "rel" : "apply-for-raised-credit-limit",
128 "method" : "post",
129 "href" : "/ledger/account-onboardings/v1/XXX/accounts/NNN/apply-for-raised-credit-limit"
130 },
131 {
132 "rel" : "partial-update",
133 "method" : "patch",
134 "href" : "/ledger/account-onboardings/v1/XXX/accounts/NNN"
135 }
Simon Melin 33.1 136 ]
137 }
138 ],
139 "navigation": {
Simon Melin 36.1 140 "@id": "/ledger/account/v1/XXX/accounts",
141 "first": "/ledger/account/v1/XXX/accounts?skip=0",
142 "previous": "/ledger/account/v1/XXX/accounts?skip=0"
Simon Melin 33.1 143 }
Simon Melin 29.1 144 }
145 {{/code}}
146
Rasmus Enekvist 1.1 147 ==== Get a specific account ====
148
David Persson 65.1 149 ==== ====
Rasmus Enekvist 1.1 150
151 {{code language="http" title="**Request**"}}
Rasmus Enekvist 5.1 152 GET /ledger/account/v1/XXX/accounts/NNN HTTP/1.1
Rasmus Enekvist 1.1 153 Host: -
154 Authorization: Bearer <Token>
155 Content-Type: application/json
156 {{/code}}
157
158
159 {{code language="http" title="**Response**"}}
160 HTTP/1.1 200 OK
161 Content-Type: application/json
162
163 {
Rasmus Enekvist 5.1 164 "@id": "/ledger/account/v1/XXX/accounts/NNN",
Rasmus Enekvist 1.1 165 "accountNo": "1234567",
166 "startDate": "2018-05-21",
167 "description": null,
168 "accountProfileType": "accountType1 | accountType2 | accountType3 etc.",
169 "accountAlias" : "accountAlias1 | accountAlias2 etc.",
170 "customerNo" : "123789654",
171 "status" : "Open | PendingClose | Closed",
172 "creditLimit": 2000.00,
173 "totalBalance" : -1900.0,
174 "reservedAmount": 50.0,
175 "availableAmount": 3850.0,
Rasmus Enekvist 17.1 176 "maxPaymentAmount": 51900.0,
Rasmus Enekvist 5.1 177 "openBill" : "/ledger/account/v1/XXX/accounts/NNN/bills/reminder-456",
Rasmus Enekvist 1.1 178 "charityDonation": true,
179 "interestRate": {
180 "debtInterest" : 10.00,
181 "penaltyInterest": 15.00
182 },
183 "bankPayment": {
184 "bankAccountNo": "123",
185 "bankAccountType": "BGSE",
186 "bic": "123456",
187 "iban": "SE12345678945631",
188 "paymentReference": "54867165675646"
189 },
Rasmus Enekvist 5.1 190 "activePaymentOrders": "/ledger/account/v1/XXX/accounts/NNN/active-payment-orders",
191 "recurringPaymentConfiguration": "/ledger/account/v1/XXX/accounts/NNN/recurring-payment-configuration",
192 "cards": "/ledger/account/v1/XXX/accounts/123456/cards",
193 "transactions": "/ledger/account/v1/XXX/accounts/NNN/transactions",
Jenny Eklund 66.1 194 "reservations": "/ledger/account/v1/XXX/accounts/NNN/reservations",
195 "activeComplaints": "/ledger/account/v1/XXX/accounts/NNN/active-complaints",
Rasmus Enekvist 1.1 196 "currency": "sek",
Rasmus Enekvist 5.1 197 "bills": "/ledger/account/v1/XXX/accounts/NNN/bills",
Rasmus Enekvist 1.1 198 "customer": "/ledger/customers/v1/XXX/customer/123456",
199 "operation" : [
200 {
201 "rel" : "add-card-info",
202 "method" : "post",
Rasmus Enekvist 5.1 203 "href" : "/ledger/account/v1/XXX/accounts/NNN/cards"
Rasmus Enekvist 1.1 204 },
205 {
206 "rel" : "request-close-account",
207 "method" : "post",
Rasmus Enekvist 5.1 208 "href" : "/ledger/account/v1/XXX/accounts/NNN/request-close-account"
Rasmus Enekvist 1.1 209 },
210 {
211 "rel" : "apply-for-raised-credit-limit",
212 "method" : "post",
Rasmus Enekvist 5.1 213 "href" : "/ledger/account-onboardings/v1/XXX/accounts/NNN/apply-for-raised-credit-limit"
Rasmus Enekvist 1.1 214 },
215 {
216 "rel" : "partial-update",
217 "method" : "patch",
Rasmus Enekvist 5.1 218 "href" : "/ledger/account-onboardings/v1/XXX/accounts/NNN"
Rasmus Enekvist 1.1 219 }
220 ]
221 }
222 {{/code}}
223
224 ==== Change charitydonation ====
225
226 {{code language="http" title="**Request**"}}
Rasmus Enekvist 5.1 227 PATCH /ledger/account/v1/XXX/accounts/NNN HTTP/1.1
Rasmus Enekvist 1.1 228 Host: -
229 Authorization: Bearer <Token>
230 Content-Type: application/json
231
232 {
233 "charityDonation": false
234 }
235 {{/code}}
236
Per Karlsson 61.1 237 {{code language="http" title="**Response**"}}
238 HTTP/1.1 204 NO CONTENT
239 Content-Type: application/json
Rasmus Enekvist 1.1 240
Per Karlsson 61.1 241 {{/code}}
242
Per Karlsson 63.1 243 ==== Request for closing an account ====
Per Karlsson 61.1 244
245 {{code language="http" title="**Request**"}}
Per Karlsson 62.1 246 POST /ledger/account/v1/XXX/accounts/NNN/request-close-account HTTP/1.1
Per Karlsson 61.1 247 Host: -
248 Authorization: Bearer <Token>
249 Content-Type: application/json
250
251 {{/code}}
252
Rasmus Enekvist 1.1 253 {{code language="http" title="**Response**"}}
254 HTTP/1.1 204 NO CONTENT
255 Content-Type: application/json
256
257 {{/code}}
258
259 ==== Lower the creditlimit ====
260
261 The creditlimit can only be lowered through this patch API call. Increasing of the creditlimit requires signing and has not been implemented yet.
262
263 {{code language="http" title="**Request**"}}
Rasmus Enekvist 5.1 264 PATCH /ledger/account/v1/XXX/accounts/NNN HTTP/1.1
Rasmus Enekvist 1.1 265 Host: -
266 Authorization: Bearer <Token>
267 Content-Type: application/json
268
269 {
270 "creditLimit": 2000.00
271 }
272 {{/code}}
273
274
275 {{code language="http" title="**Response**"}}
276 HTTP/1.1 204 NO CONTENT
277 Content-Type: application/json
278
279 {{/code}}
280
281 ==== Account resource properties ====
282
283 (% class="table-bordered table-striped" %)
284 |=(% style="width: 215px;" %)Property|=(% style="width: 114px;" %)Data type|=(% style="width: 161px;" %)Format|=(% style="width: 61px;" %)Modify (patch)|=(% style="width: 877px;" %)Description
285 |(% style="width:215px" %)@id |(% style="width:114px" %)string|(% style="width:161px" %)Maxlength: |(% style="width:61px" %) |(% style="width:877px" %)Uri of the specific account
286 |(% style="width:215px" %)accountNo |(% style="width:114px" %)string|(% style="width:161px" %)Maxlength: 50|(% style="width:61px" %) |(% style="width:877px" %)The identifier of the account
287 |(% 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
288 |(% 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
289 |(% 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//
290 |(% 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//
291 |(% 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)
292 |(% style="width:215px" %)status |(% style="width:114px" %)string|(% style="width:161px" %)Maxlength: 25|(% style="width:61px" %) |(% style="width:877px" %)Status of the account(((
293 * **PendingClose**: the customer has requested the account to be closed, the account will be closed when possible.
294 * **Open**: the account is open and active
295 * **Closed**: the account has been closed
296 )))
297 |(% 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. This value can only be 0 or positive.
298 |(% 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.). This value can be either positive or negative. Negative means it is a surplus and positive means it is a debt.
299 |(% 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). This value can only be positive.
300 |(% 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). This value can only be positive.
Rasmus Enekvist 18.1 301 |(% style="width:215px" %)maxPaymentAmount|(% style="width:114px" %)decimal|(% style="width:161px" %) |(% style="width:61px" %) |(% style="width:877px" %)The largest amount possible to deposit on the account at this moment.
Rasmus Enekvist 1.1 302 |(% style="width:215px" %)openBill|(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
303 |(% 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
304 |(% style="width:215px" %)interestRate.debtInterest|(% style="width:114px" %)decimal|(% style="width:161px" %)Percentage|(% style="width:61px" %) |(% style="width:877px" %)yearly debt interestrate
305 |(% style="width:215px" %)interestRate.penaltyInterest|(% style="width:114px" %)decimal|(% style="width:161px" %)Percentage|(% style="width:61px" %) |(% style="width:877px" %)yearly penalty interestrate
David Persson 28.1 306 |(% style="width:215px" %)bankPayment|(% style="width:114px" %)object|(% style="width:161px" %) |(% style="width:61px" %) |(% style="width:877px" %)Details on how to make a bank payment to the account
307 |(% style="width:215px" %) bankAccountNo|(% style="width:114px" %)string|(% style="width:161px" %) |(% style="width:61px" %) |(% style="width:877px" %)Bank account number for payments against the current account
308 |(% style="width:215px" %) bankAccountType|(% style="width:114px" %)string|(% style="width:161px" %) |(% style="width:61px" %) |(% style="width:877px" %)(((
309 Type of bank account
310
311 * BGSE
312 * PGSE
313 * BKNO
314 )))
315 |(% style="width:215px" %) bic|(% style="width:114px" %)string|(% style="width:161px" %) |(% style="width:61px" %) |(% style="width:877px" %)BIC/SWIFT (Business Identifier Code)
316 |(% style="width:215px" %) iban|(% style="width:114px" %)string|(% style="width:161px" %) |(% style="width:61px" %) |(% style="width:877px" %)IBAN (International Bank Account Number)
317 |(% style="width:215px" %) paymentReference|(% style="width:114px" %)string|(% style="width:161px" %) |(% style="width:61px" %) |(% style="width:877px" %)Payment reference of the current account
Rasmus Enekvist 1.1 318 |(% style="width:215px" %)recurringPaymentConsent|(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
319 |(% style="width:215px" %)cards |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
320 |(% style="width:215px" %)transactions |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
321 |(% 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" %)
322 |(% style="width:215px" %)bills |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
323 |(% style="width:215px" %)customer |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
324 |(% style="width:337px" %)activePaymentOrder.paymentMethod|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 15|(% style="width:61px" %)(((
325
326 )))|(% style="width:877px" %)(((
327 PaymentTypes:
328
329 * AUTOGIRO
330 )))
331 |(% 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)
332 |(% 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
333 |(% style="width:215px" %) |(% style="width:114px" %) |(% style="width:161px" %) |(% style="width:61px" %) |(% style="width:877px" %)
334
Rasmus Enekvist 19.1 335 ----
336
Rasmus Enekvist 26.1 337 ==== Register-psp-payment ====
Rasmus Enekvist 19.1 338
339 Method: POST
Rasmus Enekvist 20.1 340 Execution of this operation will result in an attempt to deposit the amount on the given account.
Rasmus Enekvist 19.1 341
342 (% class="box infomessage" %)
343 (((
344 Access to this operation is not normally granted, unless otherwise agreed.
345 )))
346
347 {{code language="http" title="**Request**"}}
Rasmus Enekvist 20.1 348 POST /ledger/account/v1/XXX/accounts/NNN/register-psp-payment HTTP/1.1
Rasmus Enekvist 19.1 349 Host: -
350 Authorization: Bearer <Token>
351 Content-Type: application/json
352
353 {
Rasmus Enekvist 20.1 354 "Amount": 2000.00,
355 "PaymentDate": "2021-01-01",
356 "sourcePspPaymentTransactionId": "123456789"
Rasmus Enekvist 19.1 357 }
358 {{/code}}
359
360
Rasmus Enekvist 24.1 361 {{code language="http" title="**Response**"}}
362 HTTP/1.1 204 NO CONTENT
363 Content-Type: application/json
364
365 {{/code}}
366
Rasmus Enekvist 23.1 367 ===== Register-psp-payment resource properties =====
Rasmus Enekvist 19.1 368
369 (% class="table-bordered table-striped" %)
370 |=(% style="width: 161px;" %)Property|=(% style="width: 121px;" %)Data type|=(% style="width: 195px;" %)Format|=(% style="width: 1309px;" %)Description
Rasmus Enekvist 20.1 371 |(% style="width:161px" %)Amount|(% style="width:121px" %)Decimal|(% style="width:195px" %) |(% style="width:1309px" %)Amount to deposit on account, max value is found on the account resource in the property "MaxPaymentAmount".
372 |(% style="width:161px" %)PaymentDate|(% style="width:121px" %)Date|(% style="width:195px" %)[[ISO 8601>>url:http://en.wikipedia.org/wiki/ISO_8601||rel="noreferrer" title="ISO8601 on Wikipedia"]]|(% style="width:1309px" %)Date of the actual payment
373 |(% style="width:161px" %)sourcePspPaymentTransactionId|(% style="width:121px" %)String|(% style="width:195px" %)Maxlength: 50|(% style="width:1309px" %)Unique identifier for the payment
Rasmus Enekvist 19.1 374
375 ----
376
Rasmus Enekvist 1.1 377 == Bills ==
378
379 The bills resources contains all the documents produced in the accounts billing cycle.
380
381
382 ==== List all bills of an account ====
383
384
385 {{code language="http" title="**Request**"}}
Rasmus Enekvist 6.1 386 GET /ledger/account/v1/XXX/accounts/NNN/bills HTTP/1.1
Rasmus Enekvist 1.1 387 Host: -
388 Authorization: Bearer <Token>
389 Content-Type: application/json
390
391 {{/code}}
392
393
394 {{code language="http" title="**Response**"}}
395 HTTP/1.1 200 OK
396 Content-Type: application/json
397
398 {
Rasmus Enekvist 6.1 399 "@id": "/ledger/account/v1/501/accounts/NNN/bills?status=open",
Rasmus Enekvist 1.1 400 "items" : [
401 {
Rasmus Enekvist 6.1 402 "@id": "/ledger/account/v1/XXX/accounts/NNN/bills/reminder-123645",
Rasmus Enekvist 1.1 403 "dueDate": "2018-12-05",
404 "billDate": "2018-11-15",
405 "billNo": "124645",
406 "billAmount": 240.00,
407 "billType" : "reminder",
408 "status": "open",
Helene Brewitz 41.1 409 "externalBillId": "27",
Rasmus Enekvist 1.1 410 "activePaymentDetails": {
411 "minimumAmountToBePayed": 240.00,
412 "bankAccountNo": "123",
413 "bankAccountType": "BGSE",
414 "bic": "123456",
415 "iban": "SE12345678945631",
416 "paymentReference": "5465164654663",
417 "paymentOrdersExists": true,
418 },
Rasmus Enekvist 6.1 419 "document": "/ledger/account/v1/XXX/accounts/NNN/bills/reminder-124645/document"
Rasmus Enekvist 1.1 420 },
421 {
Rasmus Enekvist 6.1 422 "@id": "/ledger/account/v1/XXX/accounts/NNN/bills/reminder-123645",
Rasmus Enekvist 1.1 423 "dueDate": "2018-12-05",
424 "billDate": "2018-11-15",
425 "billNo": "124645",
426 "billAmount": 240.00,
427 "billType" : "bill",
428 "status": "closed",
Helene Brewitz 41.1 429 "externalBillId": "37",
Rasmus Enekvist 1.1 430 "activePaymentDetails": null,
Rasmus Enekvist 6.1 431 "document": "/ledger/account/v1/XXX/accounts/NNN/bills/reminder-124645/document"
Rasmus Enekvist 1.1 432 },
433 {
Rasmus Enekvist 6.1 434 "@id": "/ledger/account/v1/XXX/accounts/NNN/bills/bill-123645",
Rasmus Enekvist 1.1 435 "dueDate": "2018-12-05",
436 "billDate": "2018-11-15",
437 "billNo": "124645",
438 "billAmount": 240.00,
439 "billType" : "bill",
440 "status": "closed",
Helene Brewitz 41.1 441 "externalBillId": "47",
Rasmus Enekvist 1.1 442 "activePaymentDetails": null,
Rasmus Enekvist 6.1 443 "document": "/ledger/account/v1/XXX/accounts/NNN/bills/reminder-124645/document"
Rasmus Enekvist 1.1 444 }
445 ]
446 }
447 {{/code}}
448
David Persson 65.1 449 ==== ====
Rasmus Enekvist 1.1 450
451 ==== Get specific bill ====
452
453
454 {{code language="http" title="**Request**"}}
Rasmus Enekvist 7.1 455 GET /ledger/account/v1/XXX/accounts/NNN/bills/456 HTTP/1.1
Rasmus Enekvist 1.1 456 Host: -
457 Authorization: Bearer <Token>
458 Content-Type: application/json
459
460 {{/code}}
461
462
463 {{code language="http" title="**Response**"}}
464 HTTP/1.1 200 OK
465 Content-Type: application/json
466
467 {
Rasmus Enekvist 7.1 468 "@id": "/ledger/account/v1/XXX/accounts/NNN/bills/reminder-123645",
Rasmus Enekvist 1.1 469 "dueDate": "2018-12-05",
470 "billDate": "2018-11-15",
471 "billNo": "124645",
472 "billAmount": 240.00,
473 "billType" : "reminder",
474 "status": "open",
Helene Brewitz 42.1 475 "externalBillId": "42",
Rasmus Enekvist 1.1 476 "activePaymentDetails": {
477 "minimumAmountToBePayed": 240.00,
478 "bankAccountNo": "123",
479 "bankAccountType": "BGSE",
480 "bic": "123456",
481 "iban": "SE12345678945631",
482 "paymentReference": "5465164654663",
483 "paymentOrdersExists": true,
484 },
Rasmus Enekvist 7.1 485 "document": "/ledger/account/v1/XXX/accounts/NNN/bills/reminder-124645/document"
Rasmus Enekvist 1.1 486 }
487 {{/code}}
488
489 ==== Bill resource properties ====
490
491 (% class="table-bordered table-striped" %)
492 |=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 621px;" %)Description
493 |(% style="width:337px" %)@id|(% style="width:205px" %)string|(% style="width:208px" %)Uri|(% style="width:621px" %)
494 |(% 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" %)
495 |(% style="width:337px" %)billDate|(% style="width:205px" %)date|(% style="width:208px" %) |(% style="width:621px" %)Date when bill was created
496 |(% style="width:337px" %)billNo|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 50|(% style="width:621px" %)The identifier of the bill
497 |(% style="width:337px" %)billAmount|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %)the amount that is stated on the actual bill/document
498 |(% style="width:337px" %)billType|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 25|(% style="width:621px" %)(((
499 BillTypes:
500
501 * Bill
502 * Reminder1
503 * Reminder2
504 * Collection
505 )))
Helene Brewitz 43.1 506 |(% style="width:337px" %)status|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:621px" %)(((
507 "open" / "closed"
508 )))
Helene Brewitz 44.1 509 |(% style="width:337px" %)externalBillId|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:621px" %)Optional external reference
Rasmus Enekvist 1.1 510 |(% style="width:337px" %)activePaymentDetails|(% style="width:205px" %)object|(% style="width:208px" %) |(% style="width:621px" %)only set if status of bill is "open"
511 |(% style="width:337px" %)activePaymentDetails.minimumAmountToBePayed|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %)The least amount to pay on the bill
512 |(% style="width:337px" %)activePaymentDetails.bankAccountNo|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 15|(% style="width:621px" %)bankaccount for payment
513 |(% style="width:337px" %)activePaymentDetails.bankAccountType|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 10|(% style="width:621px" %)BankAccountTypes:(((
514 * BKSE (swedish bankaccount)
515 * PKSE (swedish plusgiro)
516 * BGSE (swedish bankgiro)
517 * PGSE (swedish plusgiro OCR)
518 )))
519 |(% style="width:337px" %)activePaymentDetails.bic|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 11|(% style="width:621px" %)Bank Identifier Code (BIC)
520 |(% style="width:337px" %)activePaymentDetails.iban|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 34|(% style="width:621px" %)International Bank Account Number (IBAN)
521 |(% style="width:337px" %)activePaymentDetails.paymentReference|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 50|(% style="width:621px" %)reference to specify on the payment
522 |(% 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".
523 //More detailed information about the payment order can be found on the accounts resource//
524 |(% style="width:337px" %)document|(% style="width:205px" %)string|(% style="width:208px" %)Url|(% style="width:621px" %)Url to download pdf document
525
526 == Cards ==
527
528 ==== Add card to account ====
529
530 Execute http post towards this resource to add a new card to the specified account
531
532 {{code language="http" title="**Request**"}}
Rasmus Enekvist 8.1 533 POST /ledger/account/v1/XXX/accounts/NNN/cards HTTP/1.1
Rasmus Enekvist 1.1 534 Host: -
535 Authorization: Bearer <Token>
536 Content-Type: application/json
537
538 {
539 "token": "954c8699-b38f-47a2-b568-668b8837dad8",
540 "PanTrunc": "85479*********648",
541 "deleted" : false,
542 "mainCard": true,
543 "cardHolder" : {
544 "number" : "123465",
545 "name": "test testsson",
546 "nationalConsumerIdentifier": {
547 "value": "19101010-1010",
548 "countryCode": "SE"
549 }
550 }
551 }
552 {{/code}}
553
554 ==== Add replacement card ====
555
556 This operation is used to replace an existing card, and is therefore executed on the card to be replaced. The contract of the postbody is the same as POST towards the cards resource.
557
558 {{code language="http" title="**Request**"}}
Rasmus Enekvist 8.1 559 POST /ledger/account/v1/XXX/accounts/NNN/cards/954c8699-b38f-47a2-b568-668b8837dad8/add-replacement-card HTTP/1.1
Rasmus Enekvist 1.1 560 Host: -
561 Authorization: Bearer <Token>
562 Content-Type: application/json
563
564 {
565 "token": "954c8699-b38f-47a2-b568-668b8837dad8",
566 "PanTrunc": "85479*********648",
567 "deleted" : false,
568 "mainCard": true,
569 "cardHolder" : {
570 "number" : "123465",
571 "name": "test testsson",
572 "nationalConsumerIdentifier": {
573 "value": "19101010-1010",
574 "countryCode": "SE"
575 }
576 }
577 }
578 {{/code}}
579
580 ==== List cards on an account ====
581
582 {{code language="http" title="**Request**"}}
Rasmus Enekvist 8.1 583 GET /ledger/account/v1/XXX/accounts/NNN/cards HTTP/1.1
Rasmus Enekvist 1.1 584 Host: -
585 Authorization: Bearer <Token>
586 Content-Type: application/json
587
588
589 {{/code}}
590
591
592 {{code language="http" title="**Response**"}}
593 HTTP/1.1 200 OK
594 Content-Type: application/json
595
596 {
597 "operations": null,
598 "items": [
599 {
600 "token": "954c8699-b38f-47a2-b568-668b8837dad8",
601 "PanTrunc": "85479*********648",
602 "deleted" : false,
603 "mainCard": true,
604 "cardHolder" : {
605 "number" : "123465",
606 "name": "test testsson",
607 "nationalConsumerIdentifier": {
608 "value": "19101010-1010",
609 "countryCode": "SE"
610 }
611 },
Rasmus Enekvist 8.1 612 "@id": "/ledger/account/v1/XXX/accounts/NNN/cards/741"
Rasmus Enekvist 1.1 613 },
614 {
615 "token": "274c8699-b38f-47a2-b568-668b8837dat7",
616 "PanTrunc": "78979*********321",
617 "deleted" : false,
618 "mainCard": false,
619 "cardHolder" : {
620 "number" : "987654",
621 "name": "test testsson",
622 "nationalConsumerIdentifier": {
623 "value": "19101010-1010",
624 "countryCode": "SE"
625 }
626 },
Rasmus Enekvist 8.1 627 "@id": "/ledger/account/v1/XXX/accounts/NNN/cards/274c8699-b38f-47a2-b568-668b8837dat7"
Rasmus Enekvist 1.1 628 }
629 ],
Rasmus Enekvist 8.1 630 "@id": "/ledger/account/v1/XXX/accounts/NNN/cards",
Rasmus Enekvist 1.1 631 "view": {
Rasmus Enekvist 8.1 632 "@id": "/ledger/account/v1/XXX/accounts/NNN/cards?$top=2&$skip=0",
633 "next": "/ledger/account/v1/XXX/accounts/NNN/cards?$top=2&$skip=2"
Rasmus Enekvist 1.1 634 }
635 }
636 {{/code}}
637
638 ==== Get a specific card ====
639
640
641 {{code language="http" title="**Request**"}}
Rasmus Enekvist 8.1 642 GET /ledger/account/v1/XXX/accounts/NNN/cards/954c8699-b38f-47a2-b568-668b8837dad8 HTTP/1.1
Rasmus Enekvist 1.1 643 Host: -
644 Authorization: Bearer <Token>
645 Content-Type: application/json
646
647
648 {{/code}}
649
650 {{code language="http" title="**Response**"}}
651 HTTP/1.1 200 OK
652 Content-Type: application/json
653
654 {
655 "token": "954c8699-b38f-47a2-b568-668b8837dad8",
656 "PanTrunc": "85479*********648",
657 "deleted" : false,
658 "mainCard": true,
659 "cardHolder" : {
660 "number" : "123465",
661 "name": "test testsson",
662 "nationalConsumerIdentifier": {
663 "value": "19101010-1010",
664 "countryCode": "SE"
665 }
666 },
Rasmus Enekvist 8.1 667 "@id": "/ledger/account/v1/XXX/accounts/NNN/cards/954c8699-b38f-47a2-b568-668b8837dad8",
668 "parentHREF": "/ledger/account/v1/XXX/accounts/NNN",
Rasmus Enekvist 1.1 669 "operation" : [
670 {
671 "rel" : "partial-update",
672 "method" : "patch",
Rasmus Enekvist 8.1 673 "href" : "/ledger/account/v1/XXX/accounts/NNN/cards/954c8699-b38f-47a2-b568-668b8837dad8"
Rasmus Enekvist 1.1 674 },
675 {
676 "rel": "add-replacement-card",
Rasmus Enekvist 8.1 677 "href": "/ledger/account/v1/XXX/accounts/NNN/cards/5823a2d9-34d2-4bc4-8b6d-1e27f4511363/add-replacement-card",
Rasmus Enekvist 1.1 678 "method": "POST"
679 }
680 ]
681 }
682 {{/code}}
683
684 ==== Card resource properties ====
685
686 (% class="table-bordered table-striped" %)
687 |=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 62px;" %)Modify (patch)|=(% style="width: 1401px;" %)Description
688 |(% style="width:337px" %)token|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)token identifier of the card
689 |(% style="width:337px" %)panTrunc|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)truncated PAN
690 |(% 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
691 |(% 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)
692 |(% style="width:337px" %)cardHolder.number|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)Cardholder customernumber
693 |(% style="width:337px" %)cardHolder.name|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)Cardholder fullname
694 |(% style="width:337px" %)cardHolder.nationalConsumerIdentifier.value|(% style="width:205px" %)string|(% style="width:208px" %)YYYYMMDD-NNNC|(% style="width:62px" %) |(% style="width:1401px" %)
695 |(% 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" %)
696
697 == Transactions ==
698
699 ==== List transactions on an account ====
700
701 You can filter transactions by date in two different ways. Either filtering can be done by date range or by listing transactions by month.
702
703 **Date range example**
704
705 {{code language="http" title="**Request**"}}
Rasmus Enekvist 9.1 706 GET /ledger/account/v1/XXX/accounts/NNN/transactions?fromDate=2020-02-10&todate=2020-06-01 HTTP/1.1
Rasmus Enekvist 1.1 707 Host: -
708 Authorization: Bearer <Token>
709 Content-Type: application/json
710
711
712 {{/code}}
713
714 **Monthly example**
715
716 {{code language="http" title="**Request**"}}
Rasmus Enekvist 9.1 717 GET /ledger/account/v1/XXX/accounts/NNN/transactions?month=2020-04 HTTP/1.1
Rasmus Enekvist 1.1 718 Host: -
719 Authorization: Bearer <Token>
720 Content-Type: application/json
721
722
723 {{/code}}
724
725 **Standard (default last 30 days) **
726
727 {{code language="http" title="**Request**"}}
Rasmus Enekvist 9.1 728 GET /ledger/account/v1/XXX/accounts/NNN/transactions HTTP/1.1
Rasmus Enekvist 1.1 729 Host: -
730 Authorization: Bearer <Token>
731 Content-Type: application/json
732
733
734 {{/code}}
735
736
737 {{code language="http" title="**Response**"}}
738 HTTP/1.1 200 OK
739 Content-Type: application/json
740
741 {
742 "operations": null,
743 "items": [
744 {
745 "type": "payment",
746 "description": "",
747 "amount": 200.00,
748 "initiatedFromPointOfSale": false,
749 "date": "2019-10-09"
750 },
751 {
752 "type": "purchase",
753 "description": "testbutiken, köpref. 12345689",
754 "amount": 200.00,
755 "initiatedFromPointOfSale": true,
756 "date": "2019-10-09"
757 },
758 {
759 "type": "credit",
760 "description": "",
761 "amount": 200.00,
762 "initiatedFromPointOfSale": true,
763 "date": "2019-10-09"
764 }
765 ],
Rasmus Enekvist 9.1 766 "@id": "/ledger/account/v1/XXX/accounts/NNN/transactions"
Rasmus Enekvist 1.1 767 }
768 {{/code}}
769
770 ==== Transaction resource properties ====
771
772 (% class="table-bordered table-striped" %)
773 |=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 621px;" %)Description
774 |(% style="width:337px" %)type|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:621px" %)(((
775 Type of transaction
776
777 * Payment
778 * Purchase
779 * Credit
780 * AdministrationFee
781 * BillingFee
782 * CollectionFee
783 * Deduction
784 * Disbursement
785 * DisbursementReturned
786 * Interest
787 * LateFee
788 * ReminderFee
789 * MigratedBalance// (Amount of the initially migrated balance on the account)//
790 )))
791 |(% 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"
792 |(% style="width:337px" %)amount|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %)This value can be either positive or negative. Negative means decreasing debt or increasing surplus. Positive transactions increases debt or decreases surplus.
793 |(% style="width:337px" %)initiatedFromPointOfSale|(% style="width:205px" %)bool|(% style="width:208px" %) |(% style="width:621px" %)Indicates whether the transaction was initiated from point of sale, or else it is a "ledger" transaction that was initiated internally in the ledgersystem.
794 |(% style="width:337px" %)date|(% style="width:205px" %)date|(% style="width:208px" %) |(% style="width:621px" %)Date when the transaction was initiated (Authorization date)
795
796 == Reservations ==
797
798 ==== List reservations in an account ====
799
800 {{code language="http" title="**Request**"}}
Rasmus Enekvist 10.1 801 GET /ledger/account/v1/XXX/accounts/NNN/reservations HTTP/1.1
Rasmus Enekvist 1.1 802 Host: -
803 Authorization: Bearer <Token>
804 Content-Type: application/json
805
806
807 {{/code}}
808
809
810 {{code language="http" title="**Response**"}}
811 HTTP/1.1 201 Created
812 Content-Type: application/json
813
814 {
815 "operations": null,
816 "items": [
817 {
818 "amount": 200.00,
819 "description" : "",
820 "date": "2019-10-05",
821 },
822 {
823 "amount": 450.00,
824 "description" : "",
825 "date": "2019-10-02",
826 },
827 ],
Rasmus Enekvist 10.1 828 "@id": "/ledger/account/v1/XXX/accounts/NNN/reservations",
Rasmus Enekvist 1.1 829 }
830 {{/code}}
831
832 ==== Reservation resource properties ====
833
834 (% class="table-bordered table-striped" %)
835 |=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 621px;" %)Description
836 |(% style="width:337px" %)amount|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %)
837 |(% style="width:337px" %)description|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:621px" %)Description of the reservation, normally "point of sale".
838 |(% style="width:337px" %)date|(% style="width:205px" %)date|(% style="width:208px" %) |(% style="width:621px" %)Date when the reservation occured
839
840 == Recurring-payment-configuration ==
841
842 (% class="wikigeneratedid" %)
843 This resource contain information/settings related to how recurring payments should behave on this account.
844
845 ====
846 Get settings on an account ====
847
848
849 {{code language="http" title="**Request**"}}
Rasmus Enekvist 11.1 850 GET /ledger/account/v1/XXX/accounts/NNN/recurring-payment-configuration/ HTTP/1.1
Rasmus Enekvist 1.1 851 Host: -
852 Authorization: Bearer <Token>
853 Content-Type: application/json
854 {{/code}}
855
856
857 {{code language="http" title="**Response**"}}
858 HTTP/1.1 200 OK
859 Content-Type: application/json
860
861 {
Rasmus Enekvist 11.1 862 "@id" : "/ledger/account/v1/XXX/accounts/NNN/recurring-payment-configurations",
Rasmus Enekvist 1.1 863 "paymentMethod" : "autogiro",
864 "paymentScope" : "fixedRecurring",
865 "fixedAmount" : 1500.00,
Rasmus Enekvist 11.1 866 "parentHREF": "/ledger/account/v1/XXX/accounts/NNN",
Rasmus Enekvist 1.1 867 "operation" : [
868 {
869 "rel" : "partially-update-recurring-payment-consent",
870 "method" : "patch",
Rasmus Enekvist 11.1 871 "href" : "/ledger/account/v1/XXX/accounts/NNN/recurring-payment-consent"
Rasmus Enekvist 1.1 872 }
873 ]
874 }
875 {{/code}}
876
877 ==== Create settings on an account ====
878
879 (% class="wikigeneratedid" %)
880 Execute http **POST **towards this resource to create recurring payments configuration for specified account.
881
882 {{code language="http" title="**Request**"}}
Rasmus Enekvist 11.1 883 POST /ledger/account/v1/XXX/accounts/NNN/recurring-payment-configuration HTTP/1.1
Rasmus Enekvist 1.1 884 Host: -
885 Authorization: Bearer <Token>
886 Content-Type: application/json
887
888 {
889 "paymentMethod" : "autogiro",
890 "paymentScope" : "billedAmount",
891 "fixedAmount" : 0.00
892 }
893 {{/code}}
894
895 ====
896 Update settings on an account ====
897
898 (% class="wikigeneratedid" %)
899 Execute http **PATCH** towards this resource to update the recurring payment configuration
900
901 {{code language="http" title="**Request**"}}
Rasmus Enekvist 11.1 902 PATCH /ledger/account/v1/XXX/accounts/NNN/recurring-payment-configuration HTTP/1.1
Rasmus Enekvist 1.1 903 Host: -
904 Authorization: Bearer <Token>
905 Content-Type: application/json
906
907 {
908 "paymentScope" : "billedAmount",
909 "fixedAmount" : 0.00
910 }
911 {{/code}}
912
913 ==== Delete settings on an account ====
914
915 (% class="wikigeneratedid" %)
916 Execute http **DELETE **to delete the recurring payment settings for the specified account. By deleting the settings, the account will not use the consent registered on the customer for recurring payments.
917
918 {{code language="http" title="**Request**"}}
Rasmus Enekvist 11.1 919 DELETE /ledger/account/v1/XXX/accounts/NNN/recurring-payment-configuration HTTP/1.1
Rasmus Enekvist 1.1 920 Host: -
921 Authorization: Bearer <Token>
922 Content-Type: application/json
923
924 {}
925 {{/code}}
926
927 ==== Recurring-payment-configuration resource properties ====
928
929 (% class="table-bordered table-striped" %)
930 |=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 58px;" %)Modify (patch)|=(% style="width: 1176px;" %)Description
931 |(% style="width:337px" %)paymentMethod|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="background-color:palegreen; width:58px" %) |(% style="width:1176px" %)paymentMethods:(((
932 * autogiro
933 )))
934 |(% style="width:337px" %)paymentScope|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="background-color:palegreen; width:58px" %) |(% style="width:1176px" %)(((
935 paymentScopes:
936
937 * fixedRecurring (Fixed amount to debit monthly)
Rasmus Enekvist 11.1 938 * totalDebt (Total account debt / used credit will be debited each month)
Rasmus Enekvist 1.1 939 * billedAmount (Only the //"minimum amount to pay"// will be debited each month)
940 )))
941 |(% 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")
942
943 == Active-payment-orders ==
944
945 (% class="wikigeneratedid" %)
946 This resource corresponds to an active / scheduled payment order placed against the specific account, the end-customer will be debited at the given executeDate.
947
948 ====
949 Get active payment orders for an account ====
950
951
952 {{code language="http" title="**Request**"}}
Rasmus Enekvist 12.1 953 GET /ledger/account/v1/XXX/accounts/NNN/active-payment-orders/ HTTP/1.1
Rasmus Enekvist 1.1 954 Host: -
955 Authorization: Bearer <Token>
956 Content-Type: application/json
957 {{/code}}
958
959
960 {{code language="http" title="**Response**"}}
961 HTTP/1.1 200 OK
962 Content-Type: application/json
963
964 {
965 "operations": null,
966 "items": [
967 {
968 "paymentMethod": "autogiro",
969 "executeDate": "2020-02-15",
970 "amount": 200.00
971 }
972 ],
973 "view": {
Rasmus Enekvist 12.1 974 "@id": "/ledger/account/v1/XXX/accounts/NNN/active-payment-orders?$top=2&$skip=0",
975 "next": "/ledger/account/v1/XXX/accounts/NNN/active-payment-orders?$top=2&$skip=2"
Rasmus Enekvist 1.1 976 }
977 }
978 {{/code}}
979
David Persson 65.1 980 ==== ====
Rasmus Enekvist 1.1 981
982 ==== Active-payment-orders resource properties ====
983
984 (% class="table-bordered table-striped" %)
985 |=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 58px;" %)Modify (patch)|=(% style="width: 1176px;" %)Description
986 |(% style="width:337px" %)paymentMethod|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:58px" %) |(% style="width:1176px" %)paymentMethods:(((
987 * autogiro
988 )))
989 |(% style="width:337px" %)executeDate|(% style="width:205px" %)Date|(% style="width:208px" %) |(% style="width:58px" %) |(% style="width:1176px" %)(((
990 The date when the payment order will be executed
991 )))
992 |(% 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
993
David Persson 65.1 994 === ===
Rasmus Enekvist 1.1 995
Jenny Eklund 66.1 996 == Active-complaints ==
997
998
999 Get a list of active complaints
1000
1001 ==== List active complaints for an account ====
1002
1003 {{code language="http" title="**Request**"}}
1004 GET /ledger/account/v1/XXX/accounts/NNN/active-complaints HTTP/1.1
1005 Host: -
1006 Authorization: Bearer<Token>
1007 Content-Type: application/json
1008
1009 {{/code}}
1010
1011 Example of response on successfully fetched active complaints. This resource corresponds to active complaints registered on the account at the given created date.
1012
1013 {{code language="http" title="**Response**"}}
1014 HTTP/1.1 200 OK
1015 Content-Type: application/json
1016
1017 {
1018 "items": [
1019 {
1020 "created": "2025-11-06",
1021 "type": "Fraud"
1022 }
1023 ],
1024 "navigation": {
1025 "@id": "/ledger/account/v1/xxx/accounts/nnn/active-complaints"
1026 }
1027 }
1028 {{/code}}
1029
1030 ==== ====
1031
1032 ==== Active-complaints resource properties ====
1033
1034 (% class="table-bordered table-striped" %)
1035 |=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 58px;" %)Modify (patch)|=(% style="width: 1176px;" %)Description
1036 |(% style="width:337px" %)type|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:58px" %) |(% style="width:1176px" %)Types: Fraud, Complaint
1037 |(% style="width:337px" %)created|(% style="width:205px" %)date|(% style="width:208px" %) |(% style="width:58px" %) |(% style="width:1176px" %)(((
1038 The date when the complaint was registered
1039 )))
1040
1041 ==== ====
1042
Mats Lyth 47.1 1043 {{display reference="developer:Main.Invoicing.ledger-api-general-docs.api-section-problems.WebHome"/}}
Rasmus Enekvist 1.1 1044
1045 === Problem types ===
1046
1047 (% class="box infomessage" %)
1048 (((
Mats Lyth 48.1 1049 Note, each problem typecode is preceded by "ledger/account/v1/problems/" in this API, e.g. the error "validation" in the table below will appear as typecode "ledger/account/v1/problems/validation".
Rasmus Enekvist 1.1 1050 )))
1051
1052 (% class="table-bordered table-striped" %)
1053 |=(% style="width: 537px;" %)Problem type (code)|=(% style="width: 172px;" %)Httpstatus|=(% style="width: 796px;" %)Description
1054 |(% style="width:537px" %)validation|(% style="width:172px" %)400|(% style="width:796px" %)occurs if any of the inputvalidation fails, it is described in the problem which parameter that failed the validation
Mats Lyth 45.1 1055 |(% style="width:537px" %)forbidden|(% style="width:172px" %)403|(% style="width:796px" %)occurs if access to method is not allowed.
Mats Lyth 48.1 1056 |(% style="width:537px" %)customer-not-found|(% style="width:172px" %)404|(% style="width:796px" %)can occur if customernumber is part of the querystring towards account resource
Rasmus Enekvist 1.1 1057 |(% style="width:537px" %)card-not-found|(% style="width:172px" %)404|(% style="width:796px" %)
1058 |(% style="width:537px" %)duplicate-card-token|(% style="width:172px" %)409|(% style="width:796px" %)
1059 |(% style="width:537px" %)card-update-failed|(% style="width:172px" %)422|(% style="width:796px" %)
1060 |(% style="width:537px" %)account-not-found|(% style="width:172px" %)404|(% style="width:796px" %)
1061 |(% style="width:537px" %)invalid-reg-no|(% style="width:172px" %)400|(% style="width:796px" %)