New to x402?
Start with the plain-English guide: What is x402?
Flow
- An agent discovers a tool through the catalog, OpenAPI, MCP, or docs.
- The agent calls an
/x402/v1/...alias. - Primitive402 returns
HTTP 402 Payment Requiredwith payment requirements. - An x402-capable client pays with USDC and retries to receive structured JSON.
The current production public beta network is Base mainnet, eip155:8453.
The current production public beta asset is Base mainnet USDC. Paid routes settle through the CDP facilitator.
The x402 payment-required payload includes network, asset, amount, payTo, and resource metadata used by compatible clients.
Plain-English x402 overview: What is x402?. Billing, refund, and support policy: /billing.
Reproduce a paid client call
Use the paid-client guide to reproduce the full sequence against https://primitive402.dev: unpaid request, HTTP 402 Payment Required, Base mainnet USDC payment, retry, and HTTP 200 structured JSON.
Mainnet readiness
Primitive402 now uses Base mainnet USDC in production as a live billing beta. Staging proved Base mainnet x402 through the CDP facilitator earlier; production mainnet billing beta is now enabled after a successful paid production test.
Expected unpaid call
curl -i https://primitive402.dev/x402/v1/extract-subscription-terms \
-H 'content-type: application/json' \
-d '{
"url":"https://stripe.com/legal/subscription-policy"
}'
HTTP 402 Payment Required
Production mainnet payment verification
Primitive402 has completed an end-to-end paid x402 production call on Base mainnet USDC through the CDP facilitator. The verified sequence was: unpaid request, HTTP 402 Payment Required, Base mainnet USDC payment, retry, then HTTP 200 with the same structured JSON response shape as the tool's local route.
Production metrics showed paidX402Calls incrementing after settled paid calls. Earlier staging proof validated the CDP facilitator path; production mainnet billing is now live beta.
Verification metadata: network eip155:8453; asset 0x8335...2913; seller/payTo 0xb7Cc...5669; transaction 0x22c230...cc9c6a.
Show full values
- USDC asset contract
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913- Seller/payTo wallet
0xb7Ccb42c5fC7e915cb32504b2Bde07bEc98c5669- check_prompt_injection_risk transaction
0x22c230...cc9c6a
| Tool | Route | Payment amount | Payment status | Response status | Notes |
|---|---|---|---|---|---|
check_prompt_injection_risk |
/x402/v1/check-prompt-injection-risk |
$0.005 USDC | settlement succeeded | HTTP 200 |
AgentTrust paid tool verified in production; tx 0x22c230...cc9c6a |
Charging policy
HTTP 402 Payment Requiredchallenges are not charged.- Successful paid
2xxtool responses are counted as charged and incrementpaidX402Calls. - Validation errors, unsafe URL blocks, rate limits, server errors, and failed tool executions are not counted as successful paid calls.
- Free-route
429responses incrementrateLimitedCalls, notpaymentRequiredCallsorpaidX402Calls. - Low-confidence
HTTP 200responses may still be charged because they are valid analysis results. - The public beta uses Base mainnet USDC through the CDP facilitator. Payment-provider details may change during beta.
The x402 middleware verifies payment before Primitive402 route handlers run. Request validation, SSRF protection, tool execution, and final response status happen after that middleware. If a paid beta retry settles but the handler later returns a non-2xx response, Primitive402 does not count it in paidX402Calls; this beta does not attempt automatic refunds.
Troubleshooting
- If a free route succeeds but an x402 route returns 402, inspect the payment-required response and retry with a valid payment header.
- If a wallet or facilitator rejects payment, confirm Base mainnet, Base mainnet USDC, amount, and recipient metadata.
- If the response is not JSON, verify
content-type: application/jsonand that the request body matches the tool schema.
Discovery
For external marketplace checks, see Discovery readiness.