Changes for page card-transaction

Last modified by David Persson on 2024/02/21 07:48
From empty
To version 26.1
edited by David Persson
on 2020/02/21 08:20
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,0 +1,1 @@
1 +../card-transaction
Parent
... ... @@ -1,0 +1,1 @@
1 +Main.credit-account.api.WebHome
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.XWikiGuest
1 +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,698 @@
1 +(% class="jumbotron" %)
2 +(((
3 +(% class="container" %)
4 +(((
5 +
6 +
7 +Integrate to **PayEx Ledger Card transaction API **
8 +)))
9 +)))
10 +
11 +(% class="lead" %)
12 +The card transaction api contains functions that are used in payment scenarios: online, in-store and offline. Before transactions can be created an account must exists with associated cards.
13 +
14 +[[image:1582184597141-697.png||height="393" width="537"]]
15 +
16 +----
17 +
18 += Changelog =
19 +
20 +
21 +== Authorizations ==
22 +
23 +(% class="wikigeneratedid" %)
24 +An authorization is made to try to use an account for payment. A successful authorization leads to a reservation on the account, the account is identified through the **cardToken** or the **accountNo**. The authorization is not a financial transaction, to make the financial transaction a Purchase must posted on the authorization.
25 +
26 +==== Post authorizations ====
27 +
28 +{{code language="http" title="**Request**"}}
29 +POST /ledger/card-transaction/v1/XXX/authorizations HTTP/1.1
30 +Host: -
31 +Authorization: Bearer <Token>
32 +Content-Type: application/json
33 +
34 +{
35 + "sourceAuthorizationTransactionId": "789",
36 + "sellerNumber": "654",
37 + "cardToken": "5646735165",
38 + "type": "purchase|reversal|cash-withdrawal",
39 + "pointOfSale": "Testshop",
40 + "authorizationAmount": 300.0,
41 + "currency": "SEK"
42 +}
43 +{{/code}}
44 +
45 +
46 +{{code language="http" title="**Response**"}}
47 +HTTP/1.1 200 OK
48 +Content-Type: application/json
49 +
50 +{
51 + "@id": "/ledger/card-transaction/v1/XXX/authorization/YYY",
52 +}
53 +{{/code}}
54 +
55 +====
56 +Get authorizations ====
57 +
58 +{{code language="http" title="**Request**"}}
59 +GET /ledger/card-transaction/v1/XXX/authorizations/YYY HTTP/1.1
60 +Host: -
61 +Authorization: Bearer <Token>
62 +Content-Type: application/json
63 +{{/code}}
64 +
65 +==== ====
66 +
67 +{{code language="http" title="**Response**"}}
68 +HTTP/1.1 200 OK
69 +Content-Type: application/json
70 +
71 +{
72 + "sourceAuthorizationTransactionId": "789",
73 + "authorizationId": 123,
74 + "sellerNumber": "654",
75 + "cardToken": "546415646315",
76 + "type": "purchase|reversal|cash-withdrawal",
77 + "pointOfSale": "Testshop",
78 + "validToDate": "2019-11-28",
79 + "authorizationAmount": 300.0,
80 + "remainingAmount" : 150.0,
81 + "currency": "SEK",
82 + "@id": "/ledger/card-transaction/v1/XXX/authorizations/NNN",
83 + "purchases": "/ledger/card-transaction/v1/XXX/purchases?authorizationId=123",
84 + "cash-withdrawals": "/ledger/card-transaction/v1/XXX/authorizations/NNN/cash-withdrawals?authorizationId=123",
85 + "reversals": "/ledger/card-transaction/v1/XXX/authorizations/NNN/reversals?authorizationId=123",
86 + "parentHREF": "/",
87 + "operations": []
88 +}
89 +{{/code}}
90 +
91 +
92 +==== Resource properties authorizations ====
93 +
94 +(% class="table-bordered table-striped" %)
95 +|=(% style="width: 215px;" %)Property|=(% style="width: 114px;" %)Data type|=(% style="width: 118px;" %)Format|=(% style="width: 586px;" %)Description
96 +|(% style="width:215px" %)@id |(% style="width:114px" %)string|(% style="width:118px" %)Uri |(% style="width:586px" %)
97 +|(% style="width:215px" %)sourceAuthorizationTransactionId|(% style="width:114px" %)string|(% style="width:118px" %)Maxlength: 50|(% style="width:586px" %)Unique identifier of the specific authorization, generated by source (typically the integrating system)
98 +|(% style="width:215px" %)authorizationId|(% style="width:114px" %)string|(% style="width:118px" %)Maxlength: 6|(% style="width:586px" %)Unique identifier of the authorization, generated by PayEx. Should be stored and must be set when transactions is to be created (except for purchases in offline mode)
99 +|(% style="width:215px" %)sellerNumber|(% style="width:114px" %)string|(% style="width:118px" %)Maxlength: 15|(% style="width:586px" %)Identifier of the current seller/merchant
100 +|(% style="width:215px" %)cardToken|(% style="width:114px" %)string|(% style="width:118px" %) |(% style="width:586px" %)Identifier of the card. The aurhotization is made on the account that the card is linked to
101 +|(% style="width:215px" %)type|(% style="width:114px" %)string|(% style="width:118px" %) |(% style="width:586px" %)(((
102 +type of authorization
103 +
104 +* purchase
105 +* reversal
106 +* cash-withdrawal
107 +)))
108 +|(% style="width:215px" %)pointOfSale|(% style="width:114px" %)string|(% style="width:118px" %)Maxlength: 50|(% style="width:586px" %)Name of the location/point/shop of sale, will be returned in reservation resource
109 +|(% 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" %)Purchase can not be executed after this date
110 +|(% style="width:215px" %)authorizeAmount|(% style="width:114px" %)decimal|(% style="width:118px" %)Amount|(% style="width:586px" %)Original authorized amount
111 +|(% style="width:215px" %)remainingAmount|(% style="width:114px" %)decimal|(% style="width:118px" %)Amount|(% style="width:586px" %)Amount left on the authorization that can be Purchased
112 +|(% style="width:215px" %)currency|(% style="width:114px" %)string|(% style="width:118px" %)[[ISO 4217>>url:https://sv.wikipedia.org/wiki/ISO_4217]]|(% style="width:586px" %)
113 +|(% style="width:215px" %)purchases|(% style="width:114px" %)string|(% style="width:118px" %)Uri|(% style="width:586px" %)
114 +|(% style="width:215px" %)cancellations|(% style="width:114px" %)string|(% style="width:118px" %)Uri|(% style="width:586px" %)
115 +
116 +----
117 +
118 +== Purchases ==
119 +
120 +==== Post purchases ====
121 +
122 +{{code language="http" title="**Request**"}}
123 +POST /ledger/card-transaction/v1/XXX/purchases HTTP/1.1
124 +Host: -
125 +Authorization: Bearer <Token>
126 +Content-Type: application/json
127 +
128 +{
129 + "authorizationId" : "AUTH71",
130 + "sourcePurchaseTransactionId" : "534313",
131 + "sellerReceiptId": "2019-11-28",
132 + "additionalReferences":{
133 + "acquirerBatchId": "fdsfsdfsd",
134 + "acquirerTransactionId" : "534313"
135 + },
136 + "amount": 200.0,
137 + "offlineInfo" : {
138 + "pointOfSale": "Testshop",
139 + "cardToken": "5646735165",
140 + "sellerNumber": "654",
141 + "currency": "SEK",
142 + }
143 +}
144 +{{/code}}
145 +
146 +==== Get purchases ====
147 +
148 +{{code language="http" title="**Request**"}}
149 +GET /ledger/card-transaction/v1/XXX/purchases/YYY HTTP/1.1
150 +Host: -
151 +Authorization: Bearer <Token>
152 +Content-Type: application/json
153 +
154 +{{/code}}
155 +
156 +==== List purchases ====
157 +
158 +{{code language="http" title="**Request**"}}
159 +GET /ledger/card-transaction/v1/XXX/purchases HTTP/1.1
160 +Host: -
161 +Authorization: Bearer <Token>
162 +Content-Type: application/json
163 +
164 +{{/code}}
165 +
166 +==== Resource purchases ====
167 +
168 +{{code language="http" title="**Response**"}}
169 +HTTP/1.1 201 CREATED
170 +Content-Type: application/json
171 +
172 +{
173 + "description": "stora butiken test, köpref. 12345689",
174 + "authorizationId" : "AUTH71",
175 + "sourcePurchaseTransactionId" : "534313",
176 + "sellerReceiptId": "2019-11-28",
177 + "additionalReferences":{
178 + "acquirerBatchId": "fdsfsdfsd",
179 + "acquirerTransactionId" : "534313"
180 + },
181 + "amount": 200.0,
182 + "offlineInfo" : {
183 + "pointOfSale": "Testshop",
184 + "cardToken": "5646735165",
185 + "sellerNumber": "654",
186 + "currency": "SEK",
187 + },
188 + "corrections": "/ledger/card-transaction/v1/XXX/purchases/YYY/corrections",
189 + "@id": "/ledger/card-transaction/v1/XXX/purchases/YYY",
190 + "operations": [
191 + {
192 + "rel": "create-correction",
193 + "method": "post",
194 + "href": "/ledger/card-transaction/v1/XXX/authorizations/NNN/purchases/YYY/corrections"
195 + }
196 + ]
197 +}
198 +{{/code}}
199 +
200 +==== Resource properties purchases ====
201 +
202 +(% class="table-bordered table-striped" %)
203 +|=(% style="width: 337px;" %)Property|=(% style="width: 121px;" %)Data type|=(% style="width: 164px;" %)Format|=(% style="width: 1156px;" %)Description
204 +|(% style="width:337px" %)@id |(% style="width:121px" %)string|(% style="width:164px" %)Uri|(% style="width:1156px" %)
205 +|(% style="width:337px" %)description|(% style="width:121px" %)string|(% style="width:164px" %)Maxlength: 200|(% style="width:1156px" %)Describes the current Purchase (derives from info sent in the authorization), may be printed on the bill, output only
206 +|(% style="width:337px" %)authorizationId|(% style="width:121px" %)string|(% style="width:164px" %)Maxlength: 6|(% style="width:1156px" %)The id of the authorization from which this purchase originated from (not required if the purchase was made offline)
207 +|(% style="width:337px" %)(((
208 +(% style="background-color:transparent" %)sourcePurchaseTransactionId
209 +)))|(% style="width:121px" %)string|(% style="width:164px" %)Maxlength: 50|(% style="width:1156px" %)Unique identifier of the Purchase transaction
210 +|(% style="width:337px" %)(((
211 +additionalReferences.acquirerBatchId
212 +)))|(% style="width:121px" %)string|(% style="width:164px" %)Maxlength: 50|(% style="width:1156px" %)Used for reconciling acquirer transactions. See [[RKHA21>>||anchor="HRKHA21format"]] section on this page for more information
213 +|(% style="width:337px" %)additionalReferences.acquirerTransactionId|(% style="width:121px" %)string|(% style="width:164px" %)Maxlength: 50|(% style="width:1156px" %)Unique acquirer identifier of the transaction
214 +|(% style="width:337px" %)sellerReceiptId|(% style="width:121px" %)string|(% style="width:164px" %)Maxlength: 50|(% style="width:1156px" %)
215 +|(% style="width:337px" %)amount|(% style="width:121px" %)decimal|(% style="width:164px" %) |(% style="width:1156px" %)
216 +|(% style="width:337px" %)offlineInfo.pointOfSale|(% style="width:121px" %)string|(% style="width:164px" %)Maxlength: 50|(% style="width:1156px" %)Name of the location/point/shop of sale, will be returned in reservation resource
217 +|(% style="width:337px" %)offlineInfo.cardToken|(% style="width:121px" %)string|(% style="width:164px" %) |(% style="width:1156px" %)Identifier of the card. The purchase will be made on the account that the card is linked to
218 +|(% style="width:337px" %)offlineInfo.sellerNumber|(% style="width:121px" %)string|(% style="width:164px" %)Maxlength: 15|(% style="width:1156px" %)Identifier of the current seller/merchant
219 +|(% style="width:337px" %)corrections|(% style="width:121px" %)string|(% style="width:164px" %)Uri|(% style="width:1156px" %)
220 +
221 +----
222 +
223 +== Cash-withdrawals ==
224 +
225 +==== Post cash-withdrawals ====
226 +
227 +{{code language="http" title="**Request**"}}
228 +POST /ledger/card-transaction/v1/XXX/cash-withdrawals HTTP/1.1
229 +Host: -
230 +Authorization: Bearer <Token>
231 +Content-Type: application/json
232 +
233 +{
234 + "authorizationId" : "AUTH71",
235 + "sourceCashWithdrawalTransactionId" : "534313",
236 + "sellerReceiptId": "2019-11-28",
237 + "additionalReferences":{
238 + "acquirerBatchId": "fdsfsdfsd",
239 + "acquirerTransactionId" : "534313"
240 + },
241 + "amount": 200.0
242 +}
243 +{{/code}}
244 +
245 +==== Get cash-withdrawals ====
246 +
247 +{{code language="http" title="**Request**"}}
248 +GET /ledger/card-transaction/v1/XXX/cash-withdrawals/YYY HTTP/1.1
249 +Host: -
250 +Authorization: Bearer <Token>
251 +Content-Type: application/json
252 +
253 +{{/code}}
254 +
255 +==== List cash-withdrawals ====
256 +
257 +{{code language="http" title="**Request**"}}
258 +GET /ledger/card-transaction/v1/XXX/cash-withdrawals HTTP/1.1
259 +Host: -
260 +Authorization: Bearer <Token>
261 +Content-Type: application/json
262 +
263 +{{/code}}
264 +
265 +==== Resource cash-withdrawals ====
266 +
267 +{{code language="http" title="**Response**"}}
268 +HTTP/1.1 201 CREATED
269 +Content-Type: application/json
270 +
271 +{
272 + "description": "stora butiken test, köpref. 12345689",
273 + "authorizationId" : "AUTH71",
274 + "sourceCashWithdrawalTransactionId" : "534313",
275 + "sellerReceiptId": "2019-11-28",
276 + "additionalReferences":{
277 + "acquirerBatchId": "fdsfsdfsd",
278 + "acquirerTransactionId" : "534313"
279 + },
280 + "amount": 200.0,
281 + "corrections": "/ledger/card-transaction/v1/XXX/cash-withdrawals/YYY/corrections",
282 + "@id": "/ledger/card-transaction/v1/XXX/cash-withdrawals/YYY",
283 + "operations": [
284 + {
285 + "rel": "create-correction",
286 + "method": "post",
287 + "href": "/ledger/card-transaction/v1/XXX/cash-withdrawals/YYY/corrections"
288 + }
289 + ]
290 +}
291 +{{/code}}
292 +
293 +==== Resource properties cash-withdrawals ====
294 +
295 +(% class="table-bordered table-striped" %)
296 +|=(% style="width: 337px;" %)Property|=(% style="width: 121px;" %)Data type|=(% style="width: 164px;" %)Format|=(% style="width: 1156px;" %)Description
297 +|(% style="width:337px" %)@id |(% style="width:121px" %)string|(% style="width:164px" %)Uri|(% style="width:1156px" %)
298 +|(% style="width:337px" %)description|(% style="width:121px" %)string|(% style="width:164px" %)Maxlength: 200|(% style="width:1156px" %)Describes the current cash-withdrawals (derives from info sent in the authorization), may be printed on the bill, output only
299 +|(% style="width:337px" %)authorizationId|(% style="width:121px" %)string|(% style="width:164px" %)Maxlength: 6|(% style="width:1156px" %)The id of the authorization from which this cash-withdrawal transaction originated from
300 +|(% style="width:337px" %)(((
301 +(% style="background-color:transparent" %)sourceCashWithdrawalTransactionId
302 +)))|(% style="width:121px" %)string|(% style="width:164px" %)Maxlength: 50|(% style="width:1156px" %)Unique identifier of the cash-withdrawal transaction
303 +|(% style="width:337px" %)(((
304 +additionalReferences.acquirerBatchId
305 +)))|(% style="width:121px" %)string|(% style="width:164px" %)Maxlength: 50|(% style="width:1156px" %)Used for reconciling acquirer transactions. See [[RKHA21>>||anchor="HRKHA21format"]] section on this page for more information
306 +|(% style="width:337px" %)additionalReferences.acquirerTransactionId|(% style="width:121px" %)string|(% style="width:164px" %)Maxlength: 50|(% style="width:1156px" %)Unique acquirer identifier of the transaction
307 +|(% style="width:337px" %)sellerReceiptId|(% style="width:121px" %)string|(% style="width:164px" %)Maxlength: 50|(% style="width:1156px" %)
308 +|(% style="width:337px" %)amount|(% style="width:121px" %)decimal|(% style="width:164px" %) |(% style="width:1156px" %)
309 +|(% style="width:337px" %)corrections|(% style="width:121px" %)string|(% style="width:164px" %)Uri|(% style="width:1156px" %)
310 +
311 +----
312 +
313 +=== Reversals ===
314 +
315 +Used to refund a purchase for any reason
316 +
317 +==== Create reversals ====
318 +
319 +Execute post towards this resource to add the amount on the card (account) specified in the authorization
320 +
321 +{{code language="http" title="**Request**"}}
322 +POST /ledger/card-transaction/v1/XXX/reversals HTTP/1.1
323 +Host: -
324 +Authorization: Bearer <Token>
325 +Content-Type: application/json
326 +
327 +{
328 + "authorizationId" : "AUTH71",
329 + "sellerReceiptId": "12345689",
330 + "additionalReferences":{
331 + "acquirerBatchId": "fdsfsdfsd",
332 + "acquirerTransactionId" : "534313",
333 + },
334 + "sourceReversalTransactionId" : "534312",
335 + "amount": 200.0
336 +}
337 +{{/code}}
338 +
339 +==== Get reversals ====
340 +
341 +{{code language="http" title="**Request**"}}
342 +GET /ledger/card-transaction/v1/XXX/reversals/YYY HTTP/1.1
343 +Host: -
344 +Authorization: Bearer <Token>
345 +Content-Type: application/json
346 +
347 +{{/code}}
348 +
349 +==== List reversals ====
350 +
351 +{{code language="http" title="**Request**"}}
352 +GET /ledger/card-transaction/v1/XXX/reversals HTTP/1.1
353 +Host: -
354 +Authorization: Bearer <Token>
355 +Content-Type: application/json
356 +
357 +{{/code}}
358 +
359 +==== Resource reversals ====
360 +
361 +{{code language="http" title="**Response**"}}
362 +HTTP/1.1 200 OK
363 +Content-Type: application/json
364 +
365 +{
366 + "authorizationId" : "AUTH71",
367 + "sellerReceiptId": "12345689",
368 + "additionalReferences":{
369 + "acquirerBatchId": "fdsfsdfsd",
370 + "acquirerTransactionId" : "534313",
371 + },
372 + "sourceReversalTransactionId" : "534312",
373 + "amount": 200.0,
374 + "@id" : "/ledger/card-transaction/v1/XXX/reversals/YYY",
375 + "operations" : [
376 + {
377 + "rel": "create-correction",
378 + "method": "post",
379 + "href": "/ledger/card-transaction/v1/XXX/reversals/YYY/corrections"
380 + }
381 + ]
382 +}
383 +{{/code}}
384 +
385 +==== Resource reversals properties ====
386 +
387 +(% class="table-bordered table-striped" %)
388 +|=(% style="width: 215px;" %)Property|=(% style="width: 114px;" %)Data type|=(% style="width: 118px;" %)Format|=(% style="width: 586px;" %)Description
389 +|(% style="width:215px" %)@id |(% style="width:114px" %)string|(% style="width:118px" %)Maxlength: |(% style="width:586px" %)
390 +|(% style="width:337px" %)authorizationId|(% style="width:121px" %)string|(% style="width:164px" %)Maxlength: 6|(% style="width:1156px" %)The id of the authorization from which this reversal originated from
391 +|(% style="width:337px" %)sellerReceiptId|(% style="width:121px" %)string|(% style="width:164px" %)Maxlength: 50|(% style="width:1156px" %)
392 +|(% style="width:337px" %)(((
393 +additionalReferences.acquirerBatchId
394 +)))|(% style="width:121px" %)string|(% style="width:164px" %)Maxlength: 50|(% style="width:1156px" %)Used for reconciling acquirer transactions. See [[RKHA21>>||anchor="HRKHA21format"]] section on this page for more information
395 +|(% style="width:337px" %)additionalReferences.acquirerTransactionId|(% style="width:121px" %)string|(% style="width:164px" %)Maxlength: 50|(% style="width:1156px" %)Unique acquirer identifier of the transaction
396 +|(% style="width:215px" %)sourceReversalTransactionId|(% style="width:114px" %)string|(% style="width:118px" %)Maxlength: 50|(% style="width:586px" %)
397 +|(% style="width:215px" %)amount|(% style="width:114px" %)decimal|(% style="width:118px" %) |(% style="width:586px" %)
398 +
399 +=== Corrections ===
400 +
401 +Each type of transactions can be corrected by making a POST call against its correction resource
402 +
403 +==== Create purchase corrections ====
404 +
405 +{{code language="http" title="**Request**"}}
406 +POST /ledger/card-transaction/v1/XXX/purchases/YYY/corrections HTTP/1.1
407 +Host: -
408 +Authorization: Bearer <Token>
409 +Content-Type: application/json
410 +
411 +{
412 + "additionalReferences":{
413 + "acquirerBatchId": "fdsfsdfsd",
414 + "acquirerTransactionId" : "534313",
415 + },
416 + "sourceCorrectionTransactionId" : "534313",
417 + "amount": 200.0
418 +}
419 +{{/code}}
420 +
421 +==== Create cash-withdrawal corrections ====
422 +
423 +{{code language="http" title="**Request**"}}
424 +POST /ledger/card-transaction/v1/XXX/cash-withdrawal/YYY/corrections HTTP/1.1
425 +Host: -
426 +Authorization: Bearer <Token>
427 +Content-Type: application/json
428 +
429 +{
430 + "additionalReferences":{
431 + "acquirerBatchId": "fdsfsdfsd",
432 + "acquirerTransactionId" : "534313",
433 + },
434 + "sourceCorrectionTransactionId" : "534313",
435 + "amount": 200.0
436 +}
437 +{{/code}}
438 +
439 +==== Create reversal corrections ====
440 +
441 +{{code language="http" title="**Request**"}}
442 +POST /ledger/card-transaction/v1/XXX/reversals/YYY/corrections HTTP/1.1
443 +Host: -
444 +Authorization: Bearer <Token>
445 +Content-Type: application/json
446 +
447 +{
448 + "additionalReferences":{
449 + "acquirerBatchId": "fdsfsdfsd",
450 + "acquirerTransactionId" : "534313",
451 + },
452 + "sourceCorrectionTransactionId" : "534313",
453 + "amount": 200.0
454 +}
455 +{{/code}}
456 +
457 +==== Corrections resource properties ====
458 +
459 +(% class="table-bordered table-striped" %)
460 +|=(% style="width: 215px;" %)(((
461 +Property
462 +)))|=(% style="width: 114px;" %)(((
463 +Data type
464 +)))|=(% style="width: 118px;" %)(((
465 +Format
466 +)))|=(% style="width: 586px;" %)(((
467 +Description
468 +)))
469 +|(% style="width:215px" %)(((
470 +@id
471 +)))|(% style="width:114px" %)(((
472 +string
473 +)))|(% style="width:118px" %)(((
474 +Maxlength:
475 +)))|(% style="width:586px" %)(((
476 +
477 +)))
478 +|(% style="width:337px" %)(((
479 +additionalReferences.acquirerBatchId
480 +)))|(% style="width:121px" %)(((
481 +string
482 +)))|(% style="width:164px" %)(((
483 +Maxlength: 50
484 +)))|(% style="width:1156px" %)(((
485 +Used for reconciling acquirer transactions. See [[RKHA21>>||anchor="HRKHA21format"]] section on this page for more information
486 +)))
487 +|(% style="width:337px" %)(((
488 +additionalReferences.acquirerTransactionId
489 +)))|(% style="width:121px" %)(((
490 +string
491 +)))|(% style="width:164px" %)(((
492 +Maxlength: 50
493 +)))|(% style="width:1156px" %)(((
494 +Unique acquirer identifier of the transaction
495 +)))
496 +|(% style="width:215px" %)(((
497 +sourceCorrectionTransactionId
498 +)))|(% style="width:114px" %)(((
499 +string
500 +)))|(% style="width:118px" %)(((
501 +Maxlength: 50
502 +)))|(% style="width:586px" %)(((
503 +
504 +)))
505 +|(% style="width:215px" %)(((
506 +amount
507 +)))|(% style="width:114px" %)(((
508 +decimal
509 +)))|(% style="width:118px" %)(((
510 +
511 +)))|(% style="width:586px" %)(((
512 +
513 +)))
514 +
515 +== RKHA21 format ==
516 +
517 +If the original source for the transactions towards purchases/cash-withdrawals/reversals/corrections is the RKHA21 file the below rules should be used to set the AcquirerBatchId.
518 +
519 +AcquirerBatchId = [Processing date][Sender][Cycle]
520 +
521 +For the example values in the table below the AcquirerBatchId will be "**200206885020**".
522 +
523 +**RKHA21 file header row description**
524 +
525 +(% class="table-bordered table-striped" %)
526 +|=(% style="width: 113px;" %)(((
527 +Position
528 +)))|=(% style="width: 226px;" %)(((
529 +Field
530 +)))|=(% style="width: 118px;" %)(((
531 +Format
532 +)))|=(% style="width: 586px;" %)(((
533 +Description
534 +)))|=(% style="width: 586px;" %)(((
535 +Example
536 +)))
537 +|(% style="width:113px" %)(((
538 +1
539 +)))|(% style="width:226px" %)(((
540 +Transaction code
541 +)))|(% style="width:118px" %)(((
542 +2 N
543 +)))|(% style="width:586px" %)(((
544 +01
545 +)))|(% style="width:586px" %)(((
546 +
547 +)))
548 +|(% style="width:113px" %)(((
549 +3
550 +)))|(% style="width:226px" %)(((
551 +Processing date
552 +)))|(% style="width:118px" %)(((
553 +6 N
554 +)))|(% style="width:586px" %)(((
555 +YYMMDD
556 +)))|(% style="width:586px" %)(((
557 +200206
558 +)))
559 +|(% style="width:113px" %)(((
560 +9
561 +)))|(% style="width:226px" %)(((
562 +Sender
563 +)))|(% style="width:118px" %)(((
564 +4 N
565 +)))|(% style="width:586px" %)(((
566 +"8850" (Babs)
567 +)))|(% style="width:586px" %)(((
568 +8850
569 +)))
570 +|(% style="width:113px" %)(((
571 +13
572 +)))|(% style="width:226px" %)(((
573 +Cycle
574 +)))|(% style="width:118px" %)(((
575 +2 AN
576 +)))|(% style="width:586px" %)(((
577 +10/20
578 +)))|(% style="width:586px" %)(((
579 +20
580 +)))
581 +|(% style="width:113px" %)(((
582 +15
583 +)))|(% style="width:226px" %)(((
584 +Filler
585 +)))|(% style="width:118px" %)(((
586 +26 AN
587 +)))|(% style="width:586px" %)(((
588 +Space characters
589 +)))|(% style="width:586px" %)(((
590 +
591 +)))
592 +|(% style="width:113px" %)(((
593 +41
594 +)))|(% style="width:226px" %)(((
595 +Vers.nr/serial number
596 +)))|(% style="width:118px" %)(((
597 +6 N
598 +)))|(% style="width:586px" %)(((
599 +File serial number
600 +)))|(% style="width:586px" %)(((
601 +
602 +)))
603 +|(% style="width:113px" %)(((
604 +47
605 +)))|(% style="width:226px" %)(((
606 +Transaction entry
607 +)))|(% style="width:118px" %)(((
608 +1 AN
609 +)))|(% style="width:586px" %)(((
610 +
611 +)))|(% style="width:586px" %)(((
612 +
613 +)))
614 +|(% style="width:113px" %)(((
615 +48
616 +)))|(% style="width:226px" %)(((
617 +Filler
618 +)))|(% style="width:118px" %)(((
619 +333 AN
620 +)))|(% style="width:586px" %)(((
621 +Space characters
622 +)))|(% style="width:586px" %)(((
623 +
624 +)))
625 +
626 +(% class="box successmessage" %)
627 +(((
628 +The **rkha **format actually has a 28 character filler at position 13 by default, but for "Babs" the first two positions in this filler are redefined to be "cycle" (position 13 and 14), which leaves the Filler to be 26 characters instead of 28.
629 +)))
630 +
631 +== Problems ==
632 +
633 +If an error occur or any validation failed, a "problem" response will be returned.
634 +Below is a list of problems that can occur:
635 +
636 +**HttpStatus 401 Unauthorized**
637 +
638 +(((
639 +* Token expired
640 +* Token invalid
641 +* CompanyNumber does not match token
642 +)))
643 +
644 +**HttpStatus 400 Error**
645 +
646 +(((
647 +* Validation: Argument required
648 +* Validation: Invalid value
649 +)))
650 +
651 +**HttpStatus 409 Conflict**
652 +
653 +(((
654 +* Authorization declined
655 +* Card with token {cardtoken} does not exists
656 +* Duplicate authorization
657 +* Duplicate purchase
658 +* Duplicate cash-withdrawal
659 +* Duplicate reversal
660 +* Duplicate correction
661 +* Authorization has expired
662 +* Insufficient amount to correct
663 +* Insufficient amount on authorization
664 +)))
665 +
666 +**HttpStatus 501 NotImplemented**
667 +
668 +(((
669 +* CompanyNumber XXX not configured
670 +* SellerNumber XXX not configured at PayEx
671 +* CompanyNumber XXX missing configuration
672 +)))
673 +
674 +**HttpStatus 404 NotFound**
675 +
676 +* (((
677 +Authorization not found
678 +)))
679 +
680 +Below is an example of a problem that will be returned if acquirerBatchId is not valid.
681 +
682 +{{code language="http" title="**Response**"}}
683 +HTTP/1.1 400 Error
684 +Content-Type: application/problem+json
685 +
686 +{
687 + "Type": "http://[DNS]/ledger/card-transaction/problems/validation",
688 + "Title": "A validation error occurred",
689 + "Status": 400,
690 + "Instance": null,
691 + "Detail": "A validation error occurred. Please fix the problems mentioned in the 'problems' property below.",
692 + "Problems": [
693 + {
694 + "additionalReferences.acquirerBatchId": "Not a valid acquirerBatchId"
695 + }
696 + ]
697 +}
698 +{{/code}}
1582184597141-697.png
Author
... ... @@ -1,0 +1,1 @@
1 +xwiki:XWiki.dap
Size
... ... @@ -1,0 +1,1 @@
1 +0 bytes
Content