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