Skip to content

Headers

Header Purpose
PAYMENT-SIGNATURE The signed x402 payment payload (v2). Send it when retrying after a 402.
X-PAYMENT Legacy x402 payment header — still accepted everywhere PAYMENT-SIGNATURE is.
x-superspice-access Your prepaid session token — re-send it on every call that should draw your balance. Also honored as a cookie.
Header When Purpose
payment-required On a 402 The payment terms, base64-encoded JSON — see The 402 response.
PAYMENT-RESPONSE On a paid response Your settlement receipt — includes the on-chain transaction.
x-superspice-access On a funding response Your freshly issued session token (also set as a cookie).
X-Superspice-Balance On prepaid draws Remaining balance in USDC.
X-Superspice-Calls-Remaining On prepaid draws Calls left at the current per-call price.
X-Superspice-Low-Balance Near empty true — top up soon.
X-Superspice-Topup Near empty Pointer for topping up.
Cache-Control Always on paid routes no-store, private — paid responses are yours alone, never cached and re-served.

Origin-side headers (gateway → seller’s API)

Section titled “Origin-side headers (gateway → seller’s API)”
Header Purpose
x-superspice-gateway The seller’s slug — marks the request as Superspice-forwarded, always present.
x-superspice-origin-secret The seller’s configured origin secret, if set — lets the origin reject non-Superspice traffic. See Securing your origin.

Trust note: any x-superspice-* header a buyer sends is stripped before the request reaches the origin, and x-superspice-* headers from the origin’s response are reserved for the gateway — a caller can’t forge them at the seller, and the seller can’t collide with the balance headers.