Billing Object Model
Core objects that power subscription billing and invoicing.
The service or goods you sell (e.g., "Pro Plan")
Customer-facing package with access rules, billing cadence, and invoice behavior
Amount and billing interval (e.g., NPR 2,500/month)
Recurring billing relationship with a customer
Bill sent to customer for payment
Line item on an invoice
Verified provider payment state for an invoice
Subscription Lifecycle
From signup to renewal, managed billing handles the complete customer lifecycle.
Subscription created
Customer subscribes to a plan
Trial period (optional)
14-day free trial
First invoice generated
Invoice created at trial end
Payment attempted
Automatic payment via saved method
Subscription active
Access granted to customer
Next billing cycle
Invoice generated, payment attempted
MRR
NPR 245,000
Active Subs
124
Export billing data for accounting systems. Revenue recognition ready.
Automatic retry schedule for failed invoice payments.
Subscriptions
Example subscription records with various statuses.
| Subscription ID | Customer | Plan | Status | MRR | Next Bill |
|---|---|---|---|---|---|
| sub_abc123 | CUS-8821 | Pro Monthly | active | NPR 2,500 | Jun 15, 2024 |
| sub_def456 | CUS-9912 | Team Annual | active | NPR 8,000 | Dec 1, 2024 |
| sub_ghi789 | CUS-7743 | Pro Monthly | trialing | NPR 2,500 | Jun 20, 2024 |
| sub_jkl012 | CUS-6654 | Starter | past due | NPR 1,000 | Overdue |
| sub_mno345 | CUS-5565 | Pro Monthly | canceled | — | — |
Invoices
Example invoice records with payment status tracking.
| Invoice ID | Customer | Amount | Status | Due Date | Paid Date |
|---|---|---|---|---|---|
| inv_2024_0042 | CUS-8821 | NPR 2,500 | invoice paid | Jun 1, 2024 | Jun 1, 2024 |
| inv_2024_0041 | CUS-9912 | NPR 8,000 | invoice open | Jun 15, 2024 | — |
| inv_2024_0040 | CUS-6654 | NPR 1,000 | past due | May 28, 2024 | — |
| inv_2024_0039 | CUS-7743 | NPR 2,500 | invoice paid | May 20, 2024 | May 19, 2024 |
Billing Webhooks
Real-time notifications for billing lifecycle events.
subscription.created
New subscription started
subscription.updated
Subscription plan changed
subscription.canceled
Subscription canceled
invoice.created
New invoice generated
invoice.paid
Invoice payment successful
invoice.payment_failed
Invoice payment failed