Refund
The endpoint /v1/payment/pay/:payment_reference is a POST request that initiates a mobile money payment. The request body should be in raw format and include the following parameters:
POST: pay/refunds/process
Headers
Name
Type
Description
secret-key
string
Your Vesicash secret key
public-key
string
Your Vesicash 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 to refund a successful transaction.
{
"amount":1,
"country_id":"{{ghana_country_id}}",
"transfer_to":"mobile_number",
"momo_phone_number": "{{phone_number}}",
"payment_reference":"{{reference}}",
"webhook_url": "{{webhook_url}}",
"reason":"testing refund reason" //optional
}Response
Last updated