Fetch Refund
Get a single product on your Terraswitch account
GET {{ BASE_URL }}/v1/corporate/refund/{code}
Url Parameters
Property
Data Type
Description
Example
Required
code
string
The refund code
"VPF-19a0a4fc"
Yes
import Axios from 'axios';
// set the api url
const API_URL = `${BASE_URL}/v1/corporate/refund/${code}`;
// make request using axios
Axios({
method: "GET",
url: `${API_URL}`,
headers: {
lg: 'en',
ch: 'web'
Authorization: `Bearer ${API_KEY}`,
'Content-Type': 'application/json',
}
}).then((resp) => {
console.log(resp)
}).catch((err) => {
console.log(err)
})
{
"error": false,
"errors": [],
"data": {
"code": "VPF-19a0a4fc",
"amount": 1000,
"option": "instant",
"reason": "Transaction was successful but needs to be refunded",
"status": "successful",
"type": "full",
"paidAt": {
"day": "2024-01-14",
"time": "07:13:00",
"ISO": "2024-01-14T07:13:00.933Z"
},
"bank": {
"accountName": "AGBELEYE OLUWATOBI EMMANUEL",
"accountNo": "0252872742",
"bankCode": "058",
"name": "guaranty"
},
"createdAt": "2024-01-14T07:12:12.721Z",
"updatedAt": "2024-01-14T07:13:00.943Z",
"transaction": {
"reference": "VPX0c94e97c-b5534eaf",
"amount": 1000,
"fee": 100,
"feature": "wallet-transfer",
"createdAt": "2024-01-12T20:23:59.787Z"
}
},
"message": "successful",
"status": 200
}
Last updated