Skip to main content
POST
/
v2
/
transactions
/
{txId}
/
payout
Initiate Payout
curl --request POST \
  --url https://api.stablepay.global/v2/transactions/{txId}/payout \
  --header 'Authorization: Bearer <token>'

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 TypePayoutThis endpoint
sellAutomatic after deposit confirmsNot needed
pool_settlementManual — you decide whenRequired (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

txId
string
required
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

CodeDescription
TRANSACTION_NOT_FOUNDTransaction doesn’t exist or doesn’t belong to your account
SWEEP_NOT_CONFIRMEDSweep not yet confirmed — wait for the webhook
PAYOUT_ALREADY_INITIATEDPayout already triggered for this transaction
PAYOUT_FAILEDBank transfer failed