API
POSTEMV Request#
The payload of reversal must contain details of the original checkout request. For the full list of parameters, refer our API Reference section.
Reversal Request
Reversal URL Parameters
| API | Type | Mandatory |
|---|---|---|
| accountid# | string | Required |
| storeid# | string | Required |
| deviceid# | string | Required |
| merchantkey**# | string | Required |
| transactionid# | string | Conditional |
| amount# | money | Required |
| currency# | string | Required |
| reference# | string | Required |
| reversaldetails# | Reversal Details | Required |
| transtype***# | string | Conditional |
| billing# | Billing | Required |
** Refer the “merchantkey” construction details in Authentication section(Part A)
*** Refer reversal transaction types to be sent in request. If the transtype is sent, the actual reveral request will be processed, if the transtype not sent system will process either void or refund based on the transaction state and response will be sent with the processed reversal type. If partial refund is being attempted, then transtype is mandatory.
Reversal can be used for transaction which has been authorised successfully. It can also be used for transactions for which no response has been received, in that case transactionid can be omittied. In this scenario, if the transaction was successful , then the reversal will be attempted. If the transaction was not successful, then the reversal will fail.
Try it
· EMV RequestThe payload is not valid JSON. Requests are relayed through this site to https://lateralpayments.com/checkout-staging. Use sandbox credentials only; nothing is stored.
EMV Response#
The response to reversal API indicates the status of transaction whether it was successfully reversed and also will contain unique transaction and order id’s.
Reversal Respose
Reversal URL Parameters
| API | Type | Mandatory |
|---|---|---|
| accountid# | string | Required |
| storeid# | string | Required |
| deviceid# | string | Required |
| transactionid# | numeric | Required |
| status# | Status | Required |
| reversaldetails# | Reversal Details | Required |
| responsekey**# | string | Required |
| transtype# | string | Optional |
| emvtags# | array(contents can vary) | Optional |
| response_emvtags# | array(contents can vary) | Optional |
** Refer the “responsekey” details in Authentication section(Part A)
Sample:
{
"accountid": "test_pos",
"storeid": "store1",
"deviceid": "latapydssj5",
"transactionid": "1012276",
"amount": "0.02",
"currency": "AUD",
"reference": "lpstest123",
"status": {
"responsetype": "0",
"statuscode": "2",
"errorcode": "",
"errordesc": "",
"original_code":""
},
"reversaldetails": {
"type": "standard",
"reason": "Customer doesnt want the service - so requesting refund",
"refundid":"112357"
},
"responsekey": "7E6FEE0DB09A3EEB53C2574AF5668F21491DC53D59460D317BF867B2EC38C872"
}