<!--
Parallel Documentation — this page, as markdown.
Index of every page: https://docs.parallel.best/llms.txt
The whole documentation in one file: https://docs.parallel.best/llms-full.txt
-->

# How the facilitator works

The **facilitator** is the service that verifies and settles x402 payments on-chain. Your API never touches a smart contract — the middleware talks to the facilitator, and the facilitator does the on-chain work.

You declare paid routes in your middleware; the facilitator handles the rest.

## The payment flow

Every paid request goes through two phases:

1. **Verify** — the facilitator checks the agent's signed payment off-chain: its shape, signature, nonce and expiry, and that it delivers the required token, for at least the price, to your `payTo` on the route's network. Instant, no transaction. If it's valid, your handler runs, and the facilitator hands the middleware a settle token for this payment.
2. **Settle** — once your handler returns a success response, the middleware presents that token, and the facilitator submits the transfer on-chain and returns a settlement proof.

If verification fails, your handler never runs. If your handler fails, settlement never happens — the agent is only charged for a successful response. See [verify vs settle](/agents/x402/verify-vs-settle) for the full sequence.

Each payment settles once. The facilitator claims the payment before it submits anything, so two settles of the same payment never both reach the chain, and a settle repeated once the first one has finished gets its recorded outcome: the confirmation, marked `alreadySettled`, or `PAYMENT_NOT_VERIFIED` when it failed. A settle that does not present the token issued at verify is refused with `SETTLE_TOKEN_REQUIRED`, or `SETTLE_TOKEN_INVALID` for a wrong one: the facilitator has required the token since 1 October 2026, and `@parallel-protocol/x402` sends it from version 0.8.0.

## Exact and metered payments

A route is priced in one of two schemes:

* **`exact`**, the default: the agent signs the price, and you receive it.
* **`upto`**, for a resource whose cost is only known once it is served, such as an LLM completion: the agent signs the price as a cap, valid for the route's `maxTimeoutSeconds` (3,600 at most). Your handler names the amount it actually charges, and the escrow refunds the rest on-chain in the same settlement. Metered routes are paid in USDp only.

On a metered route the SDK keeps up to the last two minutes of that window for the settlement and its retry: on Express, Hono and Next.js the handler gets `maxTimeoutSeconds` minus 120 seconds, and 30 seconds at least. A settlement the facilitator confirms for another amount than the one your handler asked for is refused with `AMOUNT_MISMATCH` and the response is discarded. Alert on it: money moved, and the agent was not served. The configuration, with the `payment-settle-amount` header and the `meter` function, is in the [package README](https://www.npmjs.com/package/@parallel-protocol/x402).

## Supported stablecoins

By default a route accepts **USDp**, **USDC**, and **sUSDp**. The agent pays with whichever of these it holds; you receive the token you configured — including sUSDp, Parallel's yield-bearing savings token, so your revenue can start earning the moment it settles. You can narrow or widen the accepted set per route with the [`acceptedTokens`](/agents/x402/api-reference#routeconfig) option.

## Smart routing

You set a price and the tokens you accept. The agent can choose which token to pay with — or let the SDK pick the route automatically. If the agent pays in a different token than the one you receive, the conversion happens inside the same settlement, at no extra platform fee.

## Fees and gas

* **Zero platform fee.** Parallel does not take a cut of your revenue.
* **Gas sponsored.** Transactions on Base, HyperEVM, and Avalanche are gas-sponsored — 1,000 per agent per month. Gas is not sponsored on Ethereum mainnet.

## Supported networks

The facilitator settles on **Base**, **Ethereum**, **Avalanche**, and **HyperEVM**. Most builders use Base for the lowest cost and sponsored gas. You choose the network per route with the `network` field.

## Non-custodial settlement

Funds settle directly to the `payTo` address you configure. There is no Parallel account, no holding period, and no withdrawal step — the protocol is non-custodial and Cooper Labs never holds your funds.

## Next steps

* [Quickstart](/agents/x402/quickstart)
* [API reference](/agents/x402/api-reference)
* [Verify vs settle](/agents/x402/verify-vs-settle)

