Skip to main content

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

HeaderValueRequiredDescription
Acceptapplication/jsonYesContent type for the response
AuthorizationBearer {access_token}YesBearer token for authentication
Content-Typeapplication/jsonYesRequest body content type
x-api-keystringNoAPI key for additional authentication

Request Body

{
"beneficiaryId": 284,
"purposeId": 3,
"amount": 100,
"walletId": 3,
"clientReference": "Payment-100"
}

Request Fields

FieldTypeRequiredDescription
beneficiaryIdnumberYesID of beneficiary from Get all Beneficiaries API.
purposeIdnumberYesPurpose code ID from Get Purpose Codes API.
amountnumberYesThe amount to transfer.
walletIdnumberYesThe ID of the source wallet from Get all Wallets API.
clientReferencestringNoCustom 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

FieldTypeDescription
successbooleanFlag indicating whether payment creation succeeded.
payment.idnumberUnique payment transaction ID.
payment.referencestringUnique payment reference (e.g. TO-16062022-007).
payment.currencystringPayout currency.
payment.clientReferencestringClient 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 approved before submitting.

Interactive API Explorer