Make sure you have an account on the Ababilpay Dashboard and a testnet API key before starting.
Before You Begin
- Sign in to the Ababilpay Dashboard
- Go to API Keys and create a new
sk_test_...key - Go to Wallets and add at least one testnet wallet on any supported chain (Base Sepolia, Ethereum Sepolia, Arc Testnet, or Solana Devnet)
Option A — Hosted Checkout (Recommended)
The fastest path. You create an intent on your backend, redirect the buyer to Ababil’s hosted checkout page, and poll for confirmation. No frontend work required.Create a payment intent
Call Response:
POST /api/v1/x402/intents from your backend with the amount and redirect URLs.cURL
Redirect the buyer
Send the buyer to
checkout_url. Ababil handles wallet connect, chain selection, signing, and on-chain settlement.Option B — Custom Integration (Full Control)
Build your own payment UI or pay programmatically from an AI agent. Your frontend (or agent) signs the EIP-3009 authorization and submits it to Ababil for settlement.Create a payment intent
Same endpoint as above — no The response includes
redirect_url needed for custom flows.payment_requirements — one entry per chain your merchant wallet supports.Sign EIP-3009 typed data
Pick the
payment_requirement matching the buyer’s chain and sign a TransferWithAuthorization message.Next Steps
Hosted Gateway
Full walkthrough of Path A with Node.js and Python examples.
Custom Integration
EIP-3009 signing details, wagmi and viem code, Solana flow.
AI Agent Integration
Enable autonomous USDC payments from AI agents using a private key.
Errors & Troubleshooting
Common mistakes, error codes, and how to fix them.