Changes for page ../credit-account
Last modified by dap on 2022/08/11 10:52
From empty
To version 126.1
edited by dap
on 2020/02/21 09:18
on 2020/02/21 09:18
Change comment: There is no comment for this version
Summary
-
Page properties (6 modified, 0 added, 0 removed)
-
Attachments (0 modified, 5 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,0 +1,1 @@ 1 +../credit-account - Parent
-
... ... @@ -1,0 +1,1 @@ 1 +Main.credit-account.api.WebHome - Author
-
... ... @@ -1,1 +1,1 @@ 1 - XWiki.XWikiGuest1 +xwiki:XWiki.dap - Default language
-
... ... @@ -1,0 +1,1 @@ 1 +en - Tags
-
... ... @@ -1,0 +1,1 @@ 1 +px-custom-page-content - Content
-
... ... @@ -1,0 +1,774 @@ 1 +(% class="jumbotron" %) 2 +((( 3 +(% class="container" %) 4 +((( 5 +Integrate to **PayEx Credit Account API ** 6 +))) 7 +))) 8 + 9 +(% class="box errormessage" %) 10 +((( 11 +Todo: Saknar operation för att hitta konton som tillhör en person/ett personnummer 12 +))) 13 + 14 +(% id="HChangelog" %) 15 += Changelog = 16 + 17 +2020-02-21 18 +Transactions resource changes: 19 + 20 +* removed "billed" property on transactions resource 21 +* removed reservedate property from transactions resource 22 +* added "initiatedFromPointOfSale" property on transactions resource 23 + 24 +2020-02-13 25 + 26 +* Changed name on resource **recurring-payment-setting** to **recurring-payment-configuration** 27 +* Adjusted propertynames om resource recurring-payment-configuration 28 +recurringPaymentMethod -> paymentMethod 29 +recurringPaymentScope -> paymentScope 30 +fixedRecurringAmount -> fixedAmount 31 + 32 +2020-02-06 33 +Added resource "active-payment-orders" 34 + 35 +2020-01-31 36 +renamed resource "recurring-payment-consent" to "recurring-payment-setting" (not implemented in API yet) 37 + 38 + 39 +(% id="HRoutesegments" %) 40 +== Introduction == 41 + 42 +(% class="lead" %) 43 +This api is used to retrieve information and to change properties related to the customer's credit account. 44 + 45 +[[image:1581025117966-675.png||height="367" width="382"]] 46 + 47 + 48 +Each resource in the API corresponds to its own route. All routes are structured according to a specific standard, explained below 49 + 50 +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. 51 +//api.payex.com/ledger/**{Subdomain}**/v1/**{LedgerNumber}**/resource1/**{resource1Id}**/resource2/**{resource2Id}**/resource3/**{resource3Id}**// 52 + 53 +(% class="table-bordered table-striped" %) 54 +|=(% style="width: 604px;" %)Route segment|=(% style="width: 2790px;" %)Description 55 +|(% style="width:604px" %)Subdomain|(% style="width:2790px" %)In this part of the API it will be credit-account 56 +|(% style="width:604px" %)LedgerNumber|(% style="width:2790px" %)The ledger identifier/number at PayEx 57 +|(% style="width:604px" %)resource1Id|(% style="width:2790px" %)Identifier of resource1 58 +|(% style="width:604px" %)resource2Id|(% style="width:2790px" %)identifier of resource2, subresource to resource1 59 +|(% style="width:604px" %)resource3Id|(% style="width:2790px" %)identifier of resource3, subresource to resource2 60 + 61 +(% class="wikigeneratedid" %) 62 +Routes that occurs in examples of this documentation will use the following identifiers 63 + 64 +(% class="table-bordered table-striped" %) 65 +|=(% style="width: 488px;" %)Resource|=(% style="width: 2271px;" %)Identifier 66 +|(% style="width:488px" %)LedgerNumber|(% style="width:2271px" %)XXX 67 +|(% style="width:488px" %)Accounts|(% style="width:2271px" %)NNN 68 +|(% style="width:488px" %)Bills|(% style="width:2271px" %)reminder-123 69 +bill-456 70 +|(% style="width:488px" %)Cards|(% style="width:2271px" %)954c8699-b38f-47a2-b568-668b8837dad8 71 +274c8699-b38f-47a2-b568-668b8837dat7 72 + 73 +== Accounts == 74 + 75 +The **accounts** resource is located under **ledger/credit-account/v1/ **api**. **The accounts- and its sub-resources are used to create, read and modify information related to a credit-account. 76 +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. 77 + 78 +The following operations is supported 79 + 80 +* Change the account credit limit 81 +* Add extra cards 82 +* Request cancellation of account 83 +* Turn on/off charity donation 84 +* Set behaviour of recurring payments 85 + 86 +==== Get a specific account ==== 87 + 88 +==== ==== 89 + 90 +{{code language="http" title="**Request**"}} 91 +GET /ledger/credit-account/v1/XXX/accounts/NNN HTTP/1.1 92 +Host: - 93 +Authorization: Bearer <Token> 94 +Content-Type: application/json 95 +{{/code}} 96 + 97 + 98 +{{code language="http" title="**Response**"}} 99 +HTTP/1.1 200 OK 100 +Content-Type: application/json 101 + 102 +{ 103 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN", 104 + "accountNo": "1234567", 105 + "startDate": "2018-05-21", 106 + "description": null, 107 + "accountProfileType": "accountType1 | accountType2 | accountType3 etc.", 108 + "accountAlias" : "accountAlias1 | accountAlias2 etc.", 109 + "customerNo" : "123789654", 110 + "status" : "open | pending-close | closed", 111 + "creditLimit": 2000.00, 112 + "totalBalance" : -1900.0, 113 + "reservedAmount": 50.0, 114 + "availableAmount": 50.0, 115 + "openBill" : "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-456", 116 + "charityDonation": true, 117 + "interestRate": { 118 + "debtInterest" : 10.00, 119 + "penaltyInterest": 15.00 120 + }, 121 + "bankPayment": { 122 + "bankAccountNo": "123", 123 + "bankAccountType": "BGSE", 124 + "bic": "123456", 125 + "iban": "SE12345678945631", 126 + "paymentReference": "54867165675646" 127 + }, 128 + "activePaymentOrders": "/ledger/credit-account/v1/XXX/accounts/NNN/active-payment-orders", 129 + "recurringPaymentSetting": "/ledger/credit-account/v1/XXX/accounts/NNN/recurring-payment-setting", 130 + "cards": "/ledger/credit-account/v1/XXX/accounts/123456/cards", 131 + "transactions": "/ledger/credit-account/v1/XXX/accounts/NNN/transactions", 132 + "currency": "sek", 133 + "bills": "/ledger/credit-account/v1/XXX/accounts/NNN/bills", 134 + "customer": "/ledger/customers/v1/XXX/customer/123456", 135 + "operation" : [ 136 + { 137 + "rel" : "add-card-info", 138 + "method" : "post", 139 + "href" : "/ledger/credit-account/v1/XXX/accounts/NNN/cards" 140 + }, 141 + { 142 + "rel" : "request-close-account", 143 + "method" : "post", 144 + "href" : "/ledger/credit-account/v1/XXX/accounts/NNN/request-close-account" 145 + }, 146 + { 147 + "rel" : "apply-for-raised-credit-limit", 148 + "method" : "post", 149 + "href" : "/ledger/credit-account-onboardings/v1/XXX/accounts/NNN/apply-for-raised-credit-limit" 150 + }, 151 + { 152 + "rel" : "partial-update", 153 + "method" : "patch", 154 + "href" : "/ledger/credit-account-onboardings/v1/XXX/accounts/NNN" 155 + } 156 + ] 157 +} 158 +{{/code}} 159 + 160 +==== Account resource properties ==== 161 + 162 +(% class="table-bordered table-striped" %) 163 +|=(% style="width: 215px;" %)Property|=(% style="width: 114px;" %)Data type|=(% style="width: 161px;" %)Format|=(% style="width: 61px;" %)Modify (patch)|=(% style="width: 877px;" %)Description 164 +|(% style="width:215px" %)@id |(% style="width:114px" %)string|(% style="width:161px" %)Maxlength: |(% style="width:61px" %) |(% style="width:877px" %)Uri of the specific account 165 +|(% style="width:215px" %)accountNo |(% style="width:114px" %)string|(% style="width:161px" %)Maxlength: 50|(% style="width:61px" %) |(% style="width:877px" %)The identifier of the account 166 +|(% 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 167 +|(% 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 168 +|(% 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// 169 +|(% 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// 170 +|(% 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) 171 +|(% style="width:215px" %)status |(% style="width:114px" %)string|(% style="width:161px" %)Maxlength: 25|(% style="width:61px" %) |(% style="width:877px" %)Status of the account((( 172 +* **pending-close**: the customer has requested the account to be closed, the account will be closed when possible. 173 +* **open**: the account is open and active 174 +* **closed**: the account has been closed 175 +))) 176 +|(% 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 177 +|(% 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.) 178 +|(% 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) 179 +|(% 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) 180 +|(% style="width:215px" %)openBill|(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %) 181 +|(% 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 182 +|(% style="width:215px" %)interestRate.debtInterest|(% style="width:114px" %)decimal|(% style="width:161px" %)Percentage|(% style="width:61px" %) |(% style="width:877px" %)yearly debt interestrate 183 +|(% style="width:215px" %)interestRate.penaltyInterest|(% style="width:114px" %)decimal|(% style="width:161px" %)Percentage|(% style="width:61px" %) |(% style="width:877px" %)yearly penalty interestrate 184 +|(% style="width:215px" %)recurringPaymentConsent|(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %) 185 +|(% style="width:215px" %)cards |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %) 186 +|(% style="width:215px" %)transactions |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %) 187 +|(% 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" %) 188 +|(% style="width:215px" %)bills |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %) 189 +|(% style="width:215px" %)customer |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %) 190 +|(% style="width:337px" %)activePaymentOrder.paymentMethod|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 15|(% style="width:61px" %)((( 191 + 192 +)))|(% style="width:877px" %)((( 193 +PaymentTypes: 194 + 195 +* AUTOGIRO 196 +))) 197 +|(% 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) 198 +|(% 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 199 +|(% style="width:215px" %) |(% style="width:114px" %) |(% style="width:161px" %) |(% style="width:61px" %) |(% style="width:877px" %) 200 + 201 +== Bills == 202 + 203 +The bills resources contains all the documents produced in the accounts billing cycle. 204 + 205 + 206 +==== List all bills of an account ==== 207 + 208 + 209 +{{code language="http" title="**Request**"}} 210 +GET /ledger/credit-account/v1/XXX/accounts/NNN/bills HTTP/1.1 211 +Host: - 212 +Authorization: Bearer <Token> 213 +Content-Type: application/json 214 + 215 +{{/code}} 216 + 217 + 218 +{{code language="http" title="**Response**"}} 219 +HTTP/1.1 200 OK 220 +Content-Type: application/json 221 + 222 +{ 223 + "@id": "/ledger/credit-account/v1/501/accounts/NNN/bills?status=open", 224 + "items" : [ 225 + { 226 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-123645", 227 + "dueDate": "2018-12-05", 228 + "billDate": "2018-11-15", 229 + "billNo": "124645", 230 + "billAmount": 240.00, 231 + "billType" : "reminder", 232 + "status": "open", 233 + "activePaymentDetails": { 234 + "minimumAmountToBePayed": 240.00, 235 + "bankAccountNo": "123", 236 + "bankAccountType": "BGSE", 237 + "bic": "123456", 238 + "iban": "SE12345678945631", 239 + "paymentReference": "5465164654663", 240 + "paymentOrdersExists": true, 241 + }, 242 + "document": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-124645/document" 243 + }, 244 + { 245 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-123645", 246 + "dueDate": "2018-12-05", 247 + "billDate": "2018-11-15", 248 + "billNo": "124645", 249 + "billAmount": 240.00, 250 + "billType" : "bill", 251 + "status": "closed", 252 + "activePaymentDetails": null, 253 + "document": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-124645/document" 254 + }, 255 + { 256 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/bill-123645", 257 + "dueDate": "2018-12-05", 258 + "billDate": "2018-11-15", 259 + "billNo": "124645", 260 + "billAmount": 240.00, 261 + "billType" : "bill", 262 + "status": "closed", 263 + "activePaymentDetails": null, 264 + "document": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-124645/document" 265 + } 266 + ] 267 +} 268 +{{/code}} 269 + 270 +==== ==== 271 + 272 +==== Get specific bill ==== 273 + 274 + 275 +{{code language="http" title="**Request**"}} 276 +GET /ledger/credit-account/v1/XXX/accounts/NNN/bills/456 HTTP/1.1 277 +Host: - 278 +Authorization: Bearer <Token> 279 +Content-Type: application/json 280 + 281 +{{/code}} 282 + 283 + 284 +{{code language="http" title="**Response**"}} 285 +HTTP/1.1 200 OK 286 +Content-Type: application/json 287 + 288 +{ 289 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-123645", 290 + "dueDate": "2018-12-05", 291 + "billDate": "2018-11-15", 292 + "billNo": "124645", 293 + "billAmount": 240.00, 294 + "billType" : "reminder", 295 + "status": "open", 296 + "activePaymentDetails": { 297 + "minimumAmountToBePayed": 240.00, 298 + "bankAccountNo": "123", 299 + "bankAccountType": "BGSE", 300 + "bic": "123456", 301 + "iban": "SE12345678945631", 302 + "paymentReference": "5465164654663", 303 + "paymentOrdersExists": true, 304 + }, 305 + "document": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-124645/document" 306 +} 307 +{{/code}} 308 + 309 +==== Bill resource properties ==== 310 + 311 +(% class="table-bordered table-striped" %) 312 +|=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 621px;" %)Description 313 +|(% style="width:337px" %)@id|(% style="width:205px" %)string|(% style="width:208px" %)Uri|(% style="width:621px" %) 314 +|(% 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" %) 315 +|(% style="width:337px" %)billDate|(% style="width:205px" %)date|(% style="width:208px" %) |(% style="width:621px" %)Date when bill was created 316 +|(% style="width:337px" %)billNo|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 50|(% style="width:621px" %)The identifier of the bill 317 +|(% style="width:337px" %)billAmount|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %)the amount that is stated on the actual bill/document 318 +|(% style="width:337px" %)billType|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 25|(% style="width:621px" %)((( 319 +BillTypes: 320 + 321 +* Bill 322 +* Reminder1 323 +* Reminder2 324 +* Collection 325 +))) 326 +|(% style="width:337px" %)status|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:621px" %)"open" / "closed" 327 +|(% style="width:337px" %)activePaymentDetails|(% style="width:205px" %)object|(% style="width:208px" %) |(% style="width:621px" %)only set if status of bill is "open" 328 +|(% style="width:337px" %)activePaymentDetails.minimumAmountToBePayed|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %)The least amount to pay on the bill 329 +|(% style="width:337px" %)activePaymentDetails.bankAccountNo|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 15|(% style="width:621px" %)bankaccount for payment 330 +|(% style="width:337px" %)activePaymentDetails.bankAccountType|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 10|(% style="width:621px" %)BankAccountTypes:((( 331 +* BKSE (swedish bankaccount) 332 +* PKSE (swedish plusgiro) 333 +* BGSE (swedish bankgiro) 334 +* PGSE (swedish plusgiro OCR) 335 +))) 336 +|(% style="width:337px" %)activePaymentDetails.bic|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 11|(% style="width:621px" %)Bank Identifier Code (BIC) 337 +|(% style="width:337px" %)activePaymentDetails.iban|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 34|(% style="width:621px" %)International Bank Account Number (IBAN) 338 +|(% style="width:337px" %)activePaymentDetails.paymentReference|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 50|(% style="width:621px" %)reference to specify on the payment 339 +|(% 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". 340 +//More detailed information about the payment order can be found on the accounts resource// 341 +|(% style="width:337px" %)document|(% style="width:205px" %)string|(% style="width:208px" %)Url|(% style="width:621px" %)Url to download pdf document 342 + 343 +== Cards == 344 + 345 +==== Add card to account ==== 346 + 347 +Execute http post towards this resource to add a new card to the specified account 348 + 349 +{{code language="http" title="**Request**"}} 350 +POST /ledger/credit-account/v1/XXX/accounts/NNN/cards HTTP/1.1 351 +Host: - 352 +Authorization: Bearer <Token> 353 +Content-Type: application/json 354 + 355 +{ 356 + "token": "954c8699-b38f-47a2-b568-668b8837dad8", 357 + "PanTrunc": "85479*********648", 358 + "deleted" : false, 359 + "mainCard": true, 360 + "cardHolder" : { 361 + "number" : "123465", 362 + "name": "test testsson", 363 + "nationalConsumerIdentifier": { 364 + "value": "19101010-1010", 365 + "countryCode": "SE" 366 + } 367 + } 368 +} 369 +{{/code}} 370 + 371 +==== List cards on an account ==== 372 + 373 +{{code language="http" title="**Request**"}} 374 +GET /ledger/credit-account/v1/XXX/accounts/NNN/cards HTTP/1.1 375 +Host: - 376 +Authorization: Bearer <Token> 377 +Content-Type: application/json 378 + 379 + 380 +{{/code}} 381 + 382 + 383 +{{code language="http" title="**Response**"}} 384 +HTTP/1.1 200 OK 385 +Content-Type: application/json 386 + 387 +{ 388 + "operations": null, 389 + "items": [ 390 + { 391 + "token": "954c8699-b38f-47a2-b568-668b8837dad8", 392 + "PanTrunc": "85479*********648", 393 + "deleted" : false, 394 + "mainCard": true, 395 + "cardHolder" : { 396 + "number" : "123465", 397 + "name": "test testsson", 398 + "nationalConsumerIdentifier": { 399 + "value": "19101010-1010", 400 + "countryCode": "SE" 401 + } 402 + }, 403 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/cards/741" 404 + }, 405 + { 406 + "token": "274c8699-b38f-47a2-b568-668b8837dat7", 407 + "PanTrunc": "78979*********321", 408 + "deleted" : false, 409 + "mainCard": false, 410 + "cardHolder" : { 411 + "number" : "987654", 412 + "name": "test testsson", 413 + "nationalConsumerIdentifier": { 414 + "value": "19101010-1010", 415 + "countryCode": "SE" 416 + } 417 + }, 418 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/cards/274c8699-b38f-47a2-b568-668b8837dat7" 419 + } 420 + ], 421 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/cards", 422 + "view": { 423 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/cards?$top=2&$skip=0", 424 + "next": "/ledger/credit-account/v1/XXX/accounts/NNN/cards?$top=2&$skip=2" 425 + } 426 +} 427 +{{/code}} 428 + 429 +==== Get a specific card ==== 430 + 431 + 432 +{{code language="http" title="**Request**"}} 433 +GET /ledger/credit-account/v1/XXX/accounts/NNN/cards/954c8699-b38f-47a2-b568-668b8837dad8 HTTP/1.1 434 +Host: - 435 +Authorization: Bearer <Token> 436 +Content-Type: application/json 437 + 438 + 439 +{{/code}} 440 + 441 +{{code language="http" title="**Response**"}} 442 +HTTP/1.1 200 OK 443 +Content-Type: application/json 444 + 445 +{ 446 + "token": "954c8699-b38f-47a2-b568-668b8837dad8", 447 + "PanTrunc": "85479*********648", 448 + "deleted" : false, 449 + "mainCard": true, 450 + "cardHolder" : { 451 + "number" : "123465", 452 + "name": "test testsson", 453 + "nationalConsumerIdentifier": { 454 + "value": "19101010-1010", 455 + "countryCode": "SE" 456 + } 457 + }, 458 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/cards/954c8699-b38f-47a2-b568-668b8837dad8", 459 + "parentHREF": "/ledger/credit-account/v1/XXX/accounts/NNN", 460 + "operation" : [ 461 + { 462 + "rel" : "partial-update", 463 + "method" : "patch", 464 + "href" : "/ledger/credit-account/v1/XXX/accounts/NNN/cards/954c8699-b38f-47a2-b568-668b8837dad8" 465 + } 466 + ] 467 +} 468 +{{/code}} 469 + 470 +==== Card resource properties ==== 471 + 472 +(% class="table-bordered table-striped" %) 473 +|=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 62px;" %)Modify (patch)|=(% style="width: 1401px;" %)Description 474 +|(% style="width:337px" %)token|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)token identifier of the card 475 +|(% style="width:337px" %)panTrunc|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)truncated PAN 476 +|(% 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 477 +|(% 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) 478 +|(% style="width:337px" %)cardHolder.number|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)Cardholder customernumber 479 +|(% style="width:337px" %)cardHolder.name|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)Cardholder fullname 480 +|(% style="width:337px" %)cardHolder.nationalConsumerIdentifier.value|(% style="width:205px" %)string|(% style="width:208px" %)YYYYMMDD-NNNC|(% style="width:62px" %) |(% style="width:1401px" %) 481 +|(% 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" %) 482 + 483 +== Transactions == 484 + 485 +==== List transactions on an account ==== 486 + 487 +{{code language="http" title="**Request**"}} 488 +GET /ledger/credit-account/v1/XXX/accounts/NNN/transactions HTTP/1.1 489 +Host: - 490 +Authorization: Bearer <Token> 491 +Content-Type: application/json 492 + 493 + 494 +{{/code}} 495 + 496 + 497 +{{code language="http" title="**Response**"}} 498 +HTTP/1.1 200 OK 499 +Content-Type: application/json 500 + 501 +{ 502 + "operations": null, 503 + "items": [ 504 + { 505 + "type": "payment", 506 + "description": "", 507 + "amount": 200.00, 508 + "initiatedFromPointOfSale": false, 509 + "date": "2019-10-09" 510 + }, 511 + { 512 + "type": "purchase", 513 + "description": "testbutiken, köpref. 12345689", 514 + "amount": 200.00, 515 + "initiatedFromPointOfSale": true, 516 + "date": "2019-10-09" 517 + }, 518 + { 519 + "type": "credit", 520 + "description": "", 521 + "amount": 200.00, 522 + "initiatedFromPointOfSale": true, 523 + "date": "2019-10-09" 524 + } 525 + ], 526 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/transactions?fromDate=2019-10-01", 527 + "view": { 528 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/transactions?fromDate=2019-10-01&$top=2&$skip=0", 529 + "next": "/ledger/credit-account/v1/XXX/accounts/NNN/transactions?fromDate=2019-10-01&$top=2&$skip=2" 530 + } 531 +} 532 +{{/code}} 533 + 534 +==== Transaction resource properties ==== 535 + 536 +(% class="table-bordered table-striped" %) 537 +|=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 621px;" %)Description 538 +|(% style="width:337px" %)type|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:621px" %)((( 539 +Type of transaction 540 + 541 +* Payment 542 +* Purchase 543 +* Credit 544 +))) 545 +|(% 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" 546 +|(% style="width:337px" %)amount|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %) 547 +|(% style="width:337px" %)billed|(% style="width:205px" %)bool|(% style="width:208px" %) |(% style="width:621px" %)Indicates wheter a bill has been created after the transaction (ie. if the transaction is included in any bill or not) 548 +|(% style="width:337px" %)date|(% style="width:205px" %)date|(% style="width:208px" %) |(% style="width:621px" %)Date when the transaction was initiated (Authorization date) 549 + 550 +== Reservations == 551 + 552 +==== List reservations in an account ==== 553 + 554 +{{code language="http" title="**Request**"}} 555 +GET /ledger/credit-account/v1/XXX/accounts/NNN/reservations HTTP/1.1 556 +Host: - 557 +Authorization: Bearer <Token> 558 +Content-Type: application/json 559 + 560 + 561 +{{/code}} 562 + 563 + 564 +{{code language="http" title="**Response**"}} 565 +HTTP/1.1 201 Created 566 +Content-Type: application/json 567 + 568 +{ 569 + "operations": null, 570 + "items": [ 571 + { 572 + "amount": 200.00, 573 + "description" : "", 574 + "date": "2019-10-05", 575 + }, 576 + { 577 + "amount": 450.00, 578 + "description" : "", 579 + "date": "2019-10-02", 580 + }, 581 + ], 582 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/reservations", 583 +} 584 +{{/code}} 585 + 586 +==== Reservation resource properties ==== 587 + 588 +(% class="table-bordered table-striped" %) 589 +|=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 621px;" %)Description 590 +|(% style="width:337px" %)amount|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %) 591 +|(% style="width:337px" %)description|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:621px" %)Description of the reservation, normally "point of sale". 592 +|(% style="width:337px" %)date|(% style="width:205px" %)date|(% style="width:208px" %) |(% style="width:621px" %)Date when the reservation occured 593 + 594 +== Recurring-payment-setting == 595 + 596 +(% class="wikigeneratedid" %) 597 +This resource contain information/settings related to how recurring payments should behave on this account. 598 + 599 +==== 600 +Get settings on an account ==== 601 + 602 + 603 +{{code language="http" title="**Request**"}} 604 +GET /ledger/credit-account/v1/XXX/accounts/NNN/recurring-payment-setting/ HTTP/1.1 605 +Host: - 606 +Authorization: Bearer <Token> 607 +Content-Type: application/json 608 +{{/code}} 609 + 610 + 611 +{{code language="http" title="**Response**"}} 612 +HTTP/1.1 200 OK 613 +Content-Type: application/json 614 + 615 +{ 616 + "@id" : "/ledger/credit-account/v1/XXX/accounts/NNN/recurring-payment-configurations", 617 + "paymentMethod" : "autogiro", 618 + "paymentScope" : "fixedRecurring", 619 + "fixedAmount" : 1500.00, 620 + "parentHREF": "/ledger/credit-account/v1/XXX/accounts/NNN", 621 + "operation" : [ 622 + { 623 + "rel" : "partially-update-recurring-payment-consent", 624 + "method" : "patch", 625 + "href" : "/ledger/credit-account/v1/XXX/accounts/NNN/recurring-payment-consent" 626 + } 627 + ] 628 +} 629 +{{/code}} 630 + 631 +==== Update settings on an account ==== 632 + 633 +(% class="wikigeneratedid" %) 634 +Execute http patch towards this resource to change how recurring payments should behave on the specified account 635 + 636 +{{code language="http" title="**Request**"}} 637 +PATCH /ledger/credit-account/v1/XXX/accounts/NNN/recurring-payment-setting HTTP/1.1 638 +Host: - 639 +Authorization: Bearer <Token> 640 +Content-Type: application/json 641 + 642 +{ 643 + "paymentScope" : "billedAmount", 644 + "fixedAmount" : 0.00 645 +} 646 +{{/code}} 647 + 648 +==== Recurring-payment-setting resource properties ==== 649 + 650 +(% class="table-bordered table-striped" %) 651 +|=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 58px;" %)Modify (patch)|=(% style="width: 1176px;" %)Description 652 +|(% style="width:337px" %)recurringMethod|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="background-color:palegreen; width:58px" %) |(% style="width:1176px" %)recurringPaymentMethods:((( 653 +* autogiro 654 +))) 655 +|(% style="width:337px" %)recurringScope|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="background-color:palegreen; width:58px" %) |(% style="width:1176px" %)((( 656 +recurringPaymentScopes: 657 + 658 +* fixedRecurring (Fixed amount to debit monthly) 659 +* totalDebt (Total credit-account debt will be debited) 660 +* billedAmount (Only the minimum amount to pay will be debited) 661 +* NotSet 662 +))) 663 +|(% 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") 664 + 665 +== Active-payment-orders == 666 + 667 +(% class="wikigeneratedid" %) 668 +This resource corresponds to an active / scheduled payment order placed against the specific account, the end-customer will be debited at the given executeDate. 669 + 670 +==== 671 +Get active payment orders for an account ==== 672 + 673 + 674 +{{code language="http" title="**Request**"}} 675 +GET /ledger/credit-account/v1/XXX/accounts/NNN/active-payment-orders/ HTTP/1.1 676 +Host: - 677 +Authorization: Bearer <Token> 678 +Content-Type: application/json 679 +{{/code}} 680 + 681 + 682 +{{code language="http" title="**Response**"}} 683 +HTTP/1.1 200 OK 684 +Content-Type: application/json 685 + 686 +{ 687 + "operations": null, 688 + "items": [ 689 + { 690 + "paymentMethod": "autogiro", 691 + "executeDate": "2020-02-15", 692 + "amount": 200.00 693 + } 694 + ], 695 + "view": { 696 + "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/active-payment-orders?$top=2&$skip=0", 697 + "next": "/ledger/credit-account/v1/XXX/accounts/NNN/active-payment-orders?$top=2&$skip=2" 698 + } 699 +} 700 +{{/code}} 701 + 702 +==== ==== 703 + 704 +==== Active-payment-orders resource properties ==== 705 + 706 +(% class="table-bordered table-striped" %) 707 +|=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 58px;" %)Modify (patch)|=(% style="width: 1176px;" %)Description 708 +|(% style="width:337px" %)paymentMethod|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:58px" %) |(% style="width:1176px" %)paymentMethods:((( 709 +* autogiro 710 +))) 711 +|(% style="width:337px" %)executeDate|(% style="width:205px" %)Date|(% style="width:208px" %) |(% style="width:58px" %) |(% style="width:1176px" %)((( 712 +The date when the payment order will be executed 713 +))) 714 +|(% 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 715 + 716 +=== Problems === 717 + 718 +If an error occur or any validation failed, a "problem" response will be returned. 719 +Below is a list of problems that can occur: 720 + 721 +**HttpStatus 401 Unauthorized** 722 + 723 +* Token expired 724 +* Token invalid 725 +* SellerNumber does not match token 726 +* CompanyNumber does not match token 727 + 728 +**HttpStatus 400 Error** 729 + 730 +* Validation: Argument required 731 +* Validation: Invalid value 732 + 733 +**HttpStatus 422 Unprocessable entity** 734 + 735 +* Authorization declined 736 + 737 +**HttpStatus 409 Conflict** 738 + 739 +* Invoice already authorized 740 +* Duplicate InvoiceNumber 741 +* Authorization is cancelled 742 +* Authorization already captured 743 +* Authorization has expired 744 +* Insufficient debited amount XXX 745 + 746 +**HttpStatus 501 NotImplemented** 747 + 748 +* CompanyNumber XXX not configured 749 +* SellerNumber XXX not configured at PayEx 750 +* CompanyNumber XXX missing configuration 751 + 752 +**HttpStatus 404 NotFound** 753 + 754 +* Authorization not found 755 + 756 +Below is an example of a problem that will be returned if buyer##.nationalConsumerIdentifier.value## is not valid in the authorization post request. 757 + 758 +{{code language="http" title="**Response**"}} 759 +HTTP/1.1 400 Error 760 +Content-Type: application/problem+json 761 + 762 +{ 763 + "Type": "http://[DNS]/ledger/invoice-purchase/problems/validation", 764 + "Title": "A validation error occurred", 765 + "Status": 400, 766 + "Instance": null, 767 + "Detail": "A validation error occurred. Please fix the problems mentioned in the 'problems' property below.", 768 + "Problems": [ 769 + { 770 + "buyer.nationalConsumerIdentifier.value": "Not a valid SE nationalConsumerIdentifier" 771 + } 772 + ] 773 +} 774 +{{/code}}
- 1578554263550-159.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.dap - Size
-
... ... @@ -1,0 +1,1 @@ 1 +0 bytes - Content
- 1579213180493-564.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.dap - Size
-
... ... @@ -1,0 +1,1 @@ 1 +0 bytes - Content
- 1579213237427-955.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.dap - Size
-
... ... @@ -1,0 +1,1 @@ 1 +0 bytes - Content
- 1579213343157-343.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.dap - Size
-
... ... @@ -1,0 +1,1 @@ 1 +0 bytes - Content
- 1581025117966-675.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.dap - Size
-
... ... @@ -1,0 +1,1 @@ 1 +0 bytes - Content