Quickstart
Accept your first x402 payment through Solvador in five minutes.
This guide takes an Express server from zero to charging for a route with x402, using Solvador as the facilitator.
Set up with AI
In a hurry? Paste this one-liner into your coding agent — Claude Code, Cursor, or any assistant that can fetch URLs and edit your project — and it will do the whole integration for you. The manual steps below are the same flow.
Read https://docs.solvador.com/setup-prompt.md and integrate Solvador into my project by following it.The prompt itself is human-readable — it walks the agent through the docs at llms-full.txt, asks before writing code, and leaves dashboard steps and secrets to you. If your assistant cannot fetch URLs, open the prompt and paste its contents instead.
1. Create an API key
Sign in at dashboard.solvador.com with Google or GitHub, open the API Keys tab, and create a key.
The key is shown in plaintext exactly once, at creation. Store it immediately — for example as a SOLVADOR_KEY environment variable. If you lose it, delete the key and create a new one.
Both /verify and /settle require the key. /supported and the discovery endpoints are open, so capability discovery works without an account.
2. Install the x402 SDK
npm install @x402/core @x402/express3. Point your resource server at Solvador
Create an HTTPFacilitatorClient for https://api.solvador.com and inject your API key with the createAuthHeaders hook:
import express from "express";
import { paymentMiddleware } from "@x402/express";
import { HTTPFacilitatorClient, x402ResourceServer } from "@x402/core/server";
const app = express();
const auth = { "X-API-Key": process.env.SOLVADOR_KEY! };
const facilitator = new HTTPFacilitatorClient({
url: "https://api.solvador.com",
createAuthHeaders: async () => ({
verify: auth,
settle: auth,
supported: {},
}),
});
const routes = {
"GET /premium": {
accepts: {
scheme: "exact",
network: "eip155:8453", // Base
price: "$0.01",
payTo: "0xYourReceivingAddress",
},
},
};
app.use(paymentMiddleware(routes, new x402ResourceServer(facilitator)));
app.get("/premium", (_req, res) => {
res.json({ data: "the content your clients pay for" });
});
app.listen(3000);That’s the whole integration: the middleware answers unpaid requests with 402 Payment Required, verifies incoming payment payloads through Solvador, and settles them on-chain after serving the response.
4. Test it
Request the protected route without a payment:
curl -i http://localhost:3000/premiumYou get a 402 response whose body lists the payment requirements (scheme, network, asset, amount, and recipient). Any x402-compatible client or wallet can read those requirements, sign a payment payload, and retry the request — the middleware and Solvador handle the rest.
5. Go live
- The Free plan includes 10 settlements per month with no card required — enough to verify your integration end to end. See Plans & Quotas for paid tiers and pay-as-you-go.
- Pick the networks you want to accept from the supported networks list; adding one is a single entry in your route’s
accepts. - Watch settlements arrive in real time on the dashboard.