Skip to main content
The Hosted Gateway is the fastest integration path. After creating a payment intent, redirect the buyer to Ababil’s hosted checkout page. Ababil handles the full payment experience — wallet connect (MetaMask, Coinbase Wallet, Phantom), chain selection, EIP-3009 signing, on-chain settlement, and post-payment confirmation. You write: ~10 lines of backend code. Ababil handles: Everything else.
The Hosted Gateway requires a browser wallet. For AI agents paying programmatically, use the Custom Integration path instead.

Flow


Step 1 — Create Intent

Request Body

Response 201

Redirect the buyer to checkout_url. Intents expire after 30 minutes.

Step 2 — Redirect the Buyer

After receiving the checkout_url, redirect the buyer immediately:

Step 3 — Confirm Payment

After the buyer is sent back to your redirect_url, poll the intent status before fulfilling the order.
Always verify via the API. The redirect URL fires on success but can be interrupted (browser close, network drop). Never fulfil an order based on the redirect alone — confirm status: "paid" via GET /api/v1/x402/intents/{id} first.
Poll interval: Every 3–5 seconds. Settlement is typically 1–10 seconds depending on chain. A paid intent response includes: