You can refund a transaction easily with our APIs. To initiate a refund, send a request to the refund endpoint with the transaction ID in the URL. You can also specify the amount to be refunded in the body if you wish to make a partial refund.
The refund amount will be deducted from your available balance. Additionally, you can attach a note to the refund by specifying comments.
// Install with: npm i flutterwave-node-v3const Flutterwave = require('flutterwave-node-v3');const flw = new Flutterwave(process.env.FLW_PUBLIC_KEY, process.env.FLW_SECRET_KEY);const response = await flw.Transaction.refund({ id: transactionId, amount: amountToRefund, comments: "Product out of stock.",});