API Reference
Add Beneficiary [POST]

Add Beneficiary

https://sandboxapi.onbrails.com/api/v2/beneficiaries (opens in a new tab)

Creating a beneficiary is essential before initiating payout. To create a beneficiary, fill in the required fields. You can refer to the beneficiary guide for sample code and destination object requirements as peculiar to country.

Body Parameters

ParameterTypeRequired
currencystring✅
countrystring✅
destination
This is the beneficiary details peculiar to the country. View different beneficiaries in documentation e.g. US (opens in a new tab) or SWIFT (USD)
Object✅
referencestring
callbackUrlstring
customerEmailstring✅

Request

Beneficiaries/Add Beneficiary [POST]
curl --request POST \
     --url https://sandboxapi.onbrails.com/api/v2/beneficiaries \
     --header 'Authorization: Bearer YOUR_SECRET_KEY' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{
        "currency": "string",
        "reference": "string",
        "country": "string",
        "callbackUrl": "string", 
        "destination": "<Destination Object>",
        "customerEmail": "string"
      }'

Responses

🟢 200 - Result example
{
"status": true,
"message": "Beneficiary successfully added",
"data": {
  "id": "42aa6d30-b54c-4e84-822a-c74d9aa53c04",
  "createdAt": "2023-08-21T10:40:55.531Z",
  "updatedAt": "2023-08-21T10:40:55.531Z",
  "currency": "NGN",
  "country": "NG",
  "status": "SUCCESS",
  "provider": "provider_name",
  "destination": {
      "type": "BANK",
      "bankCode": "110072",
      "bankName": "78 FINANCE COMPANY LIMITED",
      "accountName": "Joe Zen",
      "accountNumber": "0691110031"
  },
  "reference": "hdnkklwbejwj"
}
}