Loading...
Saves a validated bank account as a beneficiary for the authenticated user. This endpoint stores recipient details for future transfers, preventing the need for repeated account validation. Required Fields: accountName: Name of the account holder accountNumber: Account number of the beneficiary bankCode: Code of the beneficiary's bank nameEnquiryReference: Reference from account validation nickname (optional): Custom name for the beneficiary
KEY | VALUE | DESCRIPTION |
---|---|---|
X-API-Key | X-API-Key | - |
X-API-Secret | X-API-Secret | - |
// Using fetch API
const response = await fetch("http://localhost:5000/api/v1/developer/beneficiaries/save", {
method: "POST",
headers: {
"X-API-Key": "X-API-Key",
"X-API-Secret": "X-API-Secret"
},
body: JSON.stringify({
"accountName": null,
"accountNumber": null,
"bankCode": null,
"nameEnquiryReference": null,
"nickname": null
})
});
const data = await response.json();
console.log(data);
Parameter | Type | Required | Description |
---|---|---|---|
accountName | No | ||
accountNumber | No | ||
bankCode | No | ||
nameEnquiryReference | No | ||
nickname | No |
{
"accountName": null
"accountNumber": null
"bankCode": null
"nameEnquiryReference": null
"nickname": null
}
Success response
{
"statusCode": 201
"message": "Beneficiary saved successfully"
"data" {
"_id": "65f8a123b42c87e1234a9876"
"userId": "65f8a123b42c87e1234a5432"
"accountName": "John Doe"
"accountNumber": "0123456789"
"bankCode": "044"
"bankName": "Access Bank"
"nameEnquiryReference": "NEQ123456789"
"nickname": "John's Account"
"isFavorite": false
"createdAt": "2024-03-18T14:23:45.000Z"
"updatedAt": "2024-03-18T14:23:45.000Z"
}
}