What recurring billing means in practice
Recurring billing is just an automated charge against a saved payment method on a schedule the customer agreed to at checkout. The hard part isn't the charge itself, it's everything around it: keeping the payment method valid, handling failures gracefully, and making sure the next order actually ships when it should. If any of those break, churn spikes and you won't always know why.
Shopify's billing architecture
On Shopify, every subscription lives as a SubscriptionContract tied to a customer payment method. Billing cycles are calculated from the contract's billing policy, and orders are created through the BillingAttempt API. Your subscription app tells Shopify when to fire each attempt, what discounts to apply, and how to react when something goes wrong. Shopify holds the data, your app runs the logic.
- SubscriptionContract: the source of truth for the customer's plan
- BillingAttempt: each individual charge attempt
- SellingPlan: the rules (frequency, discount, delivery)
The billing attempt lifecycle
When a cycle hits its billing date, your app creates a billing attempt. Shopify charges the saved card, then either creates an order on success or returns an error code on failure. Most failures are recoverable (insufficient funds, expired card), but a handful are terminal and need a different flow entirely.
- Created → Shopify queues the attempt
- Processing → card is being charged
- Success → order created, next cycle scheduled
- Failure → error code returned, dunning starts
What happens when billing fails
A failed charge isn't the end — it's the start of dunning. Good apps retry on a schedule, email the customer with a payment update link, and pause the contract before cancelling. Bad apps cancel after the first decline and you lose a customer who just had a temporary hold on their card. The retry cadence matters: too aggressive looks spammy, too slow and the customer forgets why they signed up.
- Retry 2-3 times over 7-10 days
- Send a payment-update email after the first failure
- Pause, don't cancel, after final retry
Billing dates and anchors
By default, the next billing date rolls forward by the interval — order on the 3rd, next on the 3rd of next month. Anchored billing is different: you charge everyone on the 1st regardless of signup date, with the first cycle prorated. Anchored is cleaner for cashflow forecasting and box-of-the-month products. Rolling is simpler for replenishment. Pick one based on the product.