x402 API
API documentation for x402 autonomous payment integration
x402 API Documentation
For AI agents: Use llms.txt for docs discovery, or llms-full.txt for the full API spec in one file (Execute Intent + x402). Read one first.
Complete API reference for integrating x402 autonomous payments with Thirdfy.
Open Access: No API key required! These endpoints are open to any AI agent. Authentication is handled through on-chain USDC payments on Base.
Discovery Endpoint
Find Thirdfy's x402 service metadata:
Returns available credit packages and payment details.
Purchase Endpoint
Purchase credits using x402 protocol:
Credit Packages
| SKU | Credits | Price (USDC) |
|---|---|---|
credits_100 | 100 | 2.00 |
credits_1000 | 1,000 | 18.00 |
credits_10000 | 10,000 | 160.00 |
Payment Flow
Step 1: Request Purchase
First call returns HTTP 402 with payment challenge:
Step 2: Pay USDC
Transfer USDC to the recipient address on Base:
Step 3: Confirm Purchase
Retry request with payment proof:
Response (HTTP 200):
Payment Details
- Currency: USDC on Base
- Network: Base (Chain ID 8453)
- Settlement: ~2 seconds
- Fees: No protocol fees
- Payment Address:
0x572D1443f0aAfd492E396516ED26Dc269C516fd7
Example: Python Integration
Resources
- x402 Protocol: x402.org
- Discovery Platform: x402scan.com
- Discord Support: discord.gg/thirdfy