> ## Content Index
> Fetch the complete content index at: https://stablecoininsider.org/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to Enable PayAI x402 Facilitator for USDC (2026)
- URL: https://stablecoininsider.org/how-to-enable-payai-x402-facilitator-for-usdc/
- Published: 2026-10-01T06:13:00.000Z
- Updated: 2026-10-01T06:13:00.000Z
- Description: Wire @payai/facilitator into Express paymentMiddleware, prove a real settle, and scale past PayAI's free credit allowance for USDC x402.
- Author: Alexandra
- Tags: AI, Stablecoins

AI agents that sell HTTP resources still need a facilitator that verifies a signed stablecoin payment and settles it on-chain before the response leaves the server.

The named object is the **PayAI x402 Facilitator** at [facilitator.payai.network](https://facilitator.payai.network/): a production verify/settle service for exact (and related) x402 payments across Solana, Base, Polygon, Avalanche, Arbitrum, Sei, X Layer, and SKALE. Wire it with **@payai/facilitator** plus **HTTPFacilitatorClient** and Express **paymentMiddleware**. That is not Nevermined plan metering with **nvm:erc4337**, not Circle's public facilitator alone, not Coinbase AgentKit as a buyer client, not Cloudflare Agents MCP paywalls, and not Alchemy gateway auth.

📌

Stablecoin Insider's framing: use this guide when the job is enabling the PayAI x402 Facilitator as your merchant verify/settle backend for USDC (and Solana USDC) exact payments. Use How to Enable Nevermined x402 USDC Payments when you need plans, credits, and createDelegation. Use How to Enable Circle x402 Facilitator when you want Circle's facilitator URL. Use How to Pay for an x402 API with Coinbase AgentKit when your agent only pays someone else's 402.

Facts below come from PayAI's [x402 quickstart](https://docs.payai.network/x402/quickstart), [facilitator introduction](https://docs.payai.network/x402/facilitators/introduction), [Express server quickstart](https://docs.payai.network/x402/servers/typescript/express), [facilitator pricing](https://docs.payai.network/x402/facilitators/pricing), and [accept payments from AI agents](https://docs.payai.network/guides/accept-payments-from-ai-agents) docs, plus live [GET /supported](https://facilitator.payai.network/supported) and [GET /pricing](https://facilitator.payai.network/pricing) on facilitator.payai.network as of October 1, 2026\. Rates, free-credit counts, network lists, package names, and endpoint paths are taken from those sources. No invented fee schedules.

### Key Takeaways

- Point Express paymentMiddleware at PayAI via @payai/facilitator and HTTPFacilitatorClient (no manual facilitator URL).
- Start on free allowance: 1,000 lifetime free credits per receiving wallet; testnets do not consume it.
- Register ExactEvmScheme / ExactSvmScheme for the networks in your accepts array (e.g. Base Sepolia + Solana Devnet).
- Beyond free, cost-plus is network gas × 1.30 in credits (1 credit = $0.001); set PAYAI\_API\_KEY\_ID/SECRET.
- Named downside: shared host/IP pools can burn the free allowance early; get a key before production bursts.

⚠️

Named downside: PayAI documents that free credits are per receiving wallet, and requests from shared hosts or IP addresses also draw from a shared pool. Serverless or shared-cloud deploys can hit free\_tier\_exhausted (HTTP 403) sooner than a dedicated IP. Treat API-key + credits as a ship gate before you load-test mainnet.

## Who this is for

Use this path if you expose an API, SaaS operation, or agent-facing HTTP resource, you want buyers (including AI agents) to pay in USDC or Solana USDC under the x402 exact scheme, and you can run TypeScript Express (or Hono/FastAPI/Flask/Gin with the matching PayAI guides).

Skip it if you need Nevermined plan objects and capped **createDelegation** (see [How to Enable Nevermined x402 USDC Payments for AI Agents](https://stablecoininsider.org/how-to-enable-nevermined-x402-usdc-payments/)), only Circle's facilitator without PayAI packages (see [How to Enable Circle x402 Facilitator for USDC](https://stablecoininsider.org/how-to-enable-circle-x402-facilitator-for-usdc/)), buyer-side AgentKit payments (see [How to Pay for an x402 API with Coinbase AgentKit](https://stablecoininsider.org/how-to-pay-for-an-x402-api-with-coinbase-agentkit/)), MCP tool paywalls on Cloudflare (see [How to Charge for MCP Tools with Cloudflare Agents x402](https://stablecoininsider.org/how-to-charge-for-mcp-tools-with-cloudflare-agents-x402/)), or Alchemy RPC auth (see [How to Authenticate Alchemy APIs with x402 USDC](https://stablecoininsider.org/how-to-authenticate-alchemy-apis-with-x402-usdc/)). For picking among facilitators, see [How to Choose an x402 Facilitator for USDC](https://stablecoininsider.org/how-to-choose-an-x402-facilitator-for-usdc/). For generic accept-side patterns, see [How to Accept x402 USDC Payments from AI Agents](https://stablecoininsider.org/how-to-accept-x402-usdc-payments-from-ai-agents/).

## What the PayAI x402 Facilitator does

x402 revives HTTP **402 Payment Required**. The resource server advertises payment requirements; the client signs a stablecoin payment; the facilitator verifies the payload and settles on-chain so the server never holds a merchant private key or runs its own RPC wallet loop.

PayAI's production origin is [https://facilitator.payai.network](https://facilitator.payai.network/). Documented endpoints include **GET /supported**, **POST /verify**, **POST /settle**, and **GET /discovery/resources** (the Bazaar). Ordinary exact payments can start without portal signup or an API key within the free allowance. PayAI does not custody merchant balances and is not a card/fiat checkout processor.

Stablecoin Insider's working definition: enable the facilitator when middleware can call verify before work and settle after success, with network coverage and rate limits you can operate against. Discovery via Bazaar is optional; it helps agents find priced routes but does not replace your own docs.

## Prerequisites

You need a receiving wallet address on each network you price (an EVM hex address and/or a Solana base58 address), Node.js with TypeScript (or another documented stack), and a disposable funded buyer wallet to prove settle, not just a 402 response. On Solana, PayAI notes the merchant USDC ATA must exist; creating it needs a setup fee payer with SOL, separate from settlement gas PayAI sponsors.

You do **not** need a PayAI portal account for the ordinary exact starter flow. Do not add signup friction just because the SDK can take **PAYAI\_API\_KEY\_ID** / **PAYAI\_API\_KEY\_SECRET**. If buyers need USDC first, see [How to Fund an AI Agent Wallet with USDC](https://stablecoininsider.org/how-to-fund-ai-agent-wallet-with-usdc/).

## Step 1: Install packages and env

PayAI's Express quickstart installs **express**, **dotenv**, **@payai/facilitator**, **@x402/core**, **@x402/evm**, **@x402/express**, **@x402/extensions**, and **@x402/svm**. Create a project, set **type: module**, and add those deps as in the [Express server quickstart](https://docs.payai.network/x402/servers/typescript/express).

Set receiving addresses in **.env**:

EVM_ADDRESS=0x...   # EVM wallet to receive payments
SVM_ADDRESS=...    # Solana wallet to receive payments
# Optional beyond free allowance:
# PAYAI_API_KEY_ID=...
# PAYAI_API_KEY_SECRET=...

The **@payai/facilitator** package points at **https://facilitator.payai.network** automatically. No manual facilitator URL is required for the default config.

## Step 2: Wire HTTPFacilitatorClient and paymentMiddleware

Construct the facilitator client once, then pass an **x402ResourceServer** into **paymentMiddleware** with route accepts. The Express docs show dual accepts on Base Sepolia and Solana Devnet at **$0.001** each:

import { paymentMiddleware, x402ResourceServer } from "@x402/express";
import { ExactEvmScheme } from "@x402/evm/exact/server";
import { ExactSvmScheme } from "@x402/svm/exact/server";
import { HTTPFacilitatorClient } from "@x402/core/server";
import { declareDiscoveryExtension } from "@x402/extensions/bazaar";
import { facilitator } from "@payai/facilitator";

const facilitatorClient = new HTTPFacilitatorClient(facilitator);

app.use(paymentMiddleware({
  "GET /weather": {
    accepts: [
      { scheme: "exact", price: "$0.001", network: "eip155:84532", payTo: evmAddress },
      { scheme: "exact", price: "$0.001", network: "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", payTo: svmAddress },
    ],
    description: "Weather data",
    mimeType: "application/json",
    serviceName: "Weather API",
    tags: ["weather", "api"],
    extensions: { ...declareDiscoveryExtension({ output: { example: { report: { weather: "sunny", temperature: 70 } } } }) },
  },
}, new x402ResourceServer(facilitatorClient)
  .register("eip155:84532", new ExactEvmScheme())
  .register("solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", new ExactSvmScheme()));

Keep health checks and public docs free. Only meter the bounded operation (report, inference, premium lookup). Payment proves payment, not permission to another customer's private data; keep normal auth on user-scoped routes.

## Step 3: Prove unpaid 402, then a real settle

Run the server (**npx tsx index.ts** in the Express guide; default listen example is port **4021**). Hit the route without payment and confirm HTTP 402 with the expected recipient, asset, network, and price. Then run a funded buyer from PayAI's fetch or Axios client quickstarts and retain evidence of a successful paid response plus finalized on-chain settlement.

PayAI's accept-payments guide is explicit: a 402 alone does not prove the integration. Reconcile ambiguous responses before retrying; **settlement\_pending** on **POST /settle** means unresolved, and identical-body retries are idempotent. Optionally publish Bazaar discovery metadata so agents can find the route.

💡

Ops check before you call it done: unpaid 402 shape matches accepts; buyer spends within an explicit cap; paid HTTP 200 aligns with a finalized settlement; recovery of disposable test funds is documented if you control both wallets.

## Step 4: Move to mainnet and scale past free credits

For mainnet, update each route's **network** and the matching **.register(...)** scheme together (for example Base **eip155:8453** and Solana **solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp**). Adding credentials alone does not switch networks. PayAI documents that ordinary exact mainnet payments can run within the free allowance without an API key.

Beyond the allowance, authenticate. Autonomous agents can buy credits and a key over x402 without portal signup; humans can use [merchant.payai.network](https://merchant.payai.network). Set **PAYAI\_API\_KEY\_ID** and **PAYAI\_API\_KEY\_SECRET**; **@payai/facilitator** picks them up automatically. Exhausting free tier returns HTTP 403 with **errorReason** beginning **free\_tier\_exhausted**.

## Pricing and free allowance (sourced)

Per PayAI's [facilitator pricing](https://docs.payai.network/x402/facilitators/pricing) page (cost-plus live since 21 September 2026): new receiving wallets get **1,000 lifetime free credits** (not a monthly reset). Testnet settlements are free and do not consume the allowance. Beyond free, each settlement costs measured network gas × 1.30, billed in credits at **1 credit = $0.001**. Live rates are at [facilitator.payai.network/pricing](https://facilitator.payai.network/pricing) and under **pricing** on [GET /supported](https://facilitator.payai.network/supported).

Stablecoin Insider checked live [GET /pricing](https://facilitator.payai.network/pricing) on October 1, 2026: Base exact EIP-3009 was **2.31 credits ($0.00231)** per settlement; Solana mainnet exact was **1.62 credits ($0.00162)**; Base Sepolia and Solana Devnet exact were **0**. Treat the live [pricing table](https://facilitator.payai.network/pricing) as authoritative because rates refresh with gas and token prices.

| Item             | PayAI documented value                                   | Operator note                              |
| ---------------- | -------------------------------------------------------- | ------------------------------------------ |
| Free credits     | 1,000 per receiving wallet (lifetime)                    | Shared host/IP pools can drain faster      |
| Credit unit      | $0.001 per credit                                        | Fractional credits are normal              |
| Beyond free      | gas × 1.30 in credits                                    | Facilitator fee ≠ your API price to buyers |
| Testnets         | 0 credits                                                | Use for integration before mainnet         |
| Edge rate limits | settle 100 rps; payments-read 200; discovery 25 (per IP) | Back off on status, not a remaining header |

## Supported networks snapshot

PayAI's quickstart lists Arbitrum One/Sepolia, Avalanche/Fuji, Base/Base Sepolia, Polygon/Amoy, Sei/Sei Testnet, SKALE Base/Sepolia, Solana/Devnet, and X Layer/Testnet, with v1 short names and v2 CAIP-2 IDs. Always confirm against live [GET /supported](https://facilitator.payai.network/supported) before you hard-code a network string. A payment kind leaving **/supported** is the withdrawal signal.

## How PayAI compares to Circle CDP and Nevermined

| Stack                                                                                                                | What it optimizes                                                                       | When Stablecoin Insider picks it                               |
| -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
| PayAI x402 Facilitator                                                                                               | Multi-chain verify/settle + Bazaar; free-tier exact start; @payai/facilitator one-liner | You are the merchant; want PayAI coverage and package defaults |
| [Circle x402 facilitator](https://stablecoininsider.org/how-to-enable-circle-x402-facilitator-for-usdc/)             | Circle-operated facilitator for USDC-centric exact flows                                | You standardize on Circle's facilitator URL and tooling        |
| [Nevermined Payments x402](https://stablecoininsider.org/how-to-enable-nevermined-x402-usdc-payments/)               | Plans, credits, erc4337 delegations, paymentMiddleware(planId)                          | You need plan metering and spend-capped buyer delegations      |
| [Coinbase AgentKit x402](https://stablecoininsider.org/how-to-pay-for-an-x402-api-with-coinbase-agentkit/)           | Buyer-side agent paying third-party 402 APIs                                            | Your agent is the payer, not the merchant of record            |
| [Cloudflare Agents MCP x402](https://stablecoininsider.org/how-to-charge-for-mcp-tools-with-cloudflare-agents-x402/) | MCP tool paywalls on Cloudflare                                                         | The product is MCP tools, not a generic Express API            |
| [Alchemy x402 USDC auth](https://stablecoininsider.org/how-to-authenticate-alchemy-apis-with-x402-usdc/)             | Pay Alchemy APIs with x402 USDC                                                         | The merchant is Alchemy itself                                 |

PayAI wins when you want a ready multi-network facilitator with a typed npm entrypoint and optional agent-buyable credits. Nevermined wins when plan IDs and **createDelegation** are the product. Circle wins when your stack already centers Circle's facilitator. For a broader shortlist, use [How to Choose an x402 Facilitator for USDC](https://stablecoininsider.org/how-to-choose-an-x402-facilitator-for-usdc/).

## Stablecoin Insider's take

💬

Stablecoin Insider's take: enable the PayAI x402 Facilitator when you need multi-chain exact USDC settle without running your own facilitator. Ship Express paymentMiddleware against testnets first, prove a real mainnet settle inside the free allowance, then add PAYAI\_API\_KEY\_\* before shared-host load. If you need Nevermined plans and capped delegations, switch guides. If you only need Circle's facilitator URL, use Circle's path and skip @payai/facilitator.

[Compare x402 facilitators](https://stablecoininsider.org/how-to-choose-an-x402-facilitator-for-usdc/)

---

## FAQ

#### What is the PayAI x402 Facilitator?

It is PayAI's production x402 verify/settle service at `https://facilitator.payai.network`. It checks signed stablecoin payment payloads and settles them on-chain so resource servers can charge per HTTP request without holding merchant keys for every chain.

#### How do I enable PayAI with Express paymentMiddleware?

Install `@payai/facilitator` with `@x402/express` and scheme packages, build `new HTTPFacilitatorClient(facilitator)`, register `ExactEvmScheme`/`ExactSvmScheme` for your networks, and wrap routes in `paymentMiddleware` with an `accepts` array (price, network, payTo).

#### Do I need an API key on day one?

No for ordinary exact payments inside the free allowance. PayAI documents 1,000 lifetime free credits per receiving wallet and free testnets. Set `PAYAI_API_KEY_ID` and `PAYAI_API_KEY_SECRET` when you need paid capacity, attribution, or assigned lanes.

#### What does free\_tier\_exhausted mean?

HTTP 403 with `errorReason` beginning `free_tier_exhausted` means the free credit allowance (or shared pool) is spent. Buy credits via agent x402 vending or the merchant portal, then authenticate.

#### How is PayAI different from Nevermined x402?

PayAI is a multi-chain facilitator for exact (and related) x402 settlements with Bazaar discovery. Nevermined adds payment plans, credits metering, and buyer `createDelegation` (including `nvm:erc4337`). Many products use a facilitator like PayAI or Circle without Nevermined plan objects.

#### Which networks does PayAI support?

Documented coverage includes Base, Solana, Polygon, Avalanche, Arbitrum, Sei, X Layer, and SKALE (plus testnets). Confirm live kinds on `GET /supported` before production.

#### What is the facilitator fee versus my API price?

Your `accepts.price` is what the buyer pays your receiving wallet. The facilitator fee (gas × 1.30 in credits beyond free) is separate settlement infrastructure cost. Do not confuse the two.

#### Can AI agents buy PayAI credits without a human signup?

Yes. PayAI documents programmatic key and credit purchase over x402; the paying wallet becomes the account identity. Store the returned secret immediately. Vending starts at $1 per the [accept payments from AI agents](https://docs.payai.network/guides/accept-payments-from-ai-agents) guide; purchased credits are non-refundable.

---

**Need the facilitator shortlist before you ship?** Start with Stablecoin Insider's x402 facilitator comparison, then come back to this PayAI wire-up.

[Choose an x402 facilitator ](https://stablecoininsider.org/how-to-choose-an-x402-facilitator-for-usdc/) 

[How to Choose an x402 Facilitator for USDC (2026)Compare x402 facilitator options for USDC agent and API payments.![](https://stablecoininsider.org/favicon.ico)Stablecoin Insider](https://stablecoininsider.org/how-to-choose-an-x402-facilitator-for-usdc/)

This content is provided for informational and educational purposes only and does not constitute financial, investment, legal, or tax advice; no material herein should be interpreted as a recommendation, endorsement, or solicitation to buy or sell.