Refund
This endpoint is used to process refunds for payments. It allows for both partial and full refunds based on the specified amount. It is important to ensure that the amount provided does not exceed the total amount associated with the given payment_reference.
POST /v1/payment/refunds/process
Headers
secret-key
string
Your Redstone secret key
public-key
String
Your Redstone public key
Request body
amount (number): The amount to be refunded. This value must not be greater than the amount associated with the specified payment reference.
payment_reference (string): The reference of the payment that needs to be refunded. This should match the original payment reference.
reason (string): The reason for the refund.
Request
For example, you can make a post request to the endpoint above and pass in the raw json data below.
{
"amount":0.1,
"payment_reference":"",
"reason":"testing refund reason", //optional
"webhook_url":""
}
Response
{
"status": "success",
"code": 200,
"message": "refund queued successfully",
"data": {
"status": "pending",
"message": "refund queued successfully",
"reference": ""
}
}Last updated