Blockchain IQ

Smarter research for the on-chain economy.

← x402 Glossary

Messages & Fields

PaymentRequired

Also: payment required object

The object a resource server returns when payment is needed. It holds x402Version, an optional error message, a resource description, an accepts list of payment options and optional extensions. On HTTP it is carried base64-encoded in the PAYMENT-REQUIRED response header.

Example

{
  "x402Version": 2,
  "error": "PAYMENT-SIGNATURE header is required",
  "resource": { "url": "https://api.example.com/premium-data" },
  "accepts": [ { "scheme": "exact", "network": "eip155:8453", "amount": "10000", "asset": "0x...", "payTo": "0x...", "maxTimeoutSeconds": 60 } ]
}

In the spec x402 v2 specification, §5.1

Related terms

Mentioned alongside

More in Messages & Fields

General education, not investment, legal or tax advice. The protocol is young and changes: check the current x402 specification before you build on a detail.

Get updates from Blockchain IQ.

New research, notable moves, and what we’re watching. No more than a few emails a month, and nothing else — we don’t sell or share your address.

We’ll only use it to send you these updates. Unsubscribe any time; see our privacy policy.