Hide last authors
David Persson 3.1 1 (% class="jumbotron" %)
2 (((
3 (% class="container" %)
4 (((
5 Integrate to **PayEx Credit Account API **
6 )))
7 )))
8
Mikael Widström 57.1 9 (% class="box errormessage" %)
10 (((
11 Todo: Saknar operation för att hitta konton som tillhör en person/ett personnummer
12 )))
13
David Persson 85.1 14 (% id="HChangelog" %)
15 = Changelog =
16
17 2020-01-31
18 renamed resource "recurring-payment-consent" to "recurring-payment-setting" (not implemented in API yet)
19
David Persson 73.1 20 (% class="lead" %)
21 This api is used to retrieve information and to change properties related to the customer's credit account.
David Persson 88.1 22 (% contenteditable="false" tabindex="-1" %)[[image:1579213343157-343.png||data-widget="image" height="325" width="346"]]
Mikael Widström 57.1 23
David Persson 75.2 24 (% id="HRoutesegments" %)
David Persson 78.1 25 == Introduction ==
David Persson 75.2 26
27 Each resource in the API corresponds to its own route. All routes are structured according to a specific standard, explained below
28 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.
29 //api.payex.com/ledger/**{Subdomain}**/v1/**{LedgerNumber}**/resource1/**{resource1Id}**/resource2/**{resource2Id}**/resource3/**{resource3Id}**//
30
David Persson 77.1 31 (% class="table-bordered table-striped" %)
32 |=(% style="width: 604px;" %)Route segment|=(% style="width: 2790px;" %)Description
33 |(% style="width:604px" %)Subdomain|(% style="width:2790px" %)In this part of the API it will be credit-account
34 |(% style="width:604px" %)LedgerNumber|(% style="width:2790px" %)The ledger identifier/number at PayEx
35 |(% style="width:604px" %)resource1Id|(% style="width:2790px" %)Identifier of resource1
36 |(% style="width:604px" %)resource2Id|(% style="width:2790px" %)identifier of resource2, subresource to resource1
37 |(% style="width:604px" %)resource3Id|(% style="width:2790px" %)identifier of resource3, subresource to resource2
David Persson 75.2 38
39 (% class="wikigeneratedid" %)
David Persson 76.1 40 Routes that occurs in examples of this documentation will use the following identifiers
David Persson 75.2 41
David Persson 77.1 42 (% class="table-bordered table-striped" %)
David Persson 76.1 43 |=(% style="width: 488px;" %)Resource|=(% style="width: 2271px;" %)Identifier
David Persson 75.2 44 |(% style="width:488px" %)LedgerNumber|(% style="width:2271px" %)XXX
45 |(% style="width:488px" %)Accounts|(% style="width:2271px" %)NNN
David Persson 76.1 46 |(% style="width:488px" %)Bills|(% style="width:2271px" %)reminder-123
47 bill-456
48 |(% style="width:488px" %)Cards|(% style="width:2271px" %)954c8699-b38f-47a2-b568-668b8837dad8
49 274c8699-b38f-47a2-b568-668b8837dat7
David Persson 75.2 50
David Persson 3.1 51 == Accounts ==
52
David Persson 64.2 53 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.
54 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.
55 The following operations is supported
Mikael Widström 50.2 56
David Persson 64.2 57 * Change the account credit limit
58 * Add extra cards
59 * Request cancellation of account
60 * Turn on/off charity donation
David Persson 74.1 61 * Set behaviour of recurring payments
David Persson 64.2 62
Mikael Widström 56.1 63 === Requesting details of a specific account ===
64
David Persson 88.1 65 (% contenteditable="false" tabindex="-1" %)
66 (((
David Persson 89.1 67 {{code language="http" title="**Request**"}}
David Persson 90.1 68 GET /ledger/credit-account/v1/XXX/accounts/NNN HTTP/1.1 Host: - Authorization: Bearer <Token> Content-Type: application/json
David Persson 89.1 69 {{/code}}
David Persson 88.1 70 )))
Mikael Widström 50.2 71
David Persson 88.1 72 (% contenteditable="false" tabindex="-1" %)
73 (((
David Persson 89.1 74 {{code language="http" title="**Response**"}}
David Persson 90.1 75 HTTP/1.1 200 OK Content-Type: application/json { "@id": "/ledger/credit-account/v1/XXX/accounts/NNN", "accountNo": "1234567", "startDate": "2018-05-21", "description": null, "accountProfileType": "accountType1 | accountType2 | accountType3 etc.", "accountAlias" : "accountAlias1 | accountAlias2 etc.", "customerNo" : "123789654", "status" : "open | pending-close | closed", "creditLimit": 2000.00, "totalBalance" : -1900.0, "reservedAmount": 50.0, "availableAmount": 50.0, "openBill" : "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-456", "charityDonation": true, "interestRate": { "debtInterest" : 10.00, "penaltyInterest": 15.00 }, "bankPayment": { "bankAccountNo": "123", "bankAccountType": "BGSE", "bic": "123456", "iban": "SE12345678945631", "paymentReference": "54867165675646" }, "activePaymentOrders": "/ledger/credit-account/v1/XXX/accounts/NNN/active-payment-orders", "recurringPaymentConsent": "/ledger/credit-account/v1/XXX/accounts/NNN/recurring-payment-setting", "cards": "/ledger/credit-account/v1/XXX/accounts/123456/cards", "transactions": "/ledger/credit-account/v1/XXX/accounts/NNN/transactions", "currency": "sek", "bills": "/ledger/credit-account/v1/XXX/accounts/NNN/bills", "customer": "/ledger/customers/v1/XXX/customer/123456", "operation" : [ { "rel" : "add-card-info", "method" : "post", "href" : "/ledger/credit-account/v1/XXX/accounts/NNN/cards" }, { "rel" : "request-close-account", "method" : "post", "href" : "/ledger/credit-account/v1/XXX/accounts/NNN/request-close-account" }, { "rel" : "apply-for-raised-credit-limit", "method" : "post", "href" : "/ledger/credit-account-onboardings/v1/XXX/accounts/NNN/apply-for-raised-credit-limit" }, { "rel" : "partial-update", "method" : "patch", "href" : "/ledger/credit-account-onboardings/v1/XXX/accounts/NNN" } ] }
David Persson 89.1 76 {{/code}}
David Persson 88.1 77 )))
David Persson 3.1 78
David Persson 12.2 79 **Resource properties**
David Persson 3.1 80
David Persson 15.1 81 (% class="table-bordered table-striped" %)
David Persson 60.2 82 |=(% style="width: 215px;" %)Property|=(% style="width: 114px;" %)Data type|=(% style="width: 161px;" %)Format|=(% style="width: 61px;" %)Modify (patch)|=(% style="width: 877px;" %)Description
83 |(% style="width:215px" %)@id |(% style="width:114px" %)string|(% style="width:161px" %)Maxlength: |(% style="width:61px" %) |(% style="width:877px" %)Uri of the specific account
84 |(% style="width:215px" %)accountNo |(% style="width:114px" %)string|(% style="width:161px" %)Maxlength: 50|(% style="width:61px" %) |(% style="width:877px" %)The identifier of the account
85 |(% 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
86 |(% 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
87 |(% 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//
88 |(% 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//
89 |(% 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)
90 |(% style="width:215px" %)status |(% style="width:114px" %)string|(% style="width:161px" %)Maxlength: 25|(% style="width:61px" %) |(% style="width:877px" %)Status of the account(((
David Persson 33.1 91 * **pending-close**: the customer has requested the account to be closed, the account will be closed when possible.
92 * **open**: the account is open and active
93 * **closed**: the account has been closed
94 )))
David Persson 60.2 95 |(% 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
96 |(% 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.)
97 |(% 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)
98 |(% 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)
David Persson 87.2 99 |(% style="width:215px" %)openBill|(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
David Persson 60.2 100 |(% 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
101 |(% style="width:215px" %)interestRate.debtInterest|(% style="width:114px" %)decimal|(% style="width:161px" %)Percentage|(% style="width:61px" %) |(% style="width:877px" %)yearly debt interestrate
102 |(% style="width:215px" %)interestRate.penaltyInterest|(% style="width:114px" %)decimal|(% style="width:161px" %)Percentage|(% style="width:61px" %) |(% style="width:877px" %)yearly penalty interestrate
103 |(% style="width:215px" %)offer |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
104 |(% style="width:215px" %)recurringPaymentConsent|(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
105 |(% style="width:215px" %)cards |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
106 |(% style="width:215px" %)transactions |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
107 |(% 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" %)
108 |(% style="width:215px" %)bills |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
109 |(% style="width:215px" %)customer |(% style="width:114px" %)string|(% style="width:161px" %)Uri|(% style="width:61px" %) |(% style="width:877px" %)
110 |(% style="width:337px" %)activePaymentOrder.paymentMethod|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 15|(% style="width:61px" %)(((
111
112 )))|(% style="width:877px" %)(((
113 PaymentTypes:
David Persson 12.2 114
David Persson 60.2 115 * AUTOGIRO
116 )))
117 |(% 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)
118 |(% 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
119 |(% style="width:215px" %) |(% style="width:114px" %) |(% style="width:161px" %) |(% style="width:61px" %) |(% style="width:877px" %)
120
David Persson 31.1 121 === Bills ===
David Persson 24.1 122
Mikael Widström 56.1 123 The bills resources contains all the documents produced in the accounts billing cycle.
David Persson 30.1 124
Mikael Widström 56.1 125 ==== Requesting list of bills belonging to a specific account ====
David Persson 29.1 126
David Persson 88.1 127 (% contenteditable="false" tabindex="-1" %)
128 (((
David Persson 89.1 129 {{code language="http" title="**Request**"}}
David Persson 90.1 130 GET /ledger/credit-account/v1/XXX/accounts/NNN/bills HTTP/1.1 Host: - Authorization: Bearer <Token> Content-Type: application/json
David Persson 89.1 131 {{/code}}
David Persson 88.1 132 )))
David Persson 3.2 133
David Persson 88.1 134 (% contenteditable="false" tabindex="-1" %)
135 (((
David Persson 89.1 136 {{code language="http" title="**Response**"}}
David Persson 90.1 137 HTTP/1.1 200 OK Content-Type: application/json { "@id": "/ledger/credit-account/v1/501/accounts/NNN/bills?status=open", "items" : [ { "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-123645", "dueDate": "2018-12-05", "billDate": "2018-11-15", "billNo": "124645", "billAmount": 240.00, "billType" : "reminder", "status": "open", "activePaymentDetails": { "minimumAmountToBePayed": 240.00, "bankAccountNo": "123", "bankAccountType": "BGSE", "bic": "123456", "iban": "SE12345678945631", "paymentReference": "5465164654663", "paymentOrdersExists": true, }, "document": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-124645/document" }, { "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-123645", "dueDate": "2018-12-05", "billDate": "2018-11-15", "billNo": "124645", "billAmount": 240.00, "billType" : "bill", "status": "closed", "activePaymentDetails": null, "document": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-124645/document" }, { "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/bill-123645", "dueDate": "2018-12-05", "billDate": "2018-11-15", "billNo": "124645", "billAmount": 240.00, "billType" : "bill", "status": "closed", "activePaymentDetails": null, "document": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-124645/document" } ] }
David Persson 89.1 138 {{/code}}
David Persson 88.1 139 )))
David Persson 3.1 140
Mikael Widström 56.1 141 ==== ====
David Persson 3.1 142
Mikael Widström 56.1 143 ==== Requesting details of a specific bill ====
David Persson 3.3 144
David Persson 88.1 145 (% contenteditable="false" tabindex="-1" %)
146 (((
David Persson 89.1 147 {{code language="http" title="**Request**"}}
David Persson 90.1 148 GET /ledger/credit-account/v1/XXX/accounts/NNN/bills/456 HTTP/1.1 Host: - Authorization: Bearer <Token> Content-Type: application/json
David Persson 89.1 149 {{/code}}
David Persson 88.1 150 )))
David Persson 3.1 151
David Persson 88.1 152 (% contenteditable="false" tabindex="-1" %)
153 (((
David Persson 89.1 154 {{code language="http" title="**Response**"}}
David Persson 90.1 155 HTTP/1.1 200 OK Content-Type: application/json { "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-123645", "dueDate": "2018-12-05", "billDate": "2018-11-15", "billNo": "124645", "billAmount": 240.00, "billType" : "reminder", "status": "open", "activePaymentDetails": { "minimumAmountToBePayed": 240.00, "bankAccountNo": "123", "bankAccountType": "BGSE", "bic": "123456", "iban": "SE12345678945631", "paymentReference": "5465164654663", "paymentOrdersExists": true, }, "document": "/ledger/credit-account/v1/XXX/accounts/NNN/bills/reminder-124645/document" }
David Persson 89.1 156 {{/code}}
David Persson 88.1 157 )))
David Persson 3.1 158
David Persson 12.2 159 == ==
160
David Persson 14.1 161 (% class="table-bordered table-striped" %)
David Persson 26.1 162 |=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 621px;" %)Description
David Persson 43.1 163 |(% style="width:337px" %)@id|(% style="width:205px" %)string|(% style="width:208px" %)Uri|(% style="width:621px" %)
David Persson 36.2 164 |(% 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" %)
David Persson 64.3 165 |(% style="width:337px" %)billDate|(% style="width:205px" %)date|(% style="width:208px" %) |(% style="width:621px" %)Date when bill was created
David Persson 33.5 166 |(% style="width:337px" %)billNo|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 50|(% style="width:621px" %)The identifier of the bill
David Persson 59.1 167 |(% style="width:337px" %)billAmount|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %)the amount that is stated on the actual bill/document
David Persson 33.6 168 |(% style="width:337px" %)billType|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 25|(% style="width:621px" %)(((
169 BillTypes:
170
171 * Bill
172 * Reminder1
173 * Reminder2
174 * Collection
175 )))
David Persson 60.2 176 |(% style="width:337px" %)status|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:621px" %)"open" / "closed"
177 |(% style="width:337px" %)activePaymentDetails|(% style="width:205px" %)object|(% style="width:208px" %) |(% style="width:621px" %)only set if status of bill is "open"
David Persson 64.3 178 |(% style="width:337px" %)activePaymentDetails.minimumAmountToBePayed|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %)The least amount to pay on the bill
179 |(% style="width:337px" %)activePaymentDetails.bankAccountNo|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 15|(% style="width:621px" %)bankaccount for payment
David Persson 60.2 180 |(% style="width:337px" %)activePaymentDetails.bankAccountType|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 10|(% style="width:621px" %)BankAccountTypes:(((
David Persson 33.6 181 * BKSE (swedish bankaccount)
182 * PKSE (swedish plusgiro)
183 * BGSE (swedish bankgiro)
184 * PGSE (swedish plusgiro OCR)
185 )))
David Persson 64.3 186 |(% style="width:337px" %)activePaymentDetails.bic|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 11|(% style="width:621px" %)Bank Identifier Code (BIC)
187 |(% style="width:337px" %)activePaymentDetails.iban|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 34|(% style="width:621px" %)International Bank Account Number (IBAN)
188 |(% style="width:337px" %)activePaymentDetails.paymentReference|(% style="width:205px" %)string|(% style="width:208px" %)Maxlength: 50|(% style="width:621px" %)reference to specify on the payment
189 |(% 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".
190 //More detailed information about the payment order can be found on the accounts resource//
191 |(% style="width:337px" %)document|(% style="width:205px" %)string|(% style="width:208px" %)Url|(% style="width:621px" %)Url to download pdf document
David Persson 33.8 192
David Persson 31.1 193 === ===
David Persson 3.1 194
David Persson 83.1 195 === recurring-payment-setting ===
Mikael Widström 56.1 196
David Persson 80.1 197 (% class="wikigeneratedid" %)
David Persson 64.3 198 This resource contain information/settings related to how recurring payments should behave on this account.
Mikael Widström 56.1 199
David Persson 80.1 200 =====
201 Requesting the resource =====
202
David Persson 88.1 203 (% contenteditable="false" tabindex="-1" %)
204 (((
David Persson 89.1 205 {{code language="http" title="**Request**"}}
David Persson 90.1 206 GET /ledger/credit-account/v1/XXX/accounts/NNN/recurring-payment-setting/ HTTP/1.1 Host: - Authorization: Bearer <Token> Content-Type: application/json
David Persson 89.1 207 {{/code}}
David Persson 88.1 208 )))
David Persson 48.1 209
David Persson 88.1 210 (% contenteditable="false" tabindex="-1" %)
211 (((
David Persson 89.1 212 {{code language="http" title="**Response**"}}
David Persson 90.1 213 HTTP/1.1 200 OK Content-Type: application/json { "@id" : "/ledger/credit-account/v1/XXX/accounts/NNN/recurring-payment-setting", "recurringPaymentMethod" : "autogiro", "recurringPaymentScope" : "fixedRecurring", "fixedRecurringAmount" : 1500.00, "parentHREF": "/ledger/credit-account/v1/XXX/accounts/NNN", "operation" : [ { "rel" : "partially-update-recurring-payment-consent", "method" : "patch", "href" : "/ledger/credit-account/v1/XXX/accounts/NNN/recurring-payment-consent" } ] }
David Persson 89.1 214 {{/code}}
David Persson 88.1 215 )))
David Persson 48.1 216
David Persson 80.1 217 ===== Update settings =====
David Persson 48.1 218
David Persson 80.1 219 (% class="wikigeneratedid" %)
220 Execute http patch towards this resource to change how recurring payments should behave on the specified account
221
David Persson 88.1 222 (% contenteditable="false" tabindex="-1" %)
223 (((
David Persson 89.1 224 {{code language="http" title="**Request**"}}
David Persson 90.1 225 PATCH /ledger/credit-account/v1/XXX/accounts/NNN/recurring-payment-setting HTTP/1.1 Host: - Authorization: Bearer <Token> Content-Type: application/json { "recurringPaymentScope" : "billedAmount", "fixedRecurringAmount" : 0.00 }
David Persson 89.1 226 {{/code}}
David Persson 88.1 227 )))
David Persson 80.1 228
David Persson 14.1 229 (% class="table-bordered table-striped" %)
David Persson 44.1 230 |=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 58px;" %)Modify (patch)|=(% style="width: 1176px;" %)Description
David Persson 64.2 231 |(% style="width:337px" %)recurringPaymentMethod|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="background-color:palegreen; width:58px" %) |(% style="width:1176px" %)recurringPaymentMethods:(((
232 * autogiro
233 )))
234 |(% style="width:337px" %)recurringPaymentScope|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="background-color:palegreen; width:58px" %) |(% style="width:1176px" %)(((
235 recurringPaymentScopes:
David Persson 33.8 236
David Persson 64.2 237 * fixedRecurring (Fixed amount to debit monthly)
David Persson 33.8 238 * totalDebt (Total credit-account debt will be debited)
239 * billedAmount (Only the minimum amount to pay will be debited)
240 )))
David Persson 64.2 241 |(% 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")
David Persson 12.2 242
David Persson 31.1 243 === Cards ===
David Persson 3.1 244
David Persson 80.1 245 ==== Post ====
David Persson 3.1 246
David Persson 80.1 247 Execute http post towards this resource to add a new card to the specified account
248
David Persson 88.1 249 (% contenteditable="false" tabindex="-1" %)
250 (((
David Persson 89.1 251 {{code language="http" title="**Request**"}}
David Persson 90.1 252 POST /ledger/credit-account/v1/XXX/accounts/NNN/cards HTTP/1.1 Host: - Authorization: Bearer <Token> Content-Type: application/json { "token": "954c8699-b38f-47a2-b568-668b8837dad8", "PanTrunc": "85479*********648", "deleted" : false, "mainCard": true, "cardHolder" : { "number" : "123465", "name": "test testsson", "nationalConsumerIdentifier": { "value": "19101010-1010", "countryCode": "SE" } } }
David Persson 89.1 253 {{/code}}
David Persson 88.1 254 )))
David Persson 4.1 255
David Persson 79.1 256 ==== List cards ====
257
David Persson 88.1 258 (% contenteditable="false" tabindex="-1" %)
259 (((
David Persson 89.1 260 {{code language="http" title="**Request**"}}
David Persson 90.1 261 GET /ledger/credit-account/v1/XXX/accounts/NNN/cards HTTP/1.1 Host: - Authorization: Bearer <Token> Content-Type: application/json
David Persson 89.1 262 {{/code}}
David Persson 88.1 263 )))
David Persson 79.1 264
David Persson 88.1 265 (% contenteditable="false" tabindex="-1" %)
266 (((
David Persson 89.1 267 {{code language="http" title="**Response**"}}
David Persson 90.1 268 HTTP/1.1 200 OK Content-Type: application/json { "operations": null, "items": [ { "token": "954c8699-b38f-47a2-b568-668b8837dad8", "PanTrunc": "85479*********648", "deleted" : false, "mainCard": true, "cardHolder" : { "number" : "123465", "name": "test testsson", "nationalConsumerIdentifier": { "value": "19101010-1010", "countryCode": "SE" } }, "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/cards/741" }, { "token": "274c8699-b38f-47a2-b568-668b8837dat7", "PanTrunc": "78979*********321", "deleted" : false, "mainCard": false, "cardHolder" : { "number" : "987654", "name": "test testsson", "nationalConsumerIdentifier": { "value": "19101010-1010", "countryCode": "SE" } }, "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/cards/274c8699-b38f-47a2-b568-668b8837dat7" } ], "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/cards", "view": { "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/cards?$top=2&$skip=0", "next": "/ledger/credit-account/v1/XXX/accounts/NNN/cards?$top=2&$skip=2" } }
David Persson 89.1 269 {{/code}}
David Persson 88.1 270 )))
David Persson 3.1 271
David Persson 46.1 272 ==== Get ====
David Persson 4.1 273
David Persson 88.1 274 (% contenteditable="false" tabindex="-1" %)
275 (((
David Persson 89.1 276 {{code language="http" title="**Response**"}}
David Persson 90.1 277 HTTP/1.1 200 OK Content-Type: application/json { "token": "954c8699-b38f-47a2-b568-668b8837dad8", "PanTrunc": "85479*********648", "deleted" : false, "mainCard": true, "cardHolder" : { "number" : "123465", "name": "test testsson", "nationalConsumerIdentifier": { "value": "19101010-1010", "countryCode": "SE" } }, "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/cards/954c8699-b38f-47a2-b568-668b8837dad8", "parentHREF": "/ledger/credit-account/v1/XXX/accounts/NNN", "operation" : [ { "rel" : "partial-update", "method" : "patch", "href" : "/ledger/credit-account/v1/XXX/accounts/NNN/cards/954c8699-b38f-47a2-b568-668b8837dad8" } ] }
David Persson 89.1 278 {{/code}}
David Persson 88.1 279 )))
David Persson 3.1 280
David Persson 14.1 281 (% class="table-bordered table-striped" %)
David Persson 45.1 282 |=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 62px;" %)Modify (patch)|=(% style="width: 1401px;" %)Description
283 |(% style="width:337px" %)token|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)token identifier of the card
284 |(% style="width:337px" %)panTrunc|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)truncated PAN
David Persson 64.3 285 |(% 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
David Persson 45.1 286 |(% 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)
287 |(% style="width:337px" %)cardHolder.number|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)Cardholder customernumber
288 |(% style="width:337px" %)cardHolder.name|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:62px" %) |(% style="width:1401px" %)Cardholder fullname
289 |(% style="width:337px" %)cardHolder.nationalConsumerIdentifier.value|(% style="width:205px" %)string|(% style="width:208px" %)YYYYMMDD-NNNC|(% style="width:62px" %) |(% style="width:1401px" %)
290 |(% 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" %)
David Persson 12.2 291
David Persson 31.1 292 === Transactions ===
David Persson 3.1 293
David Persson 88.1 294 (% contenteditable="false" tabindex="-1" %)
295 (((
David Persson 89.1 296 {{code language="http" title="**Request**"}}
David Persson 90.1 297 GET /ledger/credit-account/v1/XXX/accounts/NNN/transactions HTTP/1.1 Host: - Authorization: Bearer <Token> Content-Type: application/json
David Persson 89.1 298 {{/code}}
David Persson 88.1 299 )))
David Persson 7.1 300
David Persson 88.1 301 (% contenteditable="false" tabindex="-1" %)
302 (((
David Persson 89.1 303 {{code language="http" title="**Response**"}}
David Persson 90.1 304 HTTP/1.1 200 OK Content-Type: application/json { "operations": null, "items": [ { "type": "payment", "description": "", "amount": 200.00, "billed": false|true, "date": "2019-10-09", "reserveDate": null }, { "type": "purchase", "description": "testbutiken, köpref. 12345689", "amount": 200.00, "billed": false|true, "date": "2019-10-09", "reserveDate": "2019-10-05", }, { "type": "credit", "description": "", "amount": 200.00, "billed": false|true, "date": "2019-10-09", "reserveDate": "2019-10-05" } ], "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/transactions?fromDate=2019-10-01", "view": { "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/transactions?fromDate=2019-10-01&$top=2&$skip=0", "next": "/ledger/credit-account/v1/XXX/accounts/NNN/transactions?fromDate=2019-10-01&$top=2&$skip=2" } }
David Persson 89.1 305 {{/code}}
David Persson 88.1 306 )))
David Persson 7.1 307
David Persson 16.1 308 (% class="table-bordered table-striped" %)
David Persson 26.1 309 |=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 621px;" %)Description
David Persson 64.3 310 |(% style="width:337px" %)type|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:621px" %)(((
311 Type of transaction
312
313 * Payment
314 * Purchase
315 * Credit
316 )))
317 |(% 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"
David Persson 26.1 318 |(% style="width:337px" %)amount|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %)
David Persson 33.12 319 |(% 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)
David Persson 64.3 320 |(% style="width:337px" %)date|(% style="width:205px" %)date|(% style="width:208px" %) |(% style="width:621px" %)//Valuedate//
David Persson 12.2 321
David Persson 31.1 322 === Reservations ===
David Persson 7.1 323
David Persson 88.1 324 (% contenteditable="false" tabindex="-1" %)
325 (((
David Persson 89.1 326 {{code language="http" title="**Request**"}}
David Persson 90.1 327 GET /ledger/credit-account/v1/XXX/accounts/NNN/reservations HTTP/1.1 Host: - Authorization: Bearer <Token> Content-Type: application/json
David Persson 89.1 328 {{/code}}
David Persson 88.1 329 )))
David Persson 7.1 330
David Persson 88.1 331 (% contenteditable="false" tabindex="-1" %)
332 (((
David Persson 89.1 333 {{code language="http" title="**Response**"}}
David Persson 90.1 334 HTTP/1.1 201 Created Content-Type: application/json { "operations": null, "items": [ { "amount": 200.00, "description" : "", "date": "2019-10-05", }, { "amount": 450.00, "description" : "", "date": "2019-10-02", }, ], "@id": "/ledger/credit-account/v1/XXX/accounts/NNN/reservations", }
David Persson 89.1 335 {{/code}}
David Persson 88.1 336 )))
David Persson 7.1 337
David Persson 14.1 338 (% class="table-bordered table-striped" %)
David Persson 26.1 339 |=(% style="width: 337px;" %)Property|=(% style="width: 205px;" %)Data type|=(% style="width: 208px;" %)Format|=(% style="width: 621px;" %)Description
340 |(% style="width:337px" %)amount|(% style="width:205px" %)decimal|(% style="width:208px" %) |(% style="width:621px" %)
David Persson 65.1 341 |(% style="width:337px" %)description|(% style="width:205px" %)string|(% style="width:208px" %) |(% style="width:621px" %)Description of the reservation, normally "point of sale".
342 |(% style="width:337px" %)date|(% style="width:205px" %)date|(% style="width:208px" %) |(% style="width:621px" %)Date when the reservation occured
David Persson 26.1 343 Problems
344 If an error occur or any validation failed, a "problem" response will be returned.
345 Below is a list of problems that can occur:
346 **HttpStatus 401 Unauthorized**
David Persson 3.1 347
David Persson 26.1 348 * Token expired
349 * Token invalid
350 * SellerNumber does not match token
351 * CompanyNumber does not match token
352 **HttpStatus 400 Error**
353 * Validation: Argument required
354 * Validation: Invalid value
355 **HttpStatus 422 Unprocessable entity**
356 * Authorization declined
357 **HttpStatus 409 Conflict**
358 * Invoice already authorized
359 * Duplicate InvoiceNumber
360 * Authorization is cancelled
361 * Authorization already captured
362 * Authorization has expired
363 * Insufficient debited amount XXX
364 **HttpStatus 501 NotImplemented**
365 * CompanyNumber XXX not configured
366 * SellerNumber XXX not configured at PayEx
367 * CompanyNumber XXX missing configuration
368 **HttpStatus 404 NotFound**
369 * Authorization not found
David Persson 90.1 370 Below is an example of a problem that will be returned if buyer##.nationalConsumerIdentifier.value## is not valid in the authorization post request.(% contenteditable="false" tabindex="-1" %)
David Persson 88.1 371 (((
David Persson 89.1 372 {{code language="http" title="**Response**"}}
David Persson 90.1 373 HTTP/1.1 400 Error Content-Type: application/problem+json { "Type": "http://[DNS]/ledger/invoice-purchase/problems/validation", "Title": "A validation error occurred", "Status": 400, "Instance": null, "Detail": "A validation error occurred. Please fix the problems mentioned in the 'problems' property below.", "Problems": [ { "buyer.nationalConsumerIdentifier.value": "Not a valid SE nationalConsumerIdentifier" } ] }
David Persson 89.1 374 {{/code}}
David Persson 88.1 375 )))

Tips

You can click on the arrows next to the breadcrumb elements to quickly navigate to sibling and children pages.

Need help?

If you need help with XWiki you can contact: