Authorization Reversal Simulation
A cardholder makes a $40 purchase and then returns it shortly afterwards. The merchant sends a reversal for the full amount before the transaction settles. This is similar to the transaction shown in Authorization reversal and expiry in Card Transaction Examples.
Note
In Production, both an authorization and its reversal remain in the authorization table until they expire. However, CV does not have the automated expiry function, and you cannot use the Expire Authorization endpoint to expire reversed authorizations. Instead, the authorization is "completed" by the reversal, and it does not expire.
For examples of authorization and reversal expiries in Production, see Scenario 4: Reversal on Authorization Before Clearing (Mastercard) and Scenario 5: Reversal on Preauthorization Before Clearing (Visa).
Authorization
Call Create Simulated Card Authorization with these parameters:
Parameter | Value |
---|---|
accountNo | PAN or PRN |
amount | 40 |
association | visa or mc_auth |
merchantName | Central Retail |
mcc | 5999 |
transType | 1 or leave blank |
{
"status_code": 0,
"status": "Success",
"processing_time": 1.193,
"response_data": {
"auth_response_code": "00",
"auth_response_description": "Success",
"auth_id": 6677
},
"echo": {
"provider_transaction_id": "",
"provider_timestamp": null,
"transaction_id": "49164110-ad91-4505-a589-f2bcf954f2cf"
},
"system_timestamp": "2022-10-10 10:38:22",
"rtoken": "03944f54-35fc-44e7-9919-eea86cec2274"
}
Capture the auth_id
for later use.
Reversal
Call Create Simulated Card Authorization with these parameters, because reversals arrive at Galileo through the authorization stream.
Parameter | Value |
---|---|
accountNo | PAN or PRN |
amount | 40 |
association | visa or mc_auth |
merchantName | Central Retail |
originalAuthId | auth_id from previous response |
mcc | 5999 |
transType | 5 (Visa) or 6 (Mastercard) |
{
"status_code": 0,
"status": "Success",
"processing_time": 2.164,
"response_data": {
"auth_response_code": "00",
"auth_response_description": "Success",
"auth_id": 8899
},
"echo": {
"provider_transaction_id": "",
"provider_timestamp": null,
"transaction_id": "bfa9a69b-1e62-4f0f-aff6-30e7507df5a6"
},
"system_timestamp": "2022-10-10 10:44:01",
"rtoken": "8b2c86b0-251b-4a93-ad0a-1249d563eafb"
}
Transactions created
Call Get All Transaction History to see the two ledger entries.
"transactions": [
{
"is_savings": false,
"deny_code": null,
"disputable": false,
"details": "Central Retail, LT LAKE CITY, UTUS",
"act_type": "VI",
"act_type_description": "Visa Authorization",
"post_ts": "2022-10-10 10:44:01",
"amt": 40,
"source_id": "8899",
"type": "R",
"type_description": "",
"trans_code": "VIR",
"arn": "",
"merchant_id": "nZ8yqLz4etblcqH",
"external_trans_id": "",
"calculated_balance": 500,
"ach_trans_id": null,
"auth_ts": "2022-10-10 10:38:22",
"prior_id": "6677",
"card_id": "5530",
"formatted_merchant_desc": "CENTRAL RETAIL, LT LAKE CITY, UTUS",
"network_code": "V",
"auth_id": "8899",
"local_amt": 40,
"local_curr_code": "840",
"settle_amt": 0,
"settle_curr_code": null,
"billing_amt": null,
"billing_curr_code": null,
"pmt_ref_no": "999102163165",
"mcc_code": "4238",
"credit_ind": "Y"
},
{
"is_savings": false,
"deny_code": null,
"disputable": false,
"details": "Central Retail, LT LAKE CITY, UTUS",
"act_type": "VI",
"act_type_description": "Visa Authorization",
"post_ts": "2022-10-10 10:38:22",
"amt": -40,
"source_id": "6677",
"type": "A",
"type_description": "",
"trans_code": "VIA",
"arn": "",
"merchant_id": "nZ8yqLz4etblcqH",
"external_trans_id": "",
"calculated_balance": 460,
"ach_trans_id": null,
"auth_ts": "2022-10-10 10:38:22",
"prior_id": "0",
"card_id": "5530",
"formatted_merchant_desc": "CENTRAL RETAIL, LT LAKE CITY, UTUS",
"network_code": "V",
"auth_id": "6677",
"local_amt": 40,
"local_curr_code": "840",
"settle_amt": 0,
"settle_curr_code": null,
"billing_amt": null,
"billing_curr_code": null,
"pmt_ref_no": "999102163165",
"mcc_code": "4238",
"credit_ind": "Y"
}
]
Updated over 1 year ago