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.

Choose Your Flow

StablePay supports two directions:
  • Offramp (Crypto → Fiat) — convert stablecoins to INR
  • Onramp (Fiat → Crypto) — Coming soon
For offramp, there are two options:
OptionHow it worksPayout
SellUser deposits crypto to their wallet addressAutomatic — INR sent after deposit confirms
Pool SettlementMerchant sweeps from a central pool walletManual — you trigger INR payout after sweep confirms
Both options follow the same setup steps.

Steps

1. Create a User

Create a user with their name and phone number. Each user gets unique deposit addresses.

2. Complete KYC

The user must complete identity verification and add a bank account. This is where the INR payout will be sent. See the KYC Flow guide for details.

3. Create a Transaction

Once KYC is verified, create a transaction with type: sell or type: pool_settlement.

4. INR Payout

  • Sell — payout is triggered automatically once the user’s crypto deposit is confirmed on-chain. No additional action needed.
  • Pool Settlement — after the sweep from your pool wallet is confirmed, you call a second endpoint with the transaction ID to trigger the INR payout.

Sell Flow

Create user → Complete KYC → Create transaction (type: sell)
→ User sends crypto → Deposit confirmed → INR sent automatically

Pool Settlement Flow

Create user → Complete KYC → Create transaction (type: pool_settlement)
→ USDT swept from pool → Sweep confirmed → You trigger payout → INR sent
See the Pool Settlement guide for the full integration walkthrough.

Onramp — Coming soon

Convert fiat to stablecoins. Contact us for early access.

Under the Hood

Deposit Detection

Our blockchain listeners monitor deposit addresses across all supported chains:
  • EVM chains — Poll for ERC-20 Transfer events
  • Tron — Monitor TRC-20 transfers via TronGrid API
  • Confirmations — Wait for required block confirmations before processing

Payout Execution

Once a transaction is ready for payout:
  1. Calculate INR amount using live exchange rate
  2. Deduct platform fees
  3. Initiate bank transfer via IMPS, NEFT, or RTGS
  4. Track UTR and update transaction status

Security

  • PII encryption — All personally identifiable information encrypted with AES-256-GCM
  • Webhook signatures — HMAC-SHA256 signed payloads for authenticity verification
  • API authentication — Bearer tokens with environment isolation (sandbox/production)

Timing Expectations

StageTypical Duration
Deposit Detection< 10 seconds
Polygon Confirmation~1 minute
Ethereum Confirmation~3 minutes
Tron Confirmation~1 minute
IMPS Payout< 30 seconds

Next Steps

KYC Flow

Understand verification requirements

Transaction Lifecycle

See all transaction states and transitions

Pool Settlement

Set up centralized liquidity offramp

Webhooks

Configure real-time notifications