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