Create Refund
POST {{ BASE_URL }}/v1/corporate/refundBody Parameters
Property
Data Type
Description
Example
Required
import Axios from 'axios';
// set the api url
const API_URL = `${BASE_URL}/v1/corporate/refund`;
// define request data
const data = {
reference: "VPX65f83c03-c11c4e54",
option: "instant",
reason: "Transaction was successful but needs to be refunded",
type: "full",
amount: 0,
bank: {
accountNo: "0252872742",
bankCode: "058"
},
pin: "3662"
}
// make request using axios
Axios({
method: "POST",
url: `${API_URL}`,
headers: {
lg: 'en',
ch: 'web'
Authorization: `Bearer ${API_KEY}`,
'Content-Type': 'application/json',
},
data: data
}).then((resp) => {
console.log(resp)
}).catch((err) => {
console.log(err)
})Last updated