Skip to content
recurring-billingusage-based-billing
Joshua C.

Automate Usage-Based USDC Billing with Monthly Cap Resets

Learn how to implement usage-based USDC billing with automatic monthly cap resets on Reclack, covering setup, webhook integration, and real-world examples.

Automate Usage-Based USDC Billing with Monthly Cap Resets

Recurring usage-based billing is common in SaaS, infrastructure, and onchain products. Customers pay for what they use, within a cap that lets them know their worst-case monthly exposure. With onchain stablecoins like USDC, recurring usage-based billing works differently than card rails. Each recurring authorization must be capped, and caps need to reset on schedule, not just when usage hits the limit. This guide shows how to set up usage-based USDC billing, with automatic monthly cap resets, using Reclack.

Why Usage-Based Billing Needs Cap Resets

A usage-based model charges customers for actual consumption. If you set a monthly cap of 2,000 USDC, the customer cannot be charged more in that period, no matter how much they use. But when a new billing period starts, usage resets, and so should the cap. Without automatic resets, you would need the customer to re-authorize each month or manually intervene, which is not scalable.

Onchain, this is enforced through token approvals. The customer signs an approval for a capped amount per period. When the period ends, the cap must reset so billing can continue. This flow is safer for both parties than asking for an unlimited approval.

Core Steps for Metered USDC Billing with Monthly Cap Reset

  1. Define the Billing Cap and Period: Decide the max amount the customer can be charged per period (e.g., 2,000 USDC per month).
  2. Integrate Usage Tracking: Track the customer’s consumption offchain in your own systems.
  3. Set Up Metered Billing in Reclack: Create a usage-based plan with a cap and monthly interval.
  4. Build Usage Reporting and Charge Calls: Report usage to Reclack, triggering collection within the approved cap.
  5. Handle Cap Reset and Renewal: Let Reclack automatically prompt for a new cap approval when the month turns over.
  6. React to Payment Events via Webhooks: Update your own records when charges succeed or fail.

Let’s walk through these steps in detail.

Step 1: Define the Cap and Billing Period

Pick a cap that matches your pricing model. For example, you charge 0.15 USDC per API call, with a maximum of 2,000 USDC per month. The period is one calendar month. The cap is shown to the customer in the checkout flow, and they sign an approval for that amount.

Step 2: Usage Tracking Logic

Keep usage tracking in your internal backend. Each customer accrues usage as they consume the product. At the end of each day (or as often as you want to bill), sum their usage since the last charge and prepare a metered charge.

For example, if a customer makes 7,000 calls in a month at 0.15 USDC per call, their gross usage is 1,050 USDC. If they go over 13,333 calls, they hit the 2,000 USDC cap and cannot be charged more that month.

Step 3: Set Up a Usage-Based Plan in Reclack

Create a usage-based subscription plan in Reclack. Specify: - The billing interval (monthly) - The capped amount (2,000 USDC) - The unit price (0.15 USDC per call)

You can do this in the dashboard or via the API. The customer signs an approval for a recurring capped payment. You never request more than the cap.

Step 4: Report Usage and Trigger Charges

When you want to collect, call Reclack’s API to report metered usage for a customer. Reclack checks the usage, ensures it fits within the approved cap, and initiates an onchain transfer from the customer’s wallet to your settlement address.

Example API Call

POST /v1/usage
Content-Type: application/json
Authorization: Bearer <api-key>

{
  "customer_id": "cus_abc123",
  "period": "2024-07",
  "units": 6500,
  "unit_price": "0.15"
}

This charges for 6,500 calls at 0.15 USDC each (total 975 USDC), which is below the 2,000 USDC monthly cap.

If the reported usage would exceed the cap, Reclack only collects up to the cap and marks the subscription as maxed out for the period. No further charges are attempted until the next period.

Step 5: Cap Reset and Renewal Approval

At the start of a new period, Reclack resets the internal usage counter for that customer. The platform automatically prompts the customer, via email or in their portal, to re-approve the recurring cap for the next month. This keeps the flow non-custodial and ensures that every renewal is explicitly consented to.

No charge is attempted until the customer has signed the new approval onchain. If they do not sign, no funds can be collected. This meets the requirement that every recurring approval is bounded and time-limited.

What if the Customer Does Not Re-Approve?

If a customer does not sign the new cap, you do not get paid for the next period’s usage. You can pause service, send reminders, or prompt again. Reclack will not attempt to collect without a fresh, capped approval.

Step 6: Handling Payment Events with Webhooks

For each charge, Reclack emits webhook events. You can subscribe to: - metered.charge.succeeded: Payment succeeded and settled onchain - metered.charge.failed: Payment failed (insufficient balance, revoked approval, or other onchain errors) - cap.renewal.requested: A new approval is needed for the next period - cap.renewal.succeeded: Customer approved the new cap

Use these webhooks to update your own billing records, grant or restrict service, and alert customers as needed.

Example Webhook Payload

{
  "event": "metered.charge.succeeded",
  "customer_id": "cus_abc123",
  "period": "2024-07",
  "amount": "975.00",
  "units": 6500,
  "settlement_address": "0xMerchant..."
}

You can tie this back to your internal usage and mark the invoice as paid.

Worked Example: API SaaS with Monthly Usage Billing

Suppose you run an API SaaS, charging 0.15 USDC per call, capped at 2,000 USDC per month.

  • In July, customer A makes 7,000 calls (1,050 USDC). You report usage and collect 1,050 USDC.
  • In August, customer A makes 18,000 calls (2,700 USDC). They are charged only 2,000 USDC. Further usage is blocked until September or until they raise their cap.
  • September starts. Reclack prompts customer A to re-approve the 2,000 USDC cap. Once approved, usage resets to zero and charges resume for that period.

Each period, the customer sees and signs a fresh cap. There is no way to collect more than the approved limit, and no way to charge for a new period without a new approval.

Error Handling and Edge Cases

  • Insufficient Balance: If a charge fails because the customer’s wallet lacks USDC, Reclack emits a failure webhook. You can retry, pause service, or alert the customer.
  • Revoked Approval: If the customer revokes the approval mid-period, future charges fail cleanly. No funds are collected until a new approval is signed.
  • Over-Usage: If reported usage exceeds the cap, Reclack collects only up to the cap, and you can prompt the customer to raise it for future periods.

Cap Resets: No Manual Intervention Needed

Because each cap approval is for a bounded period, Reclack handles the reset at the end of each month. There is no need for you to manually clear usage counters, expire approvals, or prompt for new signatures. Webhooks notify you as soon as a new cap is needed or approved, so you can keep your business logic simple.

What Actually Moves Onchain

Every successful usage charge is a USDC transfer, initiated from the customer’s wallet, to your settlement address. The transaction is final once confirmed. Reclack never holds funds, never asks for a private key, and cannot reverse a settled transfer. All approvals are capped and period-limited. No unlimited approvals are ever requested.


We built Reclack to automate recurring, usage-based USDC billing with strict, renewable caps and non-custodial flows. You define the cap and interval, report usage, and Reclack handles approvals, onchain transfers, and renewal prompts, no manual resets or unlimited approvals. Learn more at reclack.com.

recurring-billingusage-based-billing