Accept x402 payments on Starknet with Solvador
If you want to accept x402 payments on Starknet, you need a facilitator to verify and settle them. Solvador is that facilitator.
You point your x402 middleware at Solvador, keep pricing in plain USD, and we handle verification and on chain settlement on Starknet. The same integration also covers every other network we support, so you write it once and reuse it everywhere.
The exact scheme on Starknet
Solvador supports the x402 exact scheme on Starknet:
- exact. Charge a precise, fixed amount per request. Ideal for flat priced endpoints, one off unlocks, and simple pay per call APIs.
The upto and batch-settlement schemes rely on EVM primitives such as Permit2, so they run on Solvador’s EVM networks. On Starknet you use exact, and the rest of the integration is identical to every other network Solvador supports.
Payments on Starknet are fully sponsored. The payer signs a SNIP-9 outside execution message that authorizes exactly one USDC transfer from their own account, and Solvador’s executor submits it on chain and pays the gas. No token approvals, no gas token in the payer’s wallet, and replay protection is enforced on chain by single use SNIP-9 nonces.
One integration, every network
The real cost of going multichain is not the payment, it is the infrastructure behind it. Solvador collapses that:
- Integrate once and cover Starknet plus 14 other networks through the same facilitator.
- No per network facilitator to run, monitor, or maintain.
- Adding Starknet to an app that already uses Solvador is a config value, not a rewrite.
- Identical developer experience across every supported network, so your team learns it once.
You price in USD, your users pay in stablecoins, and Solvador settles on Starknet.
From zero to first payment in under 3 minutes
Frictionless onboarding is the point. Here is the whole path from nothing to a live 402 payment on Starknet.
1. Grab your Solvador API key.
Create a key in your Solvador dashboard and keep it in an environment variable. You will pass it to the facilitator on every verify and settle call.
export SOLVADOR_API_KEY="your_api_key"
2. Add the x402 middleware to your server.
npm install @x402/express @x402/core @x402/starknet
3. Point it at Solvador and pick Starknet.
import express from "express";
import { paymentMiddleware, x402ResourceServer } from "@x402/express";
import { HTTPFacilitatorClient } from "@x402/core/server";
import { ExactStarknetScheme } from "@x402/starknet/exact/server";
const app = express();
const facilitator = new HTTPFacilitatorClient({
url: "https://api.solvador.com",
createAuthHeaders: async () => {
const auth = { "X-API-Key": process.env.SOLVADOR_API_KEY };
return { verify: auth, settle: auth, supported: {} }; // /supported is public
},
});
app.use(
paymentMiddleware(
{
"GET /api/premium": {
accepts: [
{
scheme: "exact",
price: "$0.05",
network: "starknet:SN_MAIN", // Starknet
payTo: "0xYourStarknetAddress", // Starknet account address
},
],
},
},
new x402ResourceServer(facilitator)
.register("starknet:SN_MAIN", new ExactStarknetScheme())
)
);
app.get("/api/premium", (req, res) => {
res.json({ data: "paid content on Starknet" });
});
app.listen(3000);
4. Make a paid request from any x402 client.
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactStarknetScheme } from "@x402/starknet/exact/client";
import { toClientStarknetSigner } from "@x402/starknet";
// account is a starknet.js Account (Ready, Braavos, or OpenZeppelin)
const client = new x402Client();
client.register("starknet:SN_MAIN", new ExactStarknetScheme(toClientStarknetSigner(account)));
const fetchWithPay = wrapFetchWithPayment(fetch, client);
const res = await fetchWithPay("http://localhost:3000/api/premium");
That is it. Your endpoint now returns 402 Payment Required, the client pays in stablecoins, Solvador verifies and settles on Starknet, and your content is served. No per network glue code, no facilitator to operate.
Why Starknet
Starknet is an Ethereum Layer 2 secured by STARK validity proofs, with native account abstraction at the protocol level: every account is a smart contract, so multisig, hardware backed keys, and session keys are first class citizens rather than add-ons. That design is exactly why gasless x402 payments work so cleanly here. The payer just signs a typed data message, their account contract enforces the authorization on chain, and Solvador sponsors the execution. Fees are low, finality is fast, and the developer ecosystem around Cairo and account abstraction keeps growing.
Whatever brought you to Starknet, Solvador makes it a payment ready network from day one, with the exact same developer experience you get everywhere else we support.
FAQ
Which x402 schemes does Solvador support on Starknet? Solvador supports the exact scheme on Starknet. The upto and batch-settlement schemes rely on EVM primitives such as Permit2, so they are available on the EVM networks Solvador supports.
Do payers need ETH or STRK for gas? No. Starknet payments are sponsored: Solvador’s executor submits the transaction and pays the gas. The payer only signs a message and needs nothing but the stablecoin being spent.
How long does integration take? Most developers go from install to their first live payment in under 3 minutes. It is a middleware install plus one config value.
What tokens can I accept on Starknet? Native USDC on Starknet. Confirm the current asset list for Starknet in the Solvador docs before launch.
Can I use the same code on other networks? Yes. Switching networks is a config change. The same Solvador integration covers every supported network.
Start building on Starknet
Ship your first x402 payment on Starknet today. Read the docs and grab your facilitator endpoint at solvador.com.