NEW — Facilitator-as-a-Service

Accept x402 Payments
Without Infrastructure

Use Arch Tools as your x402 facilitator. We verify payments, settle on-chain, and handle gas — so you can focus on building your API.

What is a Facilitator?

In the x402 protocol, a facilitator is a service that verifies and settles crypto payments on behalf of API servers. Instead of running your own blockchain nodes and implementing payment verification, you delegate that to us.

🔍 Verify Payments

We validate signatures, check balances, prevent replay attacks, and confirm the payment meets your requirements.

⛓️ Settle On-Chain

We submit the payment transaction to the blockchain, pay gas fees, and wait for confirmation. You get the funds.

⛽ Gas Sponsorship

Neither you nor your customers need to hold native tokens. We handle gas costs, included in our fee.

📊 Provider Dashboard

Track your payments, revenue, top endpoints, and fees in real-time through our API.

How It Works

1
Client requests your API endpoint
2
Your server returns HTTP 402 with payment requirements
3
Client signs a USDC payment and retries with X-Payment header
4
Your server sends the payment to POST archtools.dev/api/v1/facilitator/verify
5
Arch Tools verifies the signature, checks balance, prevents replay
6
Your server fulfills the request, then calls POST /api/v1/facilitator/settle
7
Arch Tools submits the tx on-chain, pays gas, USDC goes to your wallet

Quickstart

1. Register as a Provider

curl -X POST https://archtools.dev/api/v1/facilitator/register \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My API",
    "email": "[email protected]",
    "walletAddress": "0xYourWalletAddress",
    "networks": ["eip155:8453"]
  }'

Save the apiKey from the response — it's only shown once.

2. Verify Payments

When a client sends an x402 payment to your API, forward it to us for verification:

curl -X POST https://archtools.dev/api/v1/facilitator/verify \
  -H "Authorization: Bearer fac_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "payment": "<base64-encoded-payment-payload>",
    "paymentDetails": {
      "scheme": "exact",
      "network": "eip155:8453",
      "maxAmountRequired": "1000",
      "resource": "https://myapi.com/v1/endpoint",
      "payTo": "0xYourWalletAddress",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
    }
  }'

3. Settle Payments

After fulfilling the request, settle the payment on-chain:

curl -X POST https://archtools.dev/api/v1/facilitator/settle \
  -H "Authorization: Bearer fac_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "payment": "<base64-encoded-payment-payload>",
    "paymentDetails": {
      "scheme": "exact",
      "network": "eip155:8453",
      "maxAmountRequired": "1000",
      "resource": "https://myapi.com/v1/endpoint",
      "payTo": "0xYourWalletAddress",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
    }
  }'

4. Check Your Dashboard

curl https://archtools.dev/api/v1/facilitator/dashboard \
  -H "Authorization: Bearer fac_your_api_key"

Express.js Integration Example

import express from "express";
import axios from "axios";

const FACILITATOR_URL = "https://archtools.dev/api/v1/facilitator";
const FACILITATOR_KEY = process.env.ARCH_FACILITATOR_KEY;
const MY_WALLET = process.env.MY_WALLET_ADDRESS;

// Middleware: check for x402 payment
async function x402Middleware(req, res, next) {
  const payment = req.headers["x-payment"];

  if (!payment) {
    // Return 402 Payment Required
    return res.status(402).json({
      x402Version: 1,
      accepts: [{
        scheme: "exact",
        network: "eip155:8453",
        maxAmountRequired: "1000", // 0.001 USDC
        resource: `https://myapi.com${req.path}`,
        payTo: MY_WALLET,
        asset: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        maxTimeoutSeconds: 60,
      }],
    });
  }

  // Verify payment with Arch Tools
  const { data } = await axios.post(`${FACILITATOR_URL}/verify`, {
    payment,
    paymentDetails: {
      scheme: "exact",
      network: "eip155:8453",
      maxAmountRequired: "1000",
      resource: `https://myapi.com${req.path}`,
      payTo: MY_WALLET,
      asset: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    },
  }, {
    headers: { Authorization: `Bearer ${FACILITATOR_KEY}` },
  });

  if (!data.isValid) {
    return res.status(402).json({ error: "payment_invalid", reason: data.invalidReason });
  }

  // Payment verified — proceed with request
  req.x402Payment = payment;
  next();
}

// After fulfilling request, settle payment
async function settleAfterResponse(req) {
  if (!req.x402Payment) return;
  await axios.post(`${FACILITATOR_URL}/settle`, {
    payment: req.x402Payment,
    paymentDetails: {
      scheme: "exact",
      network: "eip155:8453",
      maxAmountRequired: "1000",
      resource: `https://myapi.com${req.path}`,
      payTo: MY_WALLET,
      asset: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    },
  }, {
    headers: { Authorization: `Bearer ${FACILITATOR_KEY}` },
  });
}

const app = express();
app.use(express.json());

app.post("/v1/my-tool", x402Middleware, async (req, res) => {
  // Do your thing
  const result = { ok: true, data: "Hello, paying customer!" };
  res.json(result);

  // Settle in background (don't block response)
  settleAfterResponse(req).catch(console.error);
});

app.listen(3000);

API Reference

POST /api/v1/facilitator/register

Register as a new facilitator provider. No auth required.

FieldTypeRequiredDescription
namestringYour API/company name
emailstringContact email
walletAddressstringEVM wallet for receiving payments (0x...)
webhookUrlstringURL for payment event webhooks
networksstring[]Networks to enable (default: ["eip155:8453"])
endpointsobjectYour endpoints and pricing

POST /api/v1/facilitator/verify

Verify an x402 payment. Requires facilitator API key.

FieldTypeDescription
paymentstringBase64-encoded x402 payment payload
paymentDetails.schemestring"exact"
paymentDetails.networkstringChain ID (e.g. "eip155:8453")
paymentDetails.maxAmountRequiredstringMinimum amount in atomic units
paymentDetails.resourcestringURL of the resource being paid for
paymentDetails.payTostringYour wallet address
paymentDetails.assetstringToken contract address

POST /api/v1/facilitator/settle

Settle a verified payment on-chain. Same request body as verify.

GET /api/v1/facilitator/dashboard

Get your payment stats, revenue, and recent transactions. Requires facilitator API key.

GET /api/v1/facilitator/networks

List all supported networks. No auth required.

GET /api/v1/facilitator/health

Check facilitator service status. No auth required.

Supported Networks

NetworkChain IDTokenSettlement Time
Baseeip155:8453USDC~2 seconds
Ethereumeip155:1USDC~12 seconds
Arbitrumeip155:42161USDC~2 seconds
Polygoneip155:137USDC~2 seconds
Optimismeip155:10USDC~2 seconds
Avalancheeip155:43114USDC~2 seconds
Base Sepolia (testnet)eip155:84532USDC~2 seconds

Pricing

Simple, transparent pricing. We take a small percentage of each settled payment.

TierMonthly PaymentsFee
FreeUp to 1000% (try it free)
Growth101 – 10,0001.0%
Scale10,001 – 100,0000.5%
Enterprise100,000+Custom (contact us)

Gas fees are included — we pay for settlement. No hidden costs.

⚠️ Beta: This service is in beta. Settlement is available on Base mainnet. Other networks are in verification-only mode during beta. Contact us for enterprise needs.

Why Use Arch Tools as Your Facilitator?

Start Building →