Request headers
PAYMENT-SIGNATURE (aka X-PAYMENT)
Used by paid routes (accessMode: "exact").
- Base64-encoded x402 exact payment payload.
- Must match the
maxAmountRequired,network, andpayTofields from the route’s402 Payment Requiredchallenge envelope. - The gateway accepts either
PAYMENT-SIGNATUREorX-PAYMENT. - Each payment can authorize exactly one call; reusing the same header returns
400.
SIGN-IN-WITH-X
Used by auth-only routes (accessMode: "siwx").
- Base64-encoded SIWX payload.
- Must be signed by a Solana wallet and target one of the
authNetworksfrom the challenge envelope. - Must be used within
expirationSeconds(300s) of being signed. - Each signature can only authorize one request. Replays are rejected.
X-Ryvo-Request-Id
Used by channel-backed routes (accessMode: "ryvo-channel").
- Stable idempotency key for one gateway request.
- Required with
RYVO-COMMITMENT. - The gateway atomically reserves the request ID before upstream execution so concurrent calls on one channel cannot overspend.
RYVO-COMMITMENT
Used by channel-backed routes (accessMode: "ryvo-channel").
- Base64 JSON envelope containing the signed Ryvo cumulative commitment payload.
- Must target the live devnet program, gateway merchant participant, correct cluster, correct message domain, and official devnet USDC token.
- The new cumulative amount must equal the latest accepted commitment plus the route’s
priceTokenAmount.
Content-Type
application/jsonfor any request with a body.- Required for paid Solana routes. Rejected with
415for any other content type on body routes.
Response headers
WWW-Authenticate
Emitted on 402 Payment Required responses. Describes the accepted scheme(s), either exact with a Solana network or sign-in-with-x with one or more networks.
X-PAYMENT-RESPONSE (aka PAYMENT-RESPONSE)
Emitted on successful paid responses (accessMode: "exact"). Contains the Solana settlement transaction hash and payer address. Clients should read this to get a proof of settlement.
Example shape after decoding:
X-PAYMENT-RESPONSE per request. Accepted commitments are settled later through Ryvo Protocol bundle settlement.
access-control-*
Full CORS preflight is supported. See Endpoints for the exact allowlist.
Status codes
| Status | Meaning | Body |
|---|---|---|
200 OK | Successful upstream response. | { ok: true, ..., result: {...} } |
204 No Content | Preflight OPTIONS response. | empty |
400 Bad Request | Input failed validation, reused payment, or invalid provider filter. | { ok: false, error, ... } |
402 Payment Required | x402 exact or SIWX challenge. Retry with the matching header. | { x402Version: 2, accepts: [...] } |
404 Not Found | Unknown route path. | { ok: false, error: "not_found" } |
405 Method Not Allowed | Wrong HTTP method for the route. | { ok: false, error: "method_not_allowed" } |
415 Unsupported Media Type | Non-JSON body on a JSON route. | { ok: false, error: "unsupported_media_type" } |
422 Unprocessable Entity | Payment verification failed after a valid challenge. | { ok: false, error: "payment_verification_failed" } |
429 Too Many Requests | Rate limit hit. | { ok: false, error: "rate_limited", retryAfterMs } |
5xx | Upstream or facilitator failure. No settlement occurs. | { ok: false, error, detail } |
Challenge envelope
402 responses always include a JSON body with a standard x402 envelope:
accepts as a list of possible authorization strategies.
