post https://api.edgepay-uat.com/payment/
Adding "Yes" in the Adjust action code allows you to adjust or modify the amount on a previously Authorized or Captured transaction that has not yet settled includes tip and tax amount.
💡 Also, you should know...
- If the request includes neither a amount nor a tip, the system marks the transaction for settlement with no changes in the amount fields.
- If the request includes a amount but no tip, the system marks the transaction for settlement with total amount as the Amount and the tip as zero.
- If the request includes both a amount and a tip, the system changes the respective amount and marks the transaction for settlement.
- If the transaction is already settled or otherwise not eligible for modification, EdgePay declines the request with the error message Modification not allowed.
🔖 Adjust Sample Payload
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api.edgepay-uat.com/payment',
'headers': {
'Content-Type': 'application/json',
'merchantKey': 'E3DFE3D0150EB516F4E351CE7FE5A2FB799B320BDC5D523B',
'externalReferenceID': '1234561688596045',
'transactionDate': '2023-07-05T21:59:01'
},
body: JSON.stringify({
"adjust": "yes",
"merchantID": "6320340123456900",
"terminalID": "88800000282601",
"transactionID": "CS97032954537318927",
"amount": "1.00",
"tax": "0.01",
"tip": "0.02"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
{
"result": "A",
"responseCode": "A0000",
"responseMessage": "Success",
"merchantID": "6320340123456900",
"terminalID": "88800000282601",
"timestamp": "2023-07-05-14-52-01",
"securityResult": "D",
"securityMessage": "DECLINE",
"authCode": "TAS405",
"processor": "TSYS",
"amount": "1.00",
"tokenID": "5840938697279316",
"transactionID": "CS97032954537318927",
"originalTransactionId": "CS97032954537318927",
"invalidEffectiveDate": false
}
Authentication Header:
- merchantKey = this is the API KEY 🔑 that is associated with your MID provided by GETTRX.
- externalReferenceId = It is a unique record identifier. Combination of 123456 + UNIX timestamp Sample: 1234561687543122
- transacationDate = Set to UTC timezone 🕑
Format: YYYY-MM-DDTHH:MM:SS