Documentation Index
Fetch the complete documentation index at: https://docs.stablepay.global/llms.txt
Use this file to discover all available pages before exploring further.
Initiate Payout
Triggers the INR bank transfer for a transaction. This endpoint is only needed for pool_settlement transactions — for sell transactions, payout happens automatically.
When to use this
| Transaction Type | Payout | This endpoint |
|---|
sell | Automatic after deposit confirms | Not needed |
pool_settlement | Manual — you decide when | Required (Step 2) |
Pool Settlement Flow
Step 1: POST /v2/transactions { type: "pool_settlement" }
→ Response includes transactionId
→ Status: sweep_processing
→ Wait for webhook: transaction.sweep_confirmed
Step 2: POST /v2/transactions/{transactionId}/payout ← this endpoint
→ Status: payout_processing
→ Wait for webhook: transaction.payout_completed
Can only be called when the transaction status is sweep_confirmed. Returns an error if the sweep is still processing or has failed.
Request
The transactionId from the Step 1 response
curl -X POST https://api.stablepay.global/v2/transactions/{txId}/payout \
-H "Authorization: Bearer YOUR_API_KEY"
Response
{
"success": true,
"data": {
"transactionId": "tx-uuid",
"status": "payout_processing",
"payout": {
"status": "processing",
"amountInr": "8407.75",
"rail": "imps"
}
}
}
Errors
| Code | Description |
|---|
TRANSACTION_NOT_FOUND | Transaction doesn’t exist or doesn’t belong to your account |
SWEEP_NOT_CONFIRMED | Sweep not yet confirmed — wait for the webhook |
PAYOUT_ALREADY_INITIATED | Payout already triggered for this transaction |
PAYOUT_FAILED | Bank transfer failed |