Bag is live — accept USDC & card payments globally. Get started →
BagBag Docs
Finance

Subscriptions

How Bag handles recurring billing, trials, dunning, and subscription lifecycle.

Subscriptions

Bag supports recurring billing as part of the Merchant of Record model. Subscriptions handle the full lifecycle — creation, billing, trials, failed payment recovery, and cancellation — with tax compliance built in.


Billing Cycles

CycleExample
DailyShort-term access, metered trials
WeeklyWeekly content, digests
MonthlyStandard SaaS plans
YearlyAnnual discounts
CustomAny interval (e.g., every 2 weeks, quarterly)

Trial Periods

Offer free trials before the first charge:

  • Configurable duration — Days, weeks, or months per plan
  • No payment during trial — Customer is not charged until the trial ends
  • Auto-conversion — Billing starts automatically when the trial expires
  • Cancel without charge — Customers can cancel during the trial at no cost

Payment Methods for Subscriptions

Stablecoin (USDC)

Customers approve a one-time transaction authorization using a smart contract (Permit2). When subscribing to a $10/month plan, the customer approves up to 6 months of payments ($60). Each billing cycle, the amount is auto-withdrawn. Re-approval is required after the approval period expires.

This reduces transaction friction and gas fees while keeping the customer in control of their wallet.

Card

Standard recurring card billing. Card networks handle the recurring authorization, and Bag manages retries on failure.


Failed Payments & Dunning

When a subscription payment fails, Bag automatically retries over a 21-day grace period:

RetryDayAction
1Day 1First retry + customer email notification
2Day 4Second retry + reminder email
3Day 10Third retry + warning email
4Day 21Final retry + last-chance email

During the grace period, the subscription status is past_due and the customer retains access.

After all retries fail, the subscription is either canceled or kept active with overdue status (configurable per plan).


Subscription Lifecycle

Statuses

StatusMeaning
activeSubscription is current, payments up to date
past_duePayment failed, in dunning grace period
canceledSubscription terminated
pausedBilling suspended, may retain or revoke access

Pause & Resume

Customers or merchants can pause a subscription. Billing stops during the pause. Whether the customer retains access during the pause is configurable.

Cancellation

Two modes:

  • Immediate — Access ends right away
  • End of period — Access continues until the current billing period ends

Plan Changes (Proration)

Upgrades and downgrades mid-cycle use proration:

Example: Customer on $10/month upgrades to $20/month on day 15:

  • Credit for unused time: $5
  • Charge for remaining time at new rate: $10
  • Net charge: $5

Webhook Events

Subscription events are delivered to your registered webhook endpoint:

EventWhen it fires
subscription.createdNew subscription created
subscription.updatedPlan or details changed
subscription.renewedRecurring payment succeeded
subscription.renewal_dueUpcoming renewal requires action (stablecoin re-approval)
subscription.past_duePayment failed, grace period active
subscription.canceledSubscription permanently canceled

Tax Handling

Bag calculates and remits tax on every subscription payment automatically. Tax is recalculated at each renewal based on the customer's current jurisdiction and applicable rates.


What's next

For a step-by-step integration guide with code examples, see the Subscriptions guide.

On this page