Create a Payment Request (Legacy)
Overview
This service is used to create a payment withdrawal request from your wallet to a beneficiary account by specifying a walletId, amount, beneficiaryId, and purposeId.
Resource Access
- HTTP Method:
POST - Endpoint:
/profile/v2.1/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": 284,
"purposeId": 3,
"amount": 100,
"walletId": 3,
"clientReference": "Payment-100"
}
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
beneficiaryId | number | Yes | ID of beneficiary from Get all Beneficiaries API. |
purposeId | number | Yes | Purpose code ID from Get Purpose Codes API. |
amount | number | Yes | The amount to transfer. |
walletId | number | Yes | The ID of the source wallet from Get all Wallets API. |
clientReference | string | No | Custom tracking reference. |
Response
Success Response (200 OK)
{
"success": true,
"payment": {
"id": 416,
"userId": 4,
"reference": "TO-16062022-007",
"clientReference": "Payment-100",
"account": {
"id": 284,
"accountNumber": "2000293918130",
"bankName": "PUNJAB NATIONAL BANK",
"currency": "INR",
"status": "approved"
},
"currency": "INR"
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Flag indicating whether payment creation succeeded. |
payment.id | number | Unique payment transaction ID. |
payment.reference | string | Unique payment reference (e.g. TO-16062022-007). |
payment.currency | string | Payout currency. |
payment.clientReference | string | Client reference. |
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.1/request' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"beneficiaryId": 284,
"purposeId": 3,
"amount": 100,
"walletId": 3,
"clientReference": "Payment-100"
}'
Python
import requests
url = "https://gateway.ahrvo.network/banking/ibans/v2/profile/v2.1/request"
headers = {
"Accept": "application/json",
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
payload = {
"beneficiaryId": 284,
"purposeId": 3,
"amount": 100,
"walletId": 3,
"clientReference": "Payment-100"
}
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.1/request';
const headers = {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
};
const data = {
beneficiaryId: 284,
purposeId: 3,
amount: 100,
walletId: 3,
clientReference: 'Payment-100'
};
axios.post(url, data, { headers })
.then(response => console.log(response.data))
.catch(error => console.error(error.response ? error.response.data : error.message));
Usage Notes
- Make sure the source wallet has sufficient available balance.
- Beneficiary must have status
approvedbefore submitting.