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
- A buyer requests a paid resource from the seller’s API.
- The seller returns
402 Payment Requiredwith the payment requirements. - The buyer signs an EIP-3009 authorization offchain and retries the request.
- The seller sends the signed authorization to Facilitator Service using
/settle. - Facilitator Service screens both parties. If either fails, it refuses to settle. Otherwise, it submits the USDC transfer through a Circle relayer.
- Once confirmed, Facilitator Service returns the transaction hash to the seller, who fulfills the request.
EIP-3009 authorizations
Facilitator Service uses EIP-3009 as the payment primitive. The buyer signs aTransferWithAuthorization 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
toaddress in the authorization matches the seller’spayTo
transferWithAuthorization on the USDC contract.