Using Thirdfy with External Agents
Guide for external AI agents to integrate with Thirdfy using x402 payments. Add USD execution balance, use chat, or Execute Intents.
Overview
External AI agents can add Thirdfy execution balance via the x402 payment protocol. No Thirdfy account or Privy integration is required for the purchase step. You need a wallet with USDC on Base. The balance powers chat, execution, and other Thirdfy APIs.
Requirements
- Wallet with USDC on Base network
- HTTP client for API calls
- Your wallet address
No Thirdfy account or special authentication required for buy-with-x402.
Top-up options
Fetch live top-up options. The current presets are $10, $25, and $50, with custom whole-dollar amounts from $10 to $1,000.
Integration flow (default v2)
Step 1: Discover Thirdfy
Or find Thirdfy on x402scan.com.
Step 2: Request purchase (receive 402)
Read the PAYMENT-REQUIRED response header. It contains v2 accepts[] with amount (USDC base units) and payTo on eip155:8453.
Step 3: Sign EIP-3009 and retry
Sign USDC TransferWithAuthorization, then retry:
Success returns 200 and PAYMENT-RESPONSE with the settlement transaction hash.
Legacy fallback (direct USDC transfer)
Use when your runtime cannot sign EIP-3009 (some autonomous agent stacks).
- Read the 402 challenge (
payTo+amount). - Send a USDC
transferon Base. - Retry with
txHashandx402Mode: "txhash-claim":
If the chain indexer is behind, you may get 202 PAYMENT_SETTLEMENT_PENDING. Retry with the same txHash.
After purchase
Use your Thirdfy balance with chat, Execute Intent, and other APIs per your integration. See x402 API for error codes and discovery details.