Delete a Beneficiary
Overview
The Delete a Beneficiary API allows users to remove a previously registered beneficiary from their account.
Users must provide the unique beneficiaryId in the path parameter associated with the beneficiary they wish to delete. Deleting a beneficiary ensures that they no longer have access to incoming payments or transfers.
Irreversible Action
Be cautious when using this API, as deleting a beneficiary cannot be undone.
In-Flight Payments
Make sure that the beneficiary is not included in any payment transaction which is under process before proceeding.
Resource Access
- HTTP Method:
DELETE - Endpoint:
/profile/v2.1/beneficiaries/{beneficiaryId} - Authentication: Bearer token required (
Authorization: Bearer {access_token})
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
beneficiaryId | number | Yes | Unique identifier assigned to the beneficiary to delete. |
Response
Success Response (200 OK)
{
"success": true
}
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | A boolean flag indicating whether the beneficiary deletion was successful (true). |
Error Responses
- 401 Unauthorized: Missing or invalid Bearer token.
- 403 Forbidden: Insufficient privileges to delete recipient records.
- 404 Beneficiary Not Found: No beneficiary exists with the specified ID.
- 500 Internal Server Error: Platform error while removing recipient.
Code Examples
cURL
curl -X DELETE "https://api.ahrvo.network/banking/ibans/v2/profile/v2.1/beneficiaries/284" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Accept: application/json"
Python
import requests
url = "https://api.ahrvo.network/banking/ibans/v2/profile/v2.1/beneficiaries/284"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Accept": "application/json"
}
response = requests.delete(url, headers=headers)
print("Deleted successfully:", response.json().get("success"))
JavaScript / Node.js
const response = await fetch("https://api.ahrvo.network/banking/ibans/v2/profile/v2.1/beneficiaries/284", {
method: "DELETE",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Accept": "application/json"
}
});
const result = await response.json();
console.log("Delete status:", result.success);