β‘Refund Sale
This endpoint enables you to refund a sale record based on a sale id.
Endpoint
PUT
https://api.keepup.store/v2.0/sales/refund/{sale_id}
Headers
Authorization: Bearer API_KEY
Body Parameters
alert_customer
string
optional
Whether to alert the customer (yes
, no
).
Sample Requests
const axios = require('axios');
const data = JSON.stringify({
"alert_customer": "yes",
});
const config = {
method: 'post',
url: 'https://api.keepup.store/v2.0/sales/refund/{sale_id}',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer {access_token}'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.error(error);
});
Sample Response
{
"status": 200,
"message": "sale refunded",
"data": {
"status": "refunded"
}
}
Last updated