Delete a Beneficiary (Legacy)
Overview
The Delete a Beneficiary API removes a previously registered beneficiary from your account. Once deleted, the beneficiary cannot receive incoming payments or transfers.
Resource Access
- HTTP Method:
DELETE - Endpoint:
/profile/v2.1/beneficiaries/{beneficiaryId} - Authentication: Bearer token required
Request Headers
| Header | Value | Required | Description |
|---|---|---|---|
Accept | application/json | Yes | Content type for the response |
Authorization | Bearer {access_token} | Yes | Bearer token for authentication |
x-api-key | string | No | API key for additional authentication |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
beneficiaryId | number | Yes | The unique ID of the beneficiary to delete (e.g. 284). |
Response
Success Response (200 OK)
{
"success": true
}
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Boolean flag indicating whether the beneficiary deletion was successful. |
Error Responses
- 400 Bad Request: Invalid parameters or malformed request
- 401 Unauthorized: Missing or invalid Bearer authentication token
- 403 Forbidden: Insufficient account permissions
- 404 Not Found: Resource not found
- 500 Internal Server Error: An internal server error occurred
Code Examples
Base URL
Production: https://api.ahrvo.network
Staging: https://gateway.ahrvo.network
cURL
curl -X DELETE \
'https://gateway.ahrvo.network/banking/ibans/v2/profile/v2.1/beneficiaries/284' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Python
import requests
url = "https://gateway.ahrvo.network/banking/ibans/v2/profile/v2.1/beneficiaries/284"
headers = {
"Accept": "application/json",
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
response = requests.delete(url, headers=headers)
print(response.json())
JavaScript (Node.js)
const axios = require('axios');
const beneficiaryId = 284;
const url = `https://gateway.ahrvo.network/banking/ibans/v2/profile/v2.1/beneficiaries/${beneficiaryId}`;
const headers = {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
};
axios.delete(url, { headers })
.then(response => console.log(response.data))
.catch(error => console.error(error.response ? error.response.data : error.message));
Usage Notes
- Be cautious when using this API; deleting a beneficiary cannot be undone.
- Ensure that the beneficiary is not part of any in-flight payment transaction before deleting.