Skip to main content

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.

Pool settlement lets you maintain a single pool wallet loaded with USDT, and trigger INR payouts to any of your verified users. Instead of managing individual user wallets, you fund one central pool and offramp from it.

When to Use Pool Settlement

  • You want to manage liquidity centrally (one wallet instead of many)
  • You pre-fund a pool with USDT and offramp on demand
  • You want to control exactly when INR payouts happen

Setup

Pool settlement requires a linked pool wallet on your account. Contact support to:
  1. Set up your pool wallet
  2. Get deposit addresses for each supported chain (Tron, Polygon, Ethereum)
  3. Enable pool settlement on your account
Once enabled, you’ll see your deposit addresses in the Client Portal under Pool Wallet.

How It Works

  1. Load your pool — Send USDT to your pool wallet deposit address on any supported chain
  2. Create transactionPOST /v2/transactions with type: pool_settlement. We check your balance and sweep USDT for settlement. You get a locked exchange rate.
  3. Sweep confirms — You receive a transaction.sweep_confirmed webhook once the sweep is confirmed on-chain.
  4. Trigger payout — Call POST /v2/transactions/:id/payout to initiate the INR transfer.
  5. Payout complete — INR delivered to beneficiary’s bank account. You receive transaction.payout_completed webhook with UTR.

Prerequisites

Before triggering a pool settlement, ensure:
  • Pool wallet is funded with enough USDT on the chain you’ll sweep from
  • User exists and belongs to your account
  • User KYC is verified (status: verified)
  • User has a verified bank account linked

Example

Step 1: Create pool settlement
curl -X POST https://api.stablepay.global/v2/transactions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: unique-key-123" \
  -d '{
    "type": "pool_settlement",
    "userId": "usr_abc123",
    "amount": "100",
    "asset": "USDT",
    "network": "tron"
  }'
Response includes transactionId — save it for Step 2. Step 2: Wait for sweep confirmation You’ll receive a webhook:
{ "event": "transaction.sweep_confirmed", "data": { "transactionId": "tx-uuid" } }
Step 3: Trigger INR payout
curl -X POST https://api.stablepay.global/v2/transactions/tx-uuid/payout \
  -H "Authorization: Bearer YOUR_API_KEY"
Step 4: Payout completes You’ll receive a webhook:
{ "event": "transaction.payout_completed", "data": { "transactionId": "tx-uuid", "utr": "..." } }

Sell vs Pool Settlement

FeatureSellPool Settlement
Type parametersellpool_settlement
FundingPer-user depositCentral pool wallet
Deposit addressesOne per userOne per partner (shared)
Payout timingAfter deposit confirmsAfter sweep confirms
User walletsRequiredNot required
Rate lockAt transaction creationAt transaction creation
Best forStandard offrampCentralized liquidity

Supported Chains

ChainAssetDeposit Address Format
TronUSDT (TRC-20)T...
PolygonUSDT/USDC (ERC-20)0x...
EthereumUSDT/USDC (ERC-20)0x...
ArbitrumUSDT/USDC (ERC-20)0x...
BaseUSDC (ERC-20)0x...

FAQ

How long does the sweep take? Typically 1-5 minutes. What if the sweep fails? Your funds stay in the pool wallet. You’ll receive a transaction.sweep_failed webhook. Create a new pool settlement transaction to retry. Can I cancel a pool settlement after the sweep? No. Once the sweep is initiated, the USDT is in transit for settlement. You can choose not to call the payout endpoint, but the sweep cannot be reversed. Is the exchange rate guaranteed? Yes. The rate is locked when you create the pool settlement transaction and does not change, regardless of how long the sweep takes.