Create a Payment Request v2.2 (Legacy)
Overview
This service (v2.2) is used to create a withdrawal payment request specifying a walletId, amount, beneficiaryId, purposeId, and optional supportingDocS3Key for compliance documentation.
Resource Access
- HTTP Method:
POST - Endpoint:
/profile/v2.2/request - 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 |
Content-Type | application/json | Yes | Request body content type |
x-api-key | string | No | API key for additional authentication |
Request Body
{
"beneficiaryId": 3955,
"purposeId": 14,
"amount": 788888,
"walletId": 2561,
"clientReference": "Custom Payment Ref",
"supportingDocS3Key": "documents/invoice-001.pdf"
}
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
beneficiaryId | number | Yes | ID of the approved beneficiary. |
purposeId | number | Yes | ID of the payment purpose code. |
amount | number | Yes | Transfer amount. |
walletId | number | Yes | Source wallet ID. |
clientReference | string | No | Custom tracking reference. |
supportingDocS3Key | string | No | S3 key for uploaded invoice or supporting document. |
Response
Success Response (200 OK)
{
"success": true,
"payment": {
"id": 5424,
"amount": "788888.00",
"reference": "TO-19062024-002",
"currency": "NGN",
"clientReference": "Custom Payment Ref"
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Flag indicating whether payment creation succeeded. |
payment.id | number | Unique transaction ID. |
payment.amount | string | Amount debited. |
payment.reference | string | Transaction reference code. |
payment.currency | string | Payment currency. |
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 POST \
'https://gateway.ahrvo.network/banking/ibans/v2/profile/v2.2/request' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"beneficiaryId": 3955,
"purposeId": 14,
"amount": 788888,
"walletId": 2561,
"clientReference": "Custom Payment Ref",
"supportingDocS3Key": "documents/invoice-001.pdf"
}'
Python
import requests
url = "https://gateway.ahrvo.network/banking/ibans/v2/profile/v2.2/request"
headers = {
"Accept": "application/json",
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
payload = {
"beneficiaryId": 3955,
"purposeId": 14,
"amount": 788888,
"walletId": 2561,
"clientReference": "Custom Payment Ref",
"supportingDocS3Key": "documents/invoice-001.pdf"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
JavaScript (Node.js)
const axios = require('axios');
const url = 'https://gateway.ahrvo.network/banking/ibans/v2/profile/v2.2/request';
const headers = {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
};
const data = {
beneficiaryId: 3955,
purposeId: 14,
amount: 788888,
walletId: 2561,
clientReference: 'Custom Payment Ref',
supportingDocS3Key: 'documents/invoice-001.pdf'
};
axios.post(url, data, { headers })
.then(response => console.log(response.data))
.catch(error => console.error(error.response ? error.response.data : error.message));
Usage Notes
- Use this v2.2 endpoint when payments require invoice verification or compliance documentation attachment.