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