Creating a Refund
This API is for the merchants to initiate charge-back and refunds from a third-party system.
Below is a code example on how to create a new chargeback/refund request. IntaSend will be notified for processing.
Refunds Fields
The following fields must be provided in your request.
Field | Description |
---|---|
invoice | Invoice id of the transaction. This ID is normally returned in the complete card transaction as tracking_id or invoice_id |
amount | Amount to be refunded. Must be equal or less than the billed amount |
reason | Reason for refund (brief/summary) |
reason_details | More details on the reason provided |
Create a Refund Request
from intasend import APIService
token = "YOUR-API-TOKEN"
service = APIService(token="token")
response = service.chargebacks.create(invoice, amount, reason, reason_details)
print(response)
use IntaSend\IntaSendPHP\Chagebacks;
$chagebacks = new Chagebacks();
$hagebacks->init($credentials);
$response = $chagebacks->create(<invoice_id>, <amount>, <reason>);
print_r(response);
const IntaSend = require('intasend-node');
const intasend = new IntaSend(/*...Authenticate*/)
let refunds = intasend.refunds();
refunds
.create({
'invoice': '<invoice_id>',
'amount': '<amount>',
'reason': '<reason>',
'reason_details': '<detailed_reason_description>',
})
.then((resp) => {
console.log(`Refund response: ${resp}`);
})
.catch((err) => {
console.error(`Refund error: ${err}`);
});
Updated about 2 years ago