Skip to main content

x402 (pay-per-request)

x402 is a simple pattern: an API can return HTTP 402 with payment requirements.

Flow

  1. Client calls a service
  2. Service returns 200 (paid) or 402 (payment required)
  3. Client pays (Permit2)
  4. Client retries with receipt

What you get

  • Pricing becomes part of the protocol
  • Easy per-call billing and rate limits
  • Clean separation: “upstream logic” vs “payment + policy”

Integration guidance

  • Keep the paid surface stable (service ID/slug)
  • Put strict limits in place (per user/day, per key, etc.)
  • Log transactions for auditability