Glossary
What is HTTP 402 Payment Required?
402 Payment Required is an HTTP status code reserved for future use since early HTTP, now given a concrete meaning by machine payment protocols.
402 Payment Required is an HTTP response status code that RFC 9110 lists as 'reserved for future use', meaning HTTP itself defines no standard behaviour for it.
How does it work?
The code was set aside in early HTTP for digital payments that never arrived in a standard form. Because the core specification still leaves it undefined, sites that use it each decide what it means. Newer protocols built for machine payments give it a concrete job: the server answers 402 with machine-readable payment terms, and the client pays and retries. x402 is named after it and uses headers such as PAYMENT-REQUIRED and PAYMENT-SIGNATURE for that exchange. MDN describes 402 as a nonstandard status code created with digital cash and micropayment systems in mind, and notes that no standard use convention exists, so different systems use it in different contexts.
In practice
If an agent receives a 402, read what the server sent with it. Under x402 there will be a PAYMENT-REQUIRED header with options the client can pay; elsewhere it may be a plain message asking you to upgrade a plan. An agent should not try to pay a 402 unless its client supports the scheme offered and its owner's limits allow it. If you run an API and want agents to pay per request, the 402 response is where you state the price; if you only want to tell people to upgrade, a plain 402 or 403 with a message does that, but agents can't act on it automatically.
What it does not mean
- A 402 isn't an error in the agent. It's the server asking to be paid.
- Not every 402 is x402. Without the protocol's headers, it's whatever that site decided it means.
- Paying a 402 doesn't create an account; under x402 it's per request.
Where does Veyra fit?
Veyra doesn't answer 402 challenges itself; it isn't an x402 client. An agent can use Veyra to pay a provider's address in USDC on Base and show the confirmed transaction reference, where the provider accepts that.
Sources
Guides that use this term
- What is the x402 protocol?x402 uses the HTTP 402 status code so a server can ask for payment and an agent can pay in the same request. How it works and what it needs.
- How can an AI agent pay for an API?Prepaid keys, pay-per-call protocols like x402 and MPP, or paying a provider directly from a controlled wallet. Trade-offs, and what to limit in each.
This page explains how agent payments and the related technology work. It is not financial, investment, legal or tax advice. Protocols and provider features change; check the linked official sources before relying on a detail.