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