Skip to main content

x402 settlement without running a relay.

Use the public x402 facilitator to settle USDC on HyperEVM and Base without running your own relay.

Loading facilitator status

Live networks

See the exact network, scheme, USDC contract, and explorer before you point a server at the facilitator.

Loading supported networks

What this removes

Use the public facilitator when you want settlement without another relay, another fee layer, or an account gate.

Costs

No facilitator fee

The payer signs the USDC authorization, and the facilitator covers gas.

Infra

No extra relay to run

Point the server at the public exact EVM facilitator instead of running your own settlement service.

Access

No account gate

Anyone can inspect the public endpoints and point a server at them.

Endpoints in order

Check support first, use /verify before settlement, call /settle last, and keep /health for a quick service check.

Set up the server and client

Register the public facilitator on the server, then give the client a signer so paid requests can settle cleanly.

  1. 1

    Pick the network and pay-to address

    Start with the exact chain and recipient so the server and client stay aligned.

  2. 2

    Register the facilitator on the server

    Tell the resource server which network to accept and which public facilitator to call.

  3. 3

    Give the client a signer

    Once the client can sign exact EVM payments, paid retries can settle automatically.

Register the facilitator on the server

Point the resource server at the public facilitator and choose the exact network it should accept.

import express from "express";
import { paymentMiddleware, x402ResourceServer } from "@x402/express";
import { ExactEvmScheme } from "@x402/evm/exact/server";
import { HTTPFacilitatorClient } from "@x402/core/server";

const app = express();

const facilitatorClient = new HTTPFacilitatorClient({
  url: "https://facilitator.0xarchive.io",
});

const payTo = "0xYourHyperEvmAddress";

app.use(
  paymentMiddleware(
    {
      "GET /data": {
        accepts: [{
          scheme: "exact",
          price: "$0.001",
          network: "eip155:999",
          payTo,
        }],
        description: "Market data endpoint",
        mimeType: "application/json",
      },
    },
    new x402ResourceServer(facilitatorClient)
      .register("eip155:999", new ExactEvmScheme()),
  ),
);

app.listen(4021);

Give the client a signer

Once the client can sign exact EVM payments, paid retries can settle without another service in the middle.

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const signer = privateKeyToAccount(
  process.env.EVM_PRIVATE_KEY as `0x${string}`,
);

const client = new x402Client();
client.register("eip155:*", new ExactEvmScheme(signer));

const fetchWithPayment = wrapFetchWithPayment(fetch, client);
// Use /data on your own resource server.
const response = await fetchWithPayment(
  "https://your-resource.example/data",
);

FAQ

The facilitator verifies exact EVM payment data and settles an authorized payment for an x402 resource server. Your server defines the paid resource and accepted payment terms; the client signs the authorization. It is a payment service, not a market-data endpoint.