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