7. Generate payout request
POSThttps://api.royalpe.site/payout/merchant/api/generate-payout
Create one merchant payout request.
Required headers #
accessKey: YOUR_ACCESS_KEY
secretKey: YOUR_SECRET_KEY
Content-Type: application/json
Origin: https://merchant.example.comThe authorised merchant Origin is mandatory for this endpoint, and the request must come from a whitelisted server IP. Both are set by Royal Pay for your account: see 2. Authentication and setup.
Request body #
{
"amount": 1500,
"accountNumber": "123456789012",
"accountHolderName": "Ravi Kumar",
"ifscCode": "SBIN0001234",
"orderId": "ORD-10001",
"remarks": "Vendor settlement",
"callbackUrl": "https://merchant.example.com/payout-webhook"
}| Field | Type | Required | Validation / description |
|---|---|---|---|
amount | number | Yes | Rupees, minimum 1000, at most 2 decimals |
accountNumber | string or number | Yes | 9–18 digits. Send a string to keep leading zeroes. |
accountHolderName | string | Yes | 2–100 characters; letters, spaces and dots |
ifscCode | string | Yes | Valid 11-character IFSC |
orderId | string | Yes | Merchant order/reference ID. Same orderId and same details return the same payout; different details answer 409. |
remarks | string | No | Maximum 200 characters |
callbackUrl | string | No | HTTPS payout webhook URL. See 9. Payout webhook. |
cURL example #
Use your authorised merchant Origin and your credentials.
curl --request POST 'https://api.royalpe.site/payout/merchant/api/generate-payout' \
--header 'Content-Type: application/json' \
--header 'accessKey: YOUR_ACCESS_KEY' \
--header 'secretKey: YOUR_SECRET_KEY' \
--header 'Origin: https://merchant.example.com' \
--data-raw '{
"amount": 1500,
"accountNumber": "123456789012",
"accountHolderName": "Ravi Kumar",
"ifscCode": "SBIN0001234",
"orderId": "ORD-10001",
"remarks": "Vendor settlement",
"callbackUrl": "https://merchant.example.com/payout-webhook"
}'Success response (HTTP 201) #
{
"status": true,
"message": "Payout request generated successfully",
"data": {
"orderId": "ORD-10001",
"transactionId": "PO-1a2b3c4d5e6f7a8b",
"amount": 1500,
"status": "processing"
}
}The amount is reserved from your available balance at once. Royal Pay's team makes the bank transfer and records the outcome: you get it by webhook and from 8. Track payout status.
Common errors #
{ "status": false, "message": "Insufficient balance for this payout" }| HTTP code | Message / condition |
|---|---|
| 400 | Missing or invalid origin header. |
| 400 | orderId is required |
| 400 | Insufficient balance for this payout |
| 400 | No payout approver assigned to this merchant |
| 400 | Minimum payout amount is 1000, Invalid amount, Invalid beneficiary details, Invalid remarks, A valid HTTPS URL is required |
| 401 | Access key and secret key are required |
| 401 | Invalid access key or secret key |
| 403 | Access from IP <ip> is not allowed. |
| 403 | Access from Origin <hostname> (<ip>) is not allowed. |
| 409 | Order ID already used with different details |
| 500 | Something went wrong |