This APi must be use it to cancel a payment
api-key | {api-key}
Key Provided to use this platform |
Content-Type | application/json |
{
"contextRequest": {
"tenantName": "{tenant_name}}",
"token":
"{cashier_token}}"
},
"transactionid": "1098",
"reason": "just testing"
}
The data to be submitted to the API is composed of the following fields:
field | Note | Example | Required | |||||
---|---|---|---|---|---|---|---|---|
contextrequest.tenantName | Company code | Cloudpayments | true | |||||
contextrequest.token | Token obteined on Cashier Login | ea6bcf91-e5af-45a8-a7f3-d18004a6a6a3 | true | |||||
transactionid | Id of the transaction obtenien on Pay With Card | 1155 | true | |||||
reason | Cancel payment reason | Wrong amount | true |
{
var settings = {
"url": "http://api-dev.liftcommerce.com/payment/api/v1/services/cancelTrx",
"method": "POST",
"timeout": 0,
"headers": {
"api-key": "{api-key}",
"Content-Type": "application/json"
},
"data": "{
"contextRequest": {
"tenantName": "Cloudpayments",
"token": "ea6bcf91-e5af-45a8-a7f3-d18004a6a6a3"
},
"transactionid": "1098",
"reason": " Wrong amount"
}",
};
$.ajax(settings).done(function (response) {
console.log(response);
});