Skip to main content
AI agents can pay autonomously using EIP-3009 typed data signatures. The agent holds a private key, constructs and signs the TransferWithAuthorization typed data, and calls the settlement endpoint directly. No custodial wallets, no pre-approvals, no subscriptions — the EIP-3009 signature is the authorization.
AI agent payments require the Custom Integration path. The Hosted Gateway requires a browser wallet and is not suitable for agents.

Agent Payment Flow

No human interaction is required at any step.

Minimal Node.js Example (viem)


End-to-End Agent Example


Key Considerations for Agents

Private key security — store the agent’s signing key in an environment variable or secrets manager. Never embed it in code or commit it to version control. Chain selection — query payment_requirements at runtime and select the chain your agent holds USDC on. Do not hardcode chain IDs. Nonce management — generate a fresh crypto.randomBytes(32) for every payment. The EIP-3009 nonce is not a counter; the USDC contract records each nonce permanently to prevent replay attacks. Idempotency — if a settlement call fails with a network error (timeout, 5xx), check the intent status (GET /intents/{id}) before retrying. The intent may have already been marked paid — retrying with the same or a new signature on a paid intent returns ALREADY_PAID. USDC balance — ensure your agent’s wallet holds sufficient testnet USDC before executing payments. Insufficient balance causes SETTLEMENT_FAILED. See the Supported Networks page for testnet USDC contract addresses.