Guide · Beginner · 2026
What is an RPC, and why your x402 endpoint needs one
People often mix up three different pieces: the x402 paywall, the facilitator, and the RPC. This guide separates them so you stop pasting Helius (or any RPC) into the wrong field.
RPC in one sentence
An RPC (Remote Procedure Call endpoint) is how software reads and writes the blockchain. Your app asks: “What is this wallet’s balance?” or “Has this transaction landed?” The RPC answers.
It is a blockchain reader/writer, not a payment protocol and not a paywall.
What an RPC is not
- Not the x402 402 response. Returning HTTP 402 with a price is your API middleware.
- Not the facilitator. Facilitators verify and settle payments so you do not reimplement chain ops for every seller.
- Not a wallet. Wallets hold keys. RPCs talk to the network.
Where RPC shows up in x402
- Buyer side: building or confirming a transfer may need chain state (blockhash, balances).
- Seller side: if you verify on-chain yourself (like this site’s donation endpoint), you call
getParsedTransaction(or similar) through an RPC. - Facilitator side: hosted facilitators use their own RPCs behind the scenes so many sellers never configure one.
Public vs dedicated RPC
- Public cluster URLs (for example Solana’s free endpoints) are fine for demos and light traffic. They rate-limit and can flake.
- Dedicated providers (Helius, Triton, QuickNode, and others) give higher limits and reliability for production verification.
If your donation or settlement path fails with “transaction not found” under load, the first thing to check is RPC quality — not your x402 accepts[] shape.
Simple mental model
- x402 = how the web request says “pay, then retry.”
- Facilitator = optional helper that verifies/settles for you.
- RPC = the pipe to the blockchain when someone actually reads or writes chain state.
What to put where
- Env for your server’s own verification:
SOLANA_RPC_URL=https://… - Env for paywall config:
X402_PAY_TO,X402_FACILITATOR_URL, network CAIP-2 id. - Never put a private key in RPC config. RPC URLs are usually public endpoints with API keys for rate limits — still keep keys out of the browser.
Ship x402 is an independent educational project. Not affiliated with the x402 Foundation, Coinbase, or the Solana Foundation. Not financial advice.