The first public x402 v2 facilitator for Whitechain
whitechain-x402-facilitator is open source, live on Whitechain Sepolia. How it settles, how to use it, what comes next.
Sahil Massey7 min read


On 2026-10-04 an agent holding 0 WBT paid 0.01 ITC to a merchant's API on Whitechain Sepolia. It paid through the official x402 fetch client, the merchant ran the official x402 express middleware, and whitechain-x402-facilitator settled the payment on chain. That was the facilitator's first settlement: 0xc1e9c255….
whitechain-x402-facilitator is the first public x402 v2 facilitator for Whitechain, live on Whitechain Sepolia. It is open source under Apache-2.0, at release v0.1.0. Any x402 server can point at the hosted service, and anyone can run their own copy.
A facilitator verifies and settles the payment
x402 puts payment into HTTP. A server answers an unpaid request with 402 Payment Required and a price. The client signs a payment for that amount and sends the same request again, with a PAYMENT-SIGNATURE header. The server passes the signed payment to a facilitator, which checks it and settles it on chain.
The facilitator is the one piece of infrastructure in that loop. whitechain-x402-facilitator is that piece for Whitechain, WhiteBIT's EVM L2: /verify, /settle and /supported, built on the official @x402/core and @x402/evm packages.
The scope of "first" is deliberate. An earlier x402-style facilitator, AgentPay, ran x402 v1 on Whitechain's legacy L1 testnet. whitechain-x402-facilitator is the first public x402 v2 one: hosted for anyone to use, in the v2 wire format the official SDKs send.
The payer pays the merchant; the facilitator pays the gas

Fig. 1. One x402 payment through whitechain-x402-facilitator on Whitechain Sepolia. Source: the facilitator's README, read 2026-10-19.
- The agent calls the merchant's API, with no account and no API key.
- The merchant answers
402 Payment Required. ItsPAYMENT-REQUIREDheader names the price, the token and the merchant's own address (payTo). - The agent signs an EIP-3009
transferWithAuthorizationfor that amount, off chain. It resends the same request with the signature inPAYMENT-SIGNATURE. - The merchant's x402 middleware calls the facilitator's
/verify, serves the request, then calls/settle. - The facilitator submits the signed authorization to the token and pays the gas in WBT. The answer carries the transaction hash in
PAYMENT-RESPONSE.
The token moves once, from the agent straight to the merchant's payTo. The signature fixes the recipient, the amount, a validity window and a nonce. So the facilitator can submit the payment or refuse it; it cannot send the tokens anywhere else. Its key holds only WBT, for gas. The agent needs ITC and no WBT.
The checks are the official @x402/evm implementation: the EIP-712 signature, the balance, the nonce, and a simulation before anything is broadcast. The facilitator adds policy around them: rate limits, daily gas budgets, a gas cap per settlement and a sanctions denylist.
A merchant changes three settings
Any x402 v2 resource server works. The facilitator speaks the wire format of @x402/core's HTTPFacilitatorClient, so the official @x402/express, @x402/hono and @x402/next middleware use it unmodified. Three settings are Whitechain's own: the facilitator URL, the network eip155:1874, and an explicit token price, because the x402 SDK has no "$" default asset for Whitechain yet.
| Facilitator URL | https://x402-facilitator-production-ff5f.up.railway.app |
| Network | Whitechain Sepolia, eip155:1874 |
| Scheme | exact, EIP-3009 transferWithAuthorization |
| Token | ITC, 0x2E672dFE…7fBB, 6 decimals |
| Cost | No charge on Whitechain Sepolia, within rate limits and a daily gas budget |
An Express merchant charging 0.01 ITC (10 000 µ; a µ is a millionth of an ITC) per request. It reads the token's EIP-712 name and version from the contract:
import express from "express";
import { createPublicClient, http } from "viem";
import { paymentMiddleware, x402ResourceServer } from "@x402/express";
import { HTTPFacilitatorClient } from "@x402/core/server";
import { ExactEvmScheme } from "@x402/evm/exact/server";
const url = "https://x402-facilitator-production-ff5f.up.railway.app";
const server = new x402ResourceServer(new HTTPFacilitatorClient({ url }))
.register("eip155:1874", new ExactEvmScheme());
const asset = "0x2E672dFE33EA977FD064E01aDe7d8c73B3Be7fBB"; // ITC
const rpc = createPublicClient({ transport: http("https://rpc.testnet.whitechain.io") });
const { domain } = await rpc.getEip712Domain({ address: asset }); // the token's EIP-712 name and version
const ITC = { asset, extra: { name: domain.name, version: domain.version } };
const app = express();
app.use(paymentMiddleware({ "GET /weather": { accepts: { scheme: "exact", network: "eip155:1874",
payTo: "0xYourMerchantAddress", price: { ...ITC, amount: "10000" } } } }, server)); // 0.01 ITC
app.get("/weather", (_req, res) => res.json({ city: "Lisbon", temperatureC: 24 }));
app.listen(4021);@x402/hono takes the same routes and x402ResourceServer, and so does @x402/next. In the week of 2026-10-04 the facilitator had 98 tests, including interop runs of the official x402 express, hono and fetch packages against it. The full programs and the HTTP API are in the facilitator's docs.
An agent allows one token
Agents never call the facilitator. They talk to the merchant and sign. The official x402 fetch client pays once ITC is allowed in its spend controls. Recent clients pay only the assets they know, so the agent names the token and caps each payment.
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.AGENT_PRIVATE_KEY as `0x${string}`);
const fetchWithPayment = wrapFetchWithPaymentFromConfig(fetch, {
schemes: [{ network: "eip155:1874", client: new ExactEvmScheme(account) }],
spendControls: { // allow ITC, at most 0.10 ITC per payment
allowedAssets: [{ network: "eip155:1874", asset: "0x2E672dFE33EA977FD064E01aDe7d8c73B3Be7fBB", maxAmountPerPayment: "100000" }],
},
});
const res = await fetchWithPayment("http://localhost:4021/weather"); // 402 -> signed -> 200
console.log(await res.json());The agent's wallet needs ITC and no WBT. A fresh address can claim 1,000 ITC from Inferit's sponsored faucet, at most once per 24 h, without sending a transaction itself:
curl -X POST https://api-production-c74b9.up.railway.app/v1/faucet \
-H 'content-type: application/json' -d '{"address":"0xYourAgentAddress"}'Check it yourself
The live service describes itself at /supported. This was its answer on 2026-10-19:
curl -s https://x402-facilitator-production-ff5f.up.railway.app/supported
# {"kinds":[{"x402Version":2,"scheme":"exact","network":"eip155:1874"}],
# "extensions":["eip2612GasSponsoring"],
# "signers":{"eip155:*":["0xA0AF38939cE09438393Bbc238Ae9f2989e123045"]}}The signer is the facilitator's gas key, 0xA0AF3893…3045. Its first settlement is 0xc1e9c255…, dated 2026-10-04.
- Code: InferitAI/whitechain-x402-facilitator, Apache-2.0.
- Docs: the HTTP API, architecture and operations.
- Live service:
https://x402-facilitator-production-ff5f.up.railway.app, with its status at /health. - Self-host: a Dockerfile and one gas key. Inferit runs the public instance, with rate limits and a daily gas budget.
- Agents paying Inferit: the agents' guide.
Inferit's API keeps its own facilitator
Inferit is a peer-to-peer market for AI inference, and agents pay it per request with x402 on the same network and token. The facilitator came out of that work, and I split it out so any Whitechain merchant and any agent can use it.
Inferit's market API does not route payments through it. Inferit's API runs its own x402 v2 facilitator on Whitechain Sepolia, self-hosted and operated by Inferit. Its payments work differently: they go into MarketEscrow with depositWithAuthorization, credited to the wallet that signed, not to a merchant's address.
The agent side is the same for both: the official x402 fetch client, Whitechain Sepolia and ITC. Inferit runs both facilitators, so neither is an independent facilitator. The open-source one is not an official Whitechain or WhiteBIT service.
What comes next
- x402 in USDC (Portal-bridged USDC.e) on Whitechain mainnet, planned.
- x402's Permit2 transfer method, and with it the
uptoscheme and USDT, planned once the x402 Permit2 proxy contracts are deployed on Whitechain. The facilitator takes EIP-3009 tokens today.
About Inferit
Inferit is a market for LLM inference: each request goes to the cheapest healthy seller and carries its own price. It settles on Whitechain Sepolia, in ITC.