What x402 adds
- payment amount
- network
- asset/token
payTorecipient- resource URL
- retry after payment
- machine-readable payment requirements
x402 basics
x402 is a way for APIs to request payment over HTTP so software can discover a price, pay programmatically, retry the request, and receive structured JSON.
In plain English, x402 turns a paid API call into a clear HTTP flow: request, HTTP 402 Payment Required, pay, retry, structured JSON response.
The first request asks for a paid resource. The API replies with machine-readable payment requirements. An x402-capable client pays, retries with payment information, and then receives the API result.
HTTP 402 means Payment Required. It has historically been reserved and rarely used on the public web. x402 makes 402 practical for programmatic payments by defining how an API can tell a client what payment is needed before the client retries.
x402 is not the only possible use of HTTP 402, but it is a concrete way to use the status code for machine-to-machine and AI-agent payment flows.
payTo recipientPrimitive402 does not own x402 or the x402 protocol. Primitive402 provides paid microtools that agents can call through x402.
Free /v1 routes exist for development. Paid /x402/v1 routes use Base mainnet USDC in the current production mainnet beta. /status.json is the source of truth for live billing mode, network, and payment asset.
HTTP 402 with payment requirements.HTTP 402 Payment Required challenges are not charged.2xx responses are billable.200 responses may still be billable because they are valid structured outputs.No. HTTP 402 is the Payment Required status code. x402 is a payment protocol pattern that uses HTTP 402 to communicate machine-readable payment requirements for programmatic payments.
No. Primitive402 does not own x402. Primitive402 uses x402 to expose paid API microtools for agents.
No. In normal x402 usage, an x402-capable client handles the payment and retry flow programmatically.
Production paid x402 routes use Base mainnet USDC during the current mainnet beta.
No. HTTP 402 Payment Required challenges are not charged.
Yes. Successful paid 200 responses are 2xx responses and are billable.
Yes. Free /v1 routes exist for development and testing. Paid production aliases live under /x402/v1.
The published @primitive402/sdk helps TypeScript apps call Primitive402 tools and work with structured JSON outputs. See /docs/sdk.