Changes for page card-transaction

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