October special: $0.003 per call (normally $0.005) through Oct 31.
/docs/patterns

Patterns: budgets, retries, intents, caching, free tier

Production patterns for agents paying per call: per-run budget caps, safe retries, intent step pricing, caching and reading free-tier billing info.

Per-run budget cap

Count spend client-side: add the amount from each 402 (accepts[0].amount, atomic USDC) before paying and stop when the run budget is reached. Current price: $0.003 USDC per step (3000 atomic units, 6 decimals) during the promotion ending 2026-11-01T05:00:00Z; the regular price is $0.005. Always trust the amount in the live 402.

python
from x402 import max_amount
client.register_policy(max_amount(3000))  # refuse any single payment above this many atomic units

Retries and idempotency

Payment is verified before the upstream call and settled only after it succeeds. A failed upstream call returns 502 (upstream_error) and is not charged, so retrying with backoff is safe. Never re-send a payment for a call that already returned 200; reuse the result.

Intent chaining and step pricing

Intent endpoints (category intents) run several engines server-side and cost per step. Read the exact total from the live 402 (accepts[0].amount, extra.steps, extra.perStep, extra.chain) instead of computing it yourself. If a required step fails, the whole call fails and nothing is settled.

Caching

Cache successful responses per (slug, params) for as long as your task tolerates stale data. A cache hit costs nothing; the marketplace does not deduplicate for you.

Free tier vs paid

Free responses carry X-Free-Calls-Remaining and X-Paid-Price-USDC headers and, for JSON object bodies, a top-level _billing object (free_calls_remaining, price_usdc_per_call, how_to_pay, paid_example_url). When the free tier is used up the 402 body says "Free calls used up" with the price.