Payout

This endpoint is used to initiate a payout process. It allows users to specify the amount to be paid out, the country for the transaction, and a narration for reference. Additionally, the momo_phone_number parameter is optional; if it is not provided, the payment will reflect in the merchant's momo account.

POST: pay/payouts/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.

  • countryId (string): A unique identifier for the country where the payout is being processed. This should correspond to a valid country ID.

  • momo_phone_number (string, optional): The mobile money phone number to which the payout will be sent. If this is not provided, the payment will be credited to the merchant's momo account.

  • narration (string: optional): A brief description or note regarding the payout. This helps in identifying the purpose of the transaction.

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":123,
    "countryId": "{{zambia_country_id}}",
    "momo_phone_number": "260********",
    "webhook_url": "https://webhook.site/99a3cf82-d235-00000000000000000000",
    "narration":"testing" //optional
}

Response

{
    "status": "success",
    "code": 200,
    "message": "payout queued successfully",
    "data": {
        "amount": 26,
        "message": "Payout is being processed by the provider",
        "reference": "PY_6c663231b************",
        "status": "processing"
    }
}

Last updated