Add Beneficiary
https://sandboxapi.onbrails.com/api/v1/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
Parameter | type | Required |
---|---|---|
currency | string | ✅ |
reference | string | ✅ |
country | string | ✅ |
callbackUrl | string | ✅ |
destination This is the beneficiary details perculiar to the country | string | ✅ |
customerEmail | string |
Request
Beneficiaries/Add Beneficiary [POST]
curl --request POST \
--url https://sandboxapi.onbrails.com/api/v1/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": "string",
"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",
"destination": {
"type": "NUBAN",
"bankCode": "044",
"accountName": "Joe Zen",
"accountNumber": "0691110031"
},
"reference": "hdnkklwbejwj"
}
}