Preview Payout
Deprecated — Do Not Use
This endpoint is deprecated and will be removed in a future release. It is no longer maintained and may produce unexpected behavior.
Use Payout Intents instead. Payout Intents include built-in preview and confirmation steps.
Preview a payout to see available methods, fees, and estimated delivery time before creating.
POST
https://api.zenpays.com/merchant/api/v1/payouts/previewBearer · API key
Request
Headers
| Header | Description |
|---|---|
Authorization REQUIRED | Bearer {api_key} |
X-Signature REQUIRED | HMAC-SHA256 signature |
X-Timestamp REQUIRED | ISO 8601 timestamp |
X-Secret-Salt REQUIRED | Secret salt for HMAC validation |
Content-Type REQUIRED | application/json |
Body Parameters
| Parameter | Type | Description |
|---|---|---|
amount REQUIRED | number | Payout amount (minimum 1) |
currency OPTIONAL | string | 3-character currency code (default: INR) |
country OPTIONAL | string | 2-character ISO country code |
payoutType OPTIONAL | string | Preferred payout type (IMPS, NEFT, RTGS, UPI) |
Response
Success (200 OK)
{
"success": true,
"data": {
"availableMethods": [
{
"type": "IMPS",
"name": "IMPS",
"fees": 25,
"estimatedTime": "instant",
"minAmount": 1,
"maxAmount": 50000000,
"available": true
},
{
"type": "NEFT",
"name": "NEFT",
"fees": 15,
"estimatedTime": "2-4 hours",
"minAmount": 1,
"maxAmount": 100000000,
"available": true
},
{
"type": "RTGS",
"name": "RTGS",
"fees": 50,
"estimatedTime": "30 minutes",
"minAmount": 200000,
"maxAmount": null,
"available": false,
"reason": "Amount below minimum"
}
],
"recommendedMethod": "IMPS",
"walletBalance": {
"available": 5000000,
"currency": "INR"
}
}
}
Examples
- cURL
- SDK
curl -X POST https://api.zenpays.com/merchant/api/v1/payouts/preview \
-H "Authorization: Bearer zp_test_xxxxx" \
-H "X-Timestamp: 2024-01-15T10:30:00.000Z" \
-H "X-Signature: a1b2c3d4e5f6..." \
-H "X-Secret-Salt: your_secret_salt" \
-H "Content-Type: application/json" \
-d '{
"amount": 10000,
"currency": "INR",
"country": "IN"
}'
const preview = await zenpays.payouts.preview({
amount: 10000,
currency: 'INR',
country: 'IN',
});
console.log(`Recommended: ${preview.recommendedMethod}`);
preview.availableMethods.forEach(m => {
console.log(`${m.name}: Fee ${m.fees}, Time: ${m.estimatedTime}`);
});