Solvador

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.

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.

Only /settle requires a key. /verify and /supported are open, so you can test verification before creating an account.

2. Install the x402 SDK

npm install @x402/core @x402/express

3. Point your resource server at Solvador

Create an HTTPFacilitatorClient for https://api.solvador.com and inject your API key with the createAuthHeaders hook:

server.ts
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/premium

You 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.

What next?