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
approvetransaction 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:- Installed Node.js v22.6+
- Installed viem
- Funded the buyer wallet with Arc testnet USDC from the Circle Faucet
Grant Permit2 spending power
Pick the tab for the way you want to grant the allowance.- Onchain approval
- Gasless permit
Send one
approve from the buyer, with Permit2 as the spender. The example
targets Arc testnet.approve-permit2.ts
/verify or /settle.