ESC/

Gateway Escrow

CFO
TELEMETRY STREAMDEMO FIXTURE•
[HMAC✓ 00:20:14]razorpay.payment.captured · ₹59,764.78 · Route Transferred (on_hold: true)
Razorpay Route · T=0 Statutory Escrow

Gateway Escrow Rail

Money is protected before it leaves the merchant's account. Every incoming order is split at T=0, with statutory dues held in escrow until the GSTR-2B resolves on the 14th.

Traditional Payment Gateways:

Disburse 100% of gross settlement directly to seller accounts. Tax compliance (TDS § 194-O, GST) is left as a post-settlement headache that triggers tax notices and cash leakage.

APEX Route Escrow Invariant:

Splits every payment at T=0 directly via Razorpay Route Transfers with `on_hold: true`, holding statutory dues until verified delivery and GSTR-2B matching occurs.

Gross intake₹6.3K6 orders in window
Held in escrow₹921.50Statutory dues on_hold
Orders on hold5Awaiting GSTR-2B
Leakage₹0.00Prevented at gateway
Fallback Mode: Local BigInt Paise-Exact Kernel
Base-10 Integer Math Invariant
Mode:

Sovereign Split Engine · T=0

auto-intercepting live feed
CAPTURED ORDER₹1,180.00Razorpay capturedPrincipal → Merchant₹990.00GST (18%) → Hold₹180.00194-O TDS (1%) → Hold₹10.00
Released to Merchant
₹990.00
Held Escrow (GST + TDS)
₹190.00
Unexplained Delta
₹0.00

Escrow Allocation

on_hold: true
Principal (Merchant)81.7%
GST Escrow (18%)15.3%
TDS Escrow (1%)3.0%
Resolution trigger
GSTR-2B reconciliation on the 14th auto-releases matched escrow; unmatched dues stay locked.
Razorpay Route Transfer & Webhook Proof

Route Escrow (on_hold: true) · Signed Webhook · SQLite Idempotency

Checking…
To enable Live Test Mode: add RAZORPAY_KEY_ID and RAZORPAY_KEY_SECRET to .env, then restart the server. The /api/webhook/test-payload endpoint is only available in sandbox mode.
1. Create Route Escrow Transfer

Calls POST /v1/transfers with on_hold: true. Amount sent as integer paise — no float arithmetic.

₹= 118000 paise
2. Test Signed Webhook (HMAC + Idempotency)

Fetches a correctly-signed fixture from /api/webhook/test-payload, then POSTs it verbatim to /api/webhook/razorpay. The HMAC result is honest — no fabrication.

1. GET /api/webhook/test-payload → signed body + signature
2. POST /api/webhook/razorpay with exact headers
3. Server verifies HMAC, inserts into SQLite, responds

Live Split Ledger

6 records
OrderMerchantGrossPrincipalGST 18%TDS 1%Status
ORD-4471-AXMeridian Retail₹1,180.00₹990.00₹180.00₹10.00held · GSTR-2B · 14th
ORD-4472-KPNova Logistics₹472.00₹396.00₹72.00₹4.00held · GSTR-2B · 14th
ORD-4473-LMAster Foods₹236.00₹198.00₹36.00₹2.00held · GSTR-2B · 14th
ORD-4474-QRVertex Media₹2,950.00₹2,475.00₹450.00₹25.00held · GSTR-2B · 14th
ORD-4475-STMeridian Retail₹590.00₹495.00₹90.00₹5.00released
ORD-4476-UVPallas Traders₹885.00₹742.50₹135.00₹7.50held · GSTR-2B · 14th