Protocols
PAYMENT-SIGNATURE
PAYMENT-SIGNATURE is the x402 version 2 HTTP request header that carries a base64 PaymentPayload. The client sends it when it retries a request that previously returned 402. The matching response headers are PAYMENT-REQUIRED, from the server, and PAYMENT-RESPONSE, after settlement.
Explanation
The HTTP transport spec maps protocol results onto status codes: 402 when payment is required or settlement fails, 400 when the payload is malformed, 200 when the payment is verified and settled and the resource is returned. The body of the response is left to the server. All protocol objects travel in the headers. A client that only reads the JSON body will miss the payment challenge.
L402 does not use this header. It uses WWW-Authenticate and Authorization. Sending a PAYMENT-SIGNATURE header to an L402 server, or an L402 Authorization header to an x402 server, does not satisfy the other protocol. Older x402 deployments used different header names. The version 2 documents cited here specify PAYMENT-REQUIRED, PAYMENT-SIGNATURE, and PAYMENT-RESPONSE.
Live data
Related terms
Sources
- x402 HTTP transport, version 2 — Coinbase x402
- x402 Protocol Specification, version 2 — Coinbase x402
- How x402 works — Coinbase Developer Platform