Skip to content
stablecoin-paymentsusdconchain-billing
Joshua C.

How Customers Approve USDC Payment Caps Onchain

Understand the onchain process for customer approval of USDC payment caps for stablecoin payments, including worked examples, failure modes, and UX patterns.

How Customers Approve USDC Payment Caps Onchain

Stablecoin recurring payments depend on a customer authorization step. The merchant cannot pull funds at will. The customer must explicitly approve a spending cap before any collection happens. This process is core to user trust and onchain safety. Here is how stablecoin payment approval works in practice, and what can go wrong.

Why Stablecoin Payment Approval Needs a Cap

Onchain payment flows cannot use the card-based model of pulling arbitrary amounts at will. ERC-20 tokens use the approve and transferFrom pattern. A wallet signs an onchain transaction that gives another address, usually a smart contract, permission to transfer up to a defined amount of tokens. This is the spending cap, often called the allowance. No merchant should ask for unlimited approval. Instead, the requested cap should match the subscription or invoice amount, plus a margin for gas or small usage variance.

The Onchain Approval Process: Step by Step

Initiation: Customer Sees the Cap and Reason

The flow starts when a customer is shown a checkout or invoice. The UI lists:

  • The payment amount or subscription rate
  • The recurring interval (e.g., monthly)
  • The maximum amount that could be charged before the next approval is required

If the merchant is using a service like Reclack, this information is displayed in a hosted checkout or embedded widget. The customer must connect a wallet. The UI pulls up a wallet signature request, specifying the cap and the contract address that will be allowed to spend USDC.

Signature: Explicit Onchain Approval

The customer confirms the cap on their wallet. They sign and send an approve transaction. This transaction goes to the USDC contract on the chosen chain (Ethereum, Base, or Polygon), authorizing the merchant’s collection contract to transfer up to the cap.

Example:

A SaaS product bills $100 USDC per month. The checkout presents: “Authorize up to 120 USDC per month to ExampleSaaS for your monthly subscription. You will be charged only for the active subscription, up to this cap. To continue after this, you will need to re-approve.”

The customer connects a wallet and confirms in MetaMask:

Approve 120 USDC to: 0xMerchantContract
Estimated gas: 0.001 ETH

After confirming, the approval is live onchain. The merchant cannot spend more than 120 USDC, nor charge outside the defined interval.

Collection: Payment Pull Within the Cap

At the next billing cycle, or when usage is due, the merchant or billing contract calls transferFrom to pull the agreed amount, e.g., 100 USDC. If the customer has insufficient balance, the transaction fails. If the merchant tries to pull more than 120 USDC, the contract will revert.

Renewal: Cap Expiry and Re-Approval

When the merchant has reached the limit or the billing interval is over, a new approval is needed. No further funds can be collected until the customer signs again. This keeps ongoing consent explicit.

What the Customer Signs: Inside the Approval

A wallet approval is a blockchain transaction:

  • It specifies the USDC contract as the recipient
  • It sets the spender (merchant’s contract or address)
  • It sets the allowance (cap)

An example calldata for USDC on Ethereum mainnet:

function approve(address spender, uint256 amount) external returns (bool)

// e.g., approve(0xMerchantContract, 120 * 1e6)

The wallet UI displays these fields. No seed phrase or private key is ever requested. Only the standard transaction signature is needed.

Failure Modes and Customer Protections

Several things can prevent approval or collection:

  • Customer rejects the signature: no approval is granted, no payment can be pulled
  • Customer sets a lower cap: merchant must respect the approved limit
  • Wallet out of USDC: collection fails until balance is topped up
  • Approval revoked: customer can revoke the approval at any time using their wallet, cutting off future payments

No one, not even the merchant or billing provider, can increase the cap or bypass the approval. Only the customer, owning the wallet, can perform the approve transaction.

Real-World Example: Usage Billing with a Cap Margin

A data API provider charges $0.05 USDC per API call. A customer expects to use up to 2,000 calls per month, so the checkout requests a cap of $120 USDC (2,000 x $0.05 = $100, plus a 20% margin for spikes).

  • Customer sees: “Authorize up to 120 USDC for usage-based billing. Actual charges depend on usage, capped at this amount.”
  • Customer signs the approval for 120 USDC.
  • Each API call triggers a metered usage tick. At month’s end, the contract pulls the actual owed amount, up to 120 USDC.
  • If actual usage is 1,800 calls, the pull is 90 USDC. The remaining 30 USDC allowance is not touched.
  • If usage exceeds the margin, e.g., 2,500 calls ($125), only 120 USDC can be pulled. The merchant must request a new approval for any additional amount.

This protects the customer from unexpected charges. The merchant cannot draw more than the authorized cap, regardless of usage.

UX Patterns for Cap Approval

Good wallet UIs and hosted checkouts make the cap and interval clear. The approval dialog should:

  • State the max amount
  • Name the merchant or contract
  • Specify the billing interval or event
  • Make it clear that further approval is needed to continue beyond the cap

Hiding or obfuscating the cap is bad practice. Customers should know what they are signing each time.

How We Handle USDC Cap Approvals at Reclack

At Reclack, we never ask for unlimited approvals. Every recurring or usage-based billing flow presents the cap to the customer, who must sign an onchain approval from their own wallet. The customer can review, adjust, or revoke this approval at any time. We never hold funds, never see a private key, and cannot move tokens ourselves. Payment always moves from the customer’s wallet to a merchant’s settlement address, with no custody by Reclack. You can learn more about our approach at reclack.com.

stablecoin-paymentsusdconchain-billing