/pay endpoint to settle. Ababil handles signature verification and the on-chain relay only.
You write: Frontend wallet connect, chain switching, EIP-3009 signing logic, and one settlement call.
Ababil handles: Signature verification, USDC balance check, on-chain transferWithAuthorization, and intent status update.
This path is required for AI agents paying programmatically. For browser-based human buyers, the Hosted Gateway is simpler to implement.
Flow
Step 1 — Create Intent
Request Body
Response 201
Step 2a — Sign EIP-3009 (EVM: Base, Ethereum, Arc)
Build and sign aTransferWithAuthorization EIP-712 typed data message with the buyer’s wallet.
Typed Data Structure
Signing Rules
Code Examples
Step 2b — Sign Solana SPL Transfer
Solana uses a two-step process: first fetch an unsigned transaction from Ababil (which requires the buyer’s public key), then sign it with the buyer’s Solana wallet.2b.1 — Build the Unsigned Transaction
200:
2b.2 — Sign with Phantom (browser)
Step 3 — Settle Payment
Submit the signed authorization to Ababil for on-chain settlement.- EVM (Base / Ethereum / Arc)
- Solana Devnet
Response 200
What Ababil Does Server-Side
- Validates the EIP-3009 signature (viem
verifyTypedData) or Solana transaction signatures. - Checks the buyer’s USDC balance is sufficient.
- Confirms the intent is still
pendingand not expired. - Calls
usdc.transferWithAuthorization(from, to, value, validAfter, validBefore, nonce, v, r, s)via relay EOA. - USDC moves directly buyer → merchant. Ababil never holds funds.
- Marks the intent
paidin the database withtx_hash,buyer_address, andpaid_at.