Automated Subscription Billing
Build and scale your subscription business with MAGNETPAY. Our subscription billing platform handles recurring payments, trial management, dunning retries, usage-based metering, and revenue analytics through a single API integration.
Complete Subscription Billing Toolkit
Everything you need to manage subscription billing at scale, from product catalog to revenue recognition.
Recurring Payment Engine
Automatically charge customers on any schedule: weekly, monthly, quarterly, or annual. Our billing engine handles proration, mid-cycle changes, and timezone-aware scheduling.
Trials & Grace Periods
Offer free trials with automatic conversion to paid plans. Configure grace periods for failed payments before subscription cancellation. No code changes needed.
Coupons & Promotions
Create percentage or fixed-amount coupons with usage limits, expiry dates, and plan restrictions. Apply at checkout or via API for automated promotional campaigns.
Smart Dunning & Retries
Configurable retry schedules for failed payments with exponential backoff. Card updater integration automatically refreshes expired card details before they fail.
Usage-Based Billing
Report usage events via API and bill customers based on consumption. Support for tiered, volume, and per-unit pricing models with real-time metering.
Lifecycle Webhooks
Receive webhooks for every subscription event: created, renewed, past_due, canceled, resumed, trial_ending. Build automated workflows around the full subscription lifecycle.
How Subscription Billing Works
Set up your first subscription billing flow in minutes. Define products, subscribe customers, and let the billing engine handle the rest.
Define Products & Prices
Create products with one or more price variants. Each price can have a different billing interval, currency, and pricing model (flat, tiered, per-unit, or usage-based).
Create Subscriptions
Subscribe customers to a price with optional trial periods, coupons, and metadata. The billing engine schedules the first charge automatically.
Automatic Billing & Dunning
Invoices are generated and charged automatically on each billing cycle. Failed payments trigger your dunning schedule with retries, notifications, and escalation.
Analytics & Revenue Recognition
Track MRR, churn rate, LTV, and expansion revenue in real-time. Export data for accounting with proper revenue recognition aligned to ASC 606.
Subscription Billing API in Action
Create a subscription with a trial period and coupon in a single API call.
curl -X POST https://api.magnetpay.org/v1/subscriptions \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"customer": "cus_9f3kR2xL",
"price": "price_pro_monthly",
"trial_period_days": 14,
"coupon": "LAUNCH25",
"payment_method": "pm_card_visa_4242",
"billing_cycle_anchor": "2026-04-01T00:00:00Z",
"metadata": {
"plan_tier": "pro",
"onboarding_source": "website"
}
}'{
"id": "sub_4xNm8kPq",
"object": "subscription",
"status": "trialing",
"customer": "cus_9f3kR2xL",
"price": {
"id": "price_pro_monthly",
"amount": 4900,
"currency": "usd",
"interval": "month"
},
"trial_start": "2026-03-25T00:00:00Z",
"trial_end": "2026-04-08T00:00:00Z",
"current_period_end": "2026-05-01T00:00:00Z",
"discount": {
"coupon": "LAUNCH25",
"percent_off": 25
}
}Subscription Billing FAQ
What is subscription billing?
Subscription billing is the automated process of charging customers on a recurring basis for products or services. MAGNETPAY's subscription billing platform handles the entire lifecycle including plan management, trial periods, recurring charges, failed payment retries (dunning), coupons, proration for plan changes, and usage-based metering. It eliminates the need to build and maintain billing logic in-house.
How does dunning management work?
Dunning is the process of retrying failed subscription payments. When a charge fails, MAGNETPAY automatically retries according to your configured schedule (e.g., retry after 1 day, 3 days, 7 days). Between retries, we attempt to update expired card details via card network updaters. You can configure email notifications to customers, grace periods before cancellation, and webhook alerts for your team at each stage.
Does MAGNETPAY support usage-based billing?
Yes. MAGNETPAY supports usage-based (metered) billing where you report consumption events via API throughout the billing period, and we calculate the charge at cycle end. Supported pricing models include per-unit (flat rate per event), tiered (price decreases at volume thresholds), volume (all units priced at the tier they reach), and graduated (each tier priced independently).
Can I offer free trials with automatic conversion?
Yes. When creating a subscription, you can specify a trial period in days. During the trial, no charges are made. At trial end, the subscription automatically converts to a paid plan and the first charge is processed. You receive a trial_ending webhook 3 days before conversion, giving you the opportunity to notify the customer or adjust the plan.
How are mid-cycle plan changes handled?
MAGNETPAY supports proration for mid-cycle upgrades and downgrades. When a customer changes plans, we calculate the unused portion of the current plan as a credit and apply it to the new plan's prorated charge. You can configure proration behavior to charge immediately, at next billing date, or to create a prorated invoice. Downgrades can be set to take effect immediately or at period end.
Related Payment Features
Launch Your Subscription Business
From SaaS to memberships, MAGNETPAY subscription billing handles the complexity so you can focus on growth. Start with our free tier.