From version 2.1
edited by David Persson
on 2019/12/04 09:44
To version 3.1
edited by David Persson
on 2019/12/16 11:33
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,0 +1,352 @@
1 +(% class="jumbotron" %)
2 +(((
3 +(% class="container" %)
4 +(((
5 +Integrate to **PayEx Credit Account API **
6 +)))
7 +)))
8 +
9 +== Authorizations ==
10 +
11 +==== Get ====
12 +
13 +{{code language="http" title="**Request**"}}
14 +GET /ledger/credit-account-acquiring/v1/XXX/authorizations HTTP/1.1
15 +Host: -
16 +Authorization: Bearer <Token>
17 +Content-Type: application/json
18 +{{/code}}
19 +
20 +==== Post ====
21 +
22 +{{code language="http" title="**Request**"}}
23 +POST /ledger/credit-account-acquiring/v1/XXX/authorizations HTTP/1.1
24 +Host: -
25 +Authorization: Bearer <Token>
26 +Content-Type: application/json
27 +
28 +{
29 + "sellerAuthorizationTransactionId": "789",
30 + "sellerNumber": "654",
31 + "cardToken": "5646735165",
32 + "accountToken": null,
33 + "description": "stora coop visby",
34 + "validToDate": "2019-11-28",
35 + "authorizationAmount": 300.0,
36 + "currency": "SEK",
37 +}
38 +{{/code}}
39 +
40 +==== Resource ====
41 +
42 +{{code language="http" title="**Response**"}}
43 +HTTP/1.1 200 OK
44 +Content-Type: application/json
45 +
46 +{
47 + "sellerAuthorizationTransactionId": "789",
48 + "authorizationId": 123,
49 + "sellerNumber": "654",
50 + "cardToken": "546415646315",
51 + "accountToken": null,
52 + "description": "Testshop",
53 + "validToDate": "2019-11-28",
54 + "authorizationAmount": 300.0,
55 + "remainingAmount" : 150.0,
56 + "currency": "SEK",
57 + "@id": "/ledger/credit-account-acquiring/v1/501/authorizations/123",
58 + "captures": "/ledger/credit-account-acquiring/v1/501/authorizations/123/captures",
59 + "cancellations": "/ledger/credit-account-acquiring/v1/501/authorizations/123/cancellations",
60 + "schemaUri": "/ledger/invoice-purchase/v1/PayEx.AR.InvoicePurchase.Api.Resources.Authorizations.Resource",
61 + "parentHREF": "/",
62 + "operations": [
63 + {
64 + "rel": "create-capture",
65 + "method": "post",
66 + "href": "/ledger/credit-account-acquiring/v1/501/authorizations/123/captures"
67 + },
68 + {
69 + "rel": "create-cancellation",
70 + "method": "post",
71 + "href": "/ledger/credit-account-acquiring/v1/501/authorizations/123/cancellations"
72 + }
73 + ]
74 +}
75 +{{/code}}
76 +
77 +
78 +**Resource properties**
79 +
80 +(% class="table-bordered table-striped" %)
81 +|=(% style="width: 215px;" %)Property|=(% style="width: 114px;" %)Data type|=(% style="width: 118px;" %)Format|=(% style="width: 586px;" %)Description
82 +|(% style="width:215px" %)@id |(% style="width:114px" %)string|(% style="width:118px" %)Maxlength: |(% style="width:586px" %)
83 +|(% style="width:215px" %)transactionReferenceId|(% style="width:114px" %)string|(% style="width:118px" %)Maxlength: |(% style="width:586px" %)
84 +|(% style="width:215px" %)authorizationId|(% style="width:114px" %)string|(% style="width:118px" %)Maxlength|(% style="width:586px" %)
85 +|(% style="width:215px" %)sellerNumber|(% style="width:114px" %)string|(% style="width:118px" %)Maxlength: |(% style="width:586px" %)
86 +|(% style="width:215px" %)description|(% style="width:114px" %)string|(% style="width:118px" %)Maxlength: |(% style="width:586px" %)
87 +|(% style="width:215px" %)validToDate|(% style="width:114px" %)date|(% style="width:118px" %)[[ISO 8601>>url:http://en.wikipedia.org/wiki/ISO_8601||rel="noreferrer" title="ISO8601 on Wikipedia"]]|(% style="width:586px" %)
88 +|(% style="width:215px" %)authorizeAmount|(% style="width:114px" %)decimal|(% style="width:118px" %) |(% style="width:586px" %)
89 +|(% style="width:215px" %)remainingAmount|(% style="width:114px" %)decimal|(% style="width:118px" %) |(% style="width:586px" %)
90 +|(% style="width:215px" %)currency|(% style="width:114px" %)string|(% style="width:118px" %)Maxlength|(% style="width:586px" %)
91 +|(% style="width:215px" %)captures|(% style="width:114px" %)string|(% style="width:118px" %)Uri|(% style="width:586px" %)
92 +|(% style="width:215px" %)cancellations|(% style="width:114px" %)string|(% style="width:118px" %)Uri|(% style="width:586px" %)
93 +
94 +== Captures ==
95 +
96 +==== List ====
97 +
98 +{{code language="http" title="**Request**"}}
99 +GET /ledger/credit-account-acquiring/v1/XXX/authorizations/captures HTTP/1.1
100 +Host: -
101 +Authorization: Bearer <Token>
102 +Content-Type: application/json
103 +
104 +{{/code}}
105 +
106 +==== Get ====
107 +
108 +{{code language="http" title="**Request**"}}
109 +GET /ledger/credit-account-acquiring/v1/XXX/authorizations/captures/YYY HTTP/1.1
110 +Host: -
111 +Authorization: Bearer <Token>
112 +Content-Type: application/json
113 +
114 +{{/code}}
115 +
116 +==== Post ====
117 +
118 +{{code language="http" title="**Request**"}}
119 +GET /ledger/credit-account-acquiring/v1/XXX/authorizations/captures HTTP/1.1
120 +Host: -
121 +Authorization: Bearer <Token>
122 +Content-Type: application/json
123 +
124 +{
125 + "description": "Testbutiken, köpref. 12345689",
126 + "sellerCaptureTransactionId" : "534313",
127 + "pspTransactionId" : "d65f46sd4",
128 + "settlementBatchId" : "e98t79er8t79e8t79e",
129 + "sellerReceiptId": "12345689",
130 + "captureAmount": 200.0,
131 + "currency": "SEK"
132 +}
133 +{{/code}}
134 +
135 +==== Resource ====
136 +
137 +{{code language="http" title="**Response**"}}
138 +HTTP/1.1 200 OK
139 +Content-Type: application/json
140 +
141 +{
142 + "description": "stora coop visby, köpref. 12345689",
143 + "sellerCaptureTransactionId" : "534313",
144 + "pspTransactionId" : "",
145 + "settlementBatchId" : "",
146 + "sellerReceiptId": "12345689",
147 + "captureAmount": 200.0,
148 + "currency": "SEK",
149 + "credits": "/ledger/credit-account-acquiring/v1/501/authorizations/123/captures/852/credits",
150 + "@id": "/ledger/credit-account-acquiring/v1/501/authorizations/123/capture/852",
151 + "parentHREF": "/ledger/credit-account-acquiring/v1/501/authorizations/123",
152 + "operations": [
153 + {
154 + "rel": "create-credit",
155 + "method": "post",
156 + "href": "/ledger/credit-account-acquiring/v1/501/authorizations/123/captures/852/credits"
157 + }
158 + ]
159 +}
160 +{{/code}}
161 +
162 +**Resource properties**
163 +
164 +(% class="table-bordered table-striped" %)
165 +|=(% style="width: 215px;" %)Property|=(% style="width: 114px;" %)Data type|=(% style="width: 118px;" %)Format|=(% style="width: 586px;" %)Description
166 +|(% style="width:215px" %)@id |(% style="width:114px" %)string|(% style="width:118px" %)Maxlength: |(% style="width:586px" %)
167 +|(% style="width:215px" %)description|(% style="width:114px" %)string|(% style="width:118px" %)Maxlength: |(% style="width:586px" %)
168 +|(% style="width:215px" %)sellerCaptureTransactionId|(% style="width:114px" %)string|(% style="width:118px" %)Maxlength|(% style="width:586px" %)
169 +|(% style="width:215px" %)pspTransactionId|(% style="width:114px" %)string|(% style="width:118px" %)Maxlength: |(% style="width:586px" %)
170 +|(% style="width:215px" %)settlementBatchId|(% style="width:114px" %)string|(% style="width:118px" %)Maxlength: |(% style="width:586px" %)
171 +|(% style="width:215px" %)sellerReceiptId|(% style="width:114px" %)date|(% style="width:118px" %)[[ISO 8601>>url:http://en.wikipedia.org/wiki/ISO_8601||rel="noreferrer" title="ISO8601 on Wikipedia"]]|(% style="width:586px" %)
172 +|(% style="width:215px" %)captureAmount|(% style="width:114px" %)decimal|(% style="width:118px" %) |(% style="width:586px" %)
173 +|(% style="width:215px" %)currency|(% style="width:114px" %)decimal|(% style="width:118px" %) |(% style="width:586px" %)
174 +|(% style="width:215px" %)credits|(% style="width:114px" %)string|(% style="width:118px" %)Maxlength|(% style="width:586px" %)
175 +
176 +== Credits ==
177 +
178 +==== List ====
179 +
180 +{{code language="http" title="**Request**"}}
181 +GET /ledger/credit-account-acquiring/v1/XXX/authorizations/captures/YYY/credits HTTP/1.1
182 +Host: -
183 +Authorization: Bearer <Token>
184 +Content-Type: application/json
185 +
186 +{{/code}}
187 +
188 +==== Get ====
189 +
190 +{{code language="http" title="**Request**"}}
191 +GET /ledger/credit-account-acquiring/v1/XXX/authorizations/captures/YYY/credits/NNN HTTP/1.1
192 +Host: -
193 +Authorization: Bearer <Token>
194 +Content-Type: application/json
195 +
196 +{{/code}}
197 +
198 +==== Post ====
199 +
200 +{{code language="http" title="**Request**"}}
201 +GET /ledger/credit-account-acquiring/v1/XXX/authorizations/captures/YYY/credits HTTP/1.1
202 +Host: -
203 +Authorization: Bearer <Token>
204 +Content-Type: application/json
205 +
206 +{
207 + "settlementBatchId" : "",
208 + "sellerReversalTransactionId" : "534313",
209 + "amountInclVat": 200.0,
210 + "currency": "SEK",
211 +}
212 +{{/code}}
213 +
214 +==== Resource ====
215 +
216 +{{code language="http" title="**Response**"}}
217 +HTTP/1.1 200 OK
218 +Content-Type: application/json
219 +
220 +{
221 + "settlementBatchId" : "",
222 + "sellerReversalTransactionId" : "534313",
223 + "amountInclVat": 200.0,
224 + "creditedAmountInclVat": 200.0,
225 + "currency": "SEK",
226 + "@id" : "/ledger/credit-account-acquiring/v1/501/authorizations/123/captures/852/credits/741",
227 + "parentHREF": "/ledger/credit-account-acquiring/v1/501/authorizations/123/captures/852",
228 + "operations" : []
229 +}
230 +{{/code}}
231 +
232 +**Resource properties**
233 +
234 +(% class="table-bordered table-striped" %)
235 +|=(% style="width: 215px;" %)Property|=(% style="width: 114px;" %)Data type|=(% style="width: 118px;" %)Format|=(% style="width: 586px;" %)Description
236 +|(% style="width:215px" %)@id |(% style="width:114px" %)string|(% style="width:118px" %)Maxlength: |(% style="width:586px" %)
237 +|(% style="width:215px" %)settlementBatchId|(% style="width:114px" %)string|(% style="width:118px" %)Maxlength: |(% style="width:586px" %)
238 +|(% style="width:215px" %)sellerReversalTransactionId|(% style="width:114px" %)string|(% style="width:118px" %)Maxlength|(% style="width:586px" %)
239 +|(% style="width:215px" %)amountInclVat|(% style="width:114px" %)decimal|(% style="width:118px" %) |(% style="width:586px" %)
240 +|(% style="width:215px" %)creditedAmountInclVat|(% style="width:114px" %)decimal|(% style="width:118px" %)Maxlength: |(% style="width:586px" %)
241 +|(% style="width:215px" %)currency|(% style="width:114px" %)date|(% style="width:118px" %)[[ISO 8601>>url:http://en.wikipedia.org/wiki/ISO_8601||rel="noreferrer" title="ISO8601 on Wikipedia"]]|(% style="width:586px" %)
242 +
243 +== Cancellations ==
244 +
245 +==== List ====
246 +
247 +{{code language="http" title="**Request**"}}
248 +GET /ledger/credit-account-acquiring/v1/XXX/authorizations/captures/YYY/cancellations HTTP/1.1
249 +Host: -
250 +Authorization: Bearer <Token>
251 +Content-Type: application/json
252 +
253 +{{/code}}
254 +
255 +==== Get ====
256 +
257 +{{code language="http" title="**Request**"}}
258 +GET /ledger/credit-account-acquiring/v1/XXX/authorizations/captures/YYY/cancellations/NNN HTTP/1.1
259 +Host: -
260 +Authorization: Bearer <Token>
261 +Content-Type: application/json
262 +
263 +{{/code}}
264 +
265 +==== Post ====
266 +
267 +{{code language="http" title="**Request**"}}
268 +GET /ledger/credit-account-acquiring/v1/XXX/authorizations/captures/YYY/cancellations HTTP/1.1
269 +Host: -
270 +Authorization: Bearer <Token>
271 +Content-Type: application/json
272 +{{/code}}
273 +
274 +==== Resource ====
275 +
276 +{{code language="http" title="**Response**"}}
277 +HTTP/1.1 200 OK
278 +Content-Type: application/json
279 +
280 +{
281 + "cancellationDate" : "2019-11-20",
282 + "@id" : "/ledger/credit-account-acquiring/v1/501/authorizations/123/cancellations",
283 + "parentHREF" : "/ledger/credit-account-acquiring/v1/501/authorizations/123"
284 +}
285 +{{/code}}
286 +
287 +**Resource properties**
288 +
289 +(% class="table-bordered table-striped" %)
290 +|=(% style="width: 215px;" %)Property|=(% style="width: 114px;" %)Data type|=(% style="width: 118px;" %)Format|=(% style="width: 586px;" %)Description
291 +|(% style="width:215px" %)@id |(% style="width:114px" %)string|(% style="width:118px" %)Maxlength: |(% style="width:586px" %)
292 +|(% style="width:215px" %)cancellationDate|(% style="width:114px" %)date|(% style="width:118px" %) |(% style="width:586px" %)
293 +
294 +Problems
295 +
296 +If an error occur or any validation failed, a "problem" response will be returned.
297 +Below is a list of problems that can occur:
298 +
299 +**HttpStatus 401 Unauthorized**
300 +
301 +* Token expired
302 +* Token invalid
303 +* SellerNumber does not match token
304 +* CompanyNumber does not match token
305 +
306 +**HttpStatus 400 Error**
307 +
308 +* Validation: Argument required
309 +* Validation: Invalid value
310 +
311 +**HttpStatus 422 Unprocessable entity**
312 +
313 +* Authorization declined
314 +
315 +**HttpStatus 409 Conflict**
316 +
317 +* Invoice already authorized
318 +* Duplicate InvoiceNumber
319 +* Authorization is cancelled
320 +* Authorization already captured
321 +* Authorization has expired
322 +* Insufficient debited amount XXX
323 +
324 +**HttpStatus 501 NotImplemented**
325 +
326 +* CompanyNumber XXX not configured
327 +* SellerNumber XXX not configured at PayEx
328 +* CompanyNumber XXX missing configuration
329 +
330 +**HttpStatus 404 NotFound**
331 +
332 +* Authorization not found
333 +
334 +Below is an example of a problem that will be returned if buyer##.nationalConsumerIdentifier.value## is not valid in the authorization post request.
335 +
336 +{{code language="http" title="**Response**"}}
337 +HTTP/1.1 400 Error
338 +Content-Type: application/problem+json
339 +
340 +{
341 + "Type": "http://[DNS]/ledger/invoice-purchase/problems/validation",
342 + "Title": "A validation error occurred",
343 + "Status": 400,
344 + "Instance": null,
345 + "Detail": "A validation error occurred. Please fix the problems mentioned in the 'problems' property below.",
346 + "Problems": [
347 + {
348 + "buyer.nationalConsumerIdentifier.value": "Not a valid SE nationalConsumerIdentifier"
349 + }
350 + ]
351 +}
352 +{{/code}}