Skip to main content
Usage-based upto payments move USDC through the Permit2 contract, so the buyer’s USDC allowance for Permit2 must cover each payment. There are two ways to grant the allowance:
  • Onchain approval: one approve transaction grants Permit2 spending power indefinitely. Best when the buyer transacts repeatedly and can hold the gas asset.
  • Gasless permit: the buyer signs an EIP-2612 permit for each payment, which you, as the seller, attach to the Facilitator Service call. Best when the buyer can’t hold the gas asset or integrates purely offchain, since Circle pays settlement gas when the permit is applied.

Prerequisites

Before you begin, ensure that you’ve:

Grant Permit2 spending power

Pick the tab for the way you want to grant the allowance.
Send one approve from the buyer, with Permit2 as the spender. The example targets Arc testnet.
approve-permit2.ts
If a permit is present but invalid, Facilitator Service returns one of the permit reasons on /verify or /settle.