Skip to main content
Facilitator Service settles x402 payments in USDC after the buyer signs the authorization. It validates each signature, screens both parties, and submits the transfer through a Circle relayer.

Authentication

Facilitator Service requires a Circle API key to settle payments in production. You can trial Facilitator Service without a Circle account through the keyless trial. A trial allowance applies until you claim your seller account.

Roles

Every Facilitator Service payment involves three actors:
  • Buyer: an HTTP client, typically an AI agent, that signs an EIP-3009 authorization to pay for a resource.
  • Seller: an HTTP resource server that asks for payment before returning a result, then calls Facilitator Service to settle the buyer’s authorization.
  • Facilitator: screens both parties, submits the USDC transfer through a Circle relayer, and pays settlement gas.

The payment flow

  1. A buyer requests a paid resource from the seller’s API.
  2. The seller returns 402 Payment Required with the payment requirements.
  3. The buyer signs an EIP-3009 authorization offchain and retries the request.
  4. The seller sends the signed authorization to Facilitator Service using /settle.
  5. Facilitator Service screens both parties. If either fails, it refuses to settle. Otherwise, it submits the USDC transfer through a Circle relayer.
  6. Once confirmed, Facilitator Service returns the transaction hash to the seller, who fulfills the request.
Facilitator Service saves the payment record before broadcasting the transaction, so a retry with the same identifier always resolves to the same payment. This prevents double charges.

EIP-3009 authorizations

Facilitator Service uses EIP-3009 as the payment primitive. The buyer signs a TransferWithAuthorization message offchain, and Facilitator Service submits it to the USDC contract on the payment’s blockchain to move USDC from buyer to seller. Facilitator Service accepts signatures from externally owned accounts (EOAs) and from deployed smart contract accounts through ERC-1271. Smart contract accounts that aren’t deployed yet (ERC-6492) are not supported. Before Facilitator Service submits the transaction, it validates the following:
  • That the buyer’s signature is valid
  • That the buyer has sufficient USDC balance
  • That the to address in the authorization matches the seller’s payTo
Then Facilitator Service calls transferWithAuthorization on the USDC contract.