This quickstart walks through the two things every x402 gateway integration needs:Documentation Index
Fetch the complete documentation index at: https://docs.ryvo.network/llms.txt
Use this file to discover all available pages before exploring further.
- An unpaid probe to inspect the
402 Payment Requiredchallenge. - A real call that completes the x402 flow, either paying with USDC (
exact) or signing in with a wallet (siwx).
curl to understand the wire format, then switch to @x402/fetch in TypeScript for a real integration.
For Ryvo payment-channel routes under /v1/ryvo-channel/..., use the channel flow in Access modes and Agentic tools.
Prerequisites
- A Solana mainnet wallet with a small USDC balance and a little SOL for fees.
- The wallet must be different from the gateway’s
payTowallet, x402exactSVM will reject a self-transfer. - Node.js 20+ if you use the TypeScript example below.
For every x402 paid route, the advertised price includes the upstream PAYG cost plus a fixed
$0.0006 gateway settlement surcharge (to cover the on-chain settlement transaction fee).1. Confirm the gateway is live
2. Discover routes
3. Inspect a 402 challenge
Hit a paid route with no payment to see the x402 envelope:
402 Payment Required with an accepts[0] entry describing:
scheme: "exact"network: "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"maxAmountRequired: the price in micro-USDCpayTo: the gateway’s settlement walletfacilitator.url: the x402 facilitator endpoint
accepts[0] describes a sign-in-with-x challenge with accepted Solana networks and a 300-second expiry.
4. Make a paid call in TypeScript
Any x402-compatible client works. The example below uses@x402/fetch:
wrapFetchWithPayment transparently handles both flows:
- Paid routes: reads the
402envelope, builds and signs anexactUSDC transfer, retries withPAYMENT-SIGNATURE, and returns the upstream response plus settlement tx inX-PAYMENT-RESPONSE. - Tokens routes: reads the
sign-in-with-xchallenge, signs a SIWX message with your wallet, retries withSIGN-IN-WITH-X, and returns the upstream response.
Next steps
Access modes
Understand when the gateway asks for payment vs. a SIWX signature.
All routes
Browse every Solana RPC, DAS, and Tokens route with pricing and schemas.
Integrate in your app
Patterns for pay-per-call workers, SIWX clients, and agent wallets.
How it works
Inspect the x402 exact and SIWX flows in detail.
