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 create a one-off transaction.

{
    "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