Crypto Checkout Flow
This document describes the lifecycle and user flow of the Rach Finance Crypto Payment Gateway.
1. Merchant Creates Checkout
The merchant's server calls the POST /checkout/create endpoint with the order details (amount, currency, reference).
- The system generates a unique Deposit Address (for crypto) or provides bank details (for fiat).
- A
session_idis returned.
2. User Makes Payment
The user is presented with the payment instructions (QR Code + Address).
- The user sends the exact cryptocurrency amount to the generated address.
- Supported Networks: BSC, ETH, Polygon, Tron, Solana.
3. Monitoring & Detection
Rach Finance's Payment Monitor Service continuously watches the blockchain for incoming transactions to the generated address.
- Detection: Once a transaction is seen in the mempool or block.
- Confirmation: The system waits for the required number of block confirmations (e.g., 12 for BSC, 3 for BTC).
4. Payment Confirmation
Once confirmed:
- The Checkout Session status changes from
pending->paid. - The merchant's ledger balance is credited immediately (net of fees).
- An email receipt is sent to the customer.
- An email notification is sent to the merchant.
5. Webhook Notification
If a callback_url was provided, the system sends a webhook POST request to the merchant's server.
json
{
"event": "payment.confirmed",
"data": { "reference": "...", "status": "paid", "tx_hash": "..." }
}6. Settlement
The funds collected are swept from the temporary deposit address to the merchant's main Hot Wallet or Treasury Wallet periodically by the Sweep Service.
