To the customer, a subscription looks like the same payment on the same date every month. Behind it sit plan changes, usage-based amounts, declined cards, cancellations and refunds. Subscription billing software is the layer that runs recurring charging through all of these cases, producing the right amount at the right time and exactly once. Spreadsheets and manual invoicing work until you pass a few hundred subscribers; after that, errors and lost revenue grow quietly.
This guide explains what subscription billing software does, the pricing models, the billing cycle, day-based proration on plan changes, the retry schedule for failed payments, cancellation and refunds, preventing duplicate invoices, e-invoice and accounting links, and a six-step setup. All figures are illustrative; they are not any provider's rates or an industry average.
What Is Subscription Billing Software?
Subscription billing software manages plan and price definitions, subscription records, periodic invoice generation, payment attempts and the hand-off to accounting. It does not just take a payment and stop; at the end of every period it answers "how much does this customer owe for this period?" and carries the result into the invoice, the collection queue and the reports.
This article covers only the billing engine. The subscription business model itself (SaaS, multi-tenant design, pricing strategy) is in our guide to what SaaS is, and the value of a subscriber over time is in our customer lifetime value guide. Here the topic is the infrastructure that makes those numbers trustworthy.
We recommend: Our custom software service
What Are the Subscription Pricing Models?
There are four basic models, and most products combine them. The model you choose directly sets how complex the billing engine must be.
| Model | How it works | Billing requirement |
|---|---|---|
| Flat fee | A fixed amount per plan per period | Simple; the real work is plan changes and collection |
| Per seat | Active users × unit price | Seat count changes during the period must be tracked |
| Usage-based | Metered units × unit price | Usage events must be collected and priced at period end |
| Tiered | Unit price falls as usage rises | Graduated versus volume pricing must be defined explicitly |
| Hybrid | Fixed base fee + usage | Both calculations combined on one invoice |
Two calculation styles get confused in tiered pricing. Example (illustrative): the first 1,000 units cost ₺2, the next 4,000 cost ₺1.5, anything above costs ₺1. A period with 8,000 units of usage gives:
- Graduated: 1,000 × ₺2 = ₺2,000; 4,000 × ₺1.5 = ₺6,000; the remaining 3,000 × ₺1 = ₺3,000. Total ₺11,000.
- Volume: all 8,000 units are priced at the ₺1 rate of the tier reached: 8,000 × ₺1 = ₺8,000.
The same usage differs by ₺3,000 between the two methods, so the contract and the invoice must say which one applies. In a hybrid model, adding a ₺500 fixed base makes the graduated total ₺11,500.
How Do the Billing Cycle and the Subscription Lifecycle Work?
Every subscription moves through states, and each state makes the billing engine behave differently. Defining states explicitly removes the ambiguity from "should this subscriber be billed right now?"
| State | Meaning | Billing behavior |
|---|---|---|
| Trial | Free period with a limited length | No invoice; moves to the first invoice on the end date |
| Active | Payments are current | An invoice is generated at the start of each period |
| Past due | Collection failed, retries running | Invoice stays open; the retry schedule runs |
| Suspended | Retries exhausted | Service is restricted; new invoicing follows a set rule |
| Canceled | The customer left | Ends at period end or immediately; remaining value follows the refund rule |
The decision point in a trial is whether to collect card details upfront. If you do, collection starts automatically when the trial ends and conversion is often higher, but disputes and refund requests can rise too. Test which approach suits your product with a small experiment.
How Is a Prorated Invoice Calculated When a Plan Changes?
When a plan changes mid-period, the unused days of the old plan become a credit, the remaining days of the new plan become a charge, and the difference is invoiced. This calculation is called proration.
Example (illustrative): the Basic plan is ₺600/month, the Pro plan ₺1,500/month, and the period is 30 days. The customer uses 10 days, then upgrades to Pro at the start of day 11, with 20 days remaining.
| Scenario | Old plan credit | New plan charge | Result |
|---|---|---|---|
| Upgrade: Basic → Pro, 20 days left | 600 × 20 ÷ 30 = ₺400 | 1,500 × 20 ÷ 30 = ₺1,000 | ₺600 is collected now |
| Downgrade: Pro → Basic, 15 days left | 1,500 × 15 ÷ 30 = ₺750 | 600 × 15 ÷ 30 = ₺300 | ₺450 balance is deducted from the next invoice |
After the downgrade the next period's invoice becomes ₺600 − ₺450 = ₺150. To cut complexity, some businesses apply upgrades immediately and downgrades at the start of the next period; that is a valid choice as long as the rule is stated on the invoice and in the contract. Whether the day count uses the actual days of the month or a fixed 30 must also be a written rule; otherwise the same change produces a different amount depending on the month.
How Do You Handle Failed Payments? What Is Dunning?
Dunning is the process of recovering a failed payment through automatic retries and customer notices. A declined payment is not always a cancellation request; it is often a limit, an expired card or a temporary bank decline.
The first job is separating the causes. For temporary causes (limit, temporary decline) a retry makes sense. For permanent causes (card canceled, account closed) retrying is pointless; send the customer a card update link instead. The reason arrives in the payment provider's response code, and the meaning of codes is read from the provider's documentation.
| Day | Step | Example recovery (out of 80 failed subscriptions) |
|---|---|---|
| 0 | First attempt fails; customer is notified | 80 subscriptions open |
| 3 | Second attempt | 24 recovered (30%); 56 left |
| 7 | Third attempt + card update link | 14 recovered (25%); 42 left |
| 14 | Final attempt + last warning | 6 recovered; 36 left |
| 15 | Suspend or cancel | 36 subscriptions lost involuntarily |
The schedule is shortened or lengthened to fit the product: short for a critical service, longer for a hobby product. Notices should give the customer one link for what to do. For messaging consent and personal data, consult your legal counsel.
How Do Cancellation and Refunds Affect Billing?
Cancellation comes in two forms: cancellation at period end and immediate cancellation. With period-end cancellation the customer keeps using what they paid for and no new invoice is issued; with immediate cancellation the remaining days need a refund or credit.
The math is clear on an annual plan. Illustrative example: ₺12,000 was paid for a year and the customer cancels after 4 months. The unused time is 12 − 4 = 8 months, so the refund is 12,000 × 8 ÷ 12 = ₺8,000. When a refund is granted, and withdrawal and consumer rights, depend on the contract and the law; consult your legal counsel. The billing engine should create the refund as a separate record and never delete the original invoice, so the accounting trail stays intact.
How Do You Prevent Duplicate Invoices?
The periodic billing job can run twice after a server error or a restart. The safeguard is to give every invoice a unique key made of the subscriber and the period, and to keep that key unique in the database (idempotency).
Example: 2,000 subscribers are billed an average of ₺900 a month, so monthly invoice volume is ₺1,800,000. Without a key, if the job runs twice, you get 2,000 duplicate invoices and ₺1,800,000 of excess accrual. If the key, such as subscriber-1042-2026-12, is kept unique, the second run hits the same record and creates no new invoice. The same logic applies to payment attempts; a retried charge should be sent with the same request ID. For the same protection in event-driven flows, see the duplicate-event protection in our webhook guide.
How Do You Set Up Invoice and E-Invoice Integration?
Each period's invoice must become a legally compliant document regardless of payment. The billing engine calculates the amount and the lines; the e-invoice integration creates the document in its official format and delivers it.
- Issue timing: Whether to invoice at the start of the period, at payment, or after usage depends on accounting policy; ask your accountant.
- Status write-back: Delivery status and identifiers such as the ETTN must return to the invoice record; documents that error must be visible in a list.
- Cancellation and refunds: Generate a corrective document instead of deleting; the procedure depends on Turkish Revenue Administration rules and your accountant.
- Customer ledger: Collected and open amounts must flow to the customer account.
Legal thresholds and document types are not given as numbers here; our e-invoice integration guide explains the technical flow, while the tax authority and your accountant explain the rules. For tracking receivables, see our customer account tracking guide.
How Is Subscription Revenue Recognized and Reported?
Cash collected and recognized revenue are not the same thing. A fee paid annually upfront becomes revenue as the service is delivered; the part not yet delivered waits as deferred revenue.
Illustrative example: ₺12,000 of annual fees were collected at the start of January. Monthly recognized revenue is 12,000 ÷ 12 = ₺1,000. At the end of March, recognized revenue is 3 × 1,000 = ₺3,000 and deferred revenue is 12,000 − 3,000 = ₺9,000. Recording rules and tax effects are your accountant's domain; the software's job is to produce a traceable view of how much was recognized in which period.
Monthly recurring revenue (MRR) is also computed from these records: 2,000 subscribers × ₺900 = ₺1,800,000, and the annual equivalent (ARR) is ₺21,600,000. These numbers are right only if invoice records are right; duplicate invoices or unrecovered payments distort MRR.
How Do You Calculate the Payback of Dunning?
The most measurable gain from a billing engine is recovering failed payments. Illustrative assumptions: 2,000 subscribers, an average monthly fee of ₺900, and 4% of collection attempts failing.
- Failed subscriptions: 2,000 × 4% = 80; revenue at risk 80 × ₺900 = ₺72,000.
- No dunning, manual follow-up only (15% recovered): 80 × 15% = 12 recovered; 68 lost, 68 × ₺900 = ₺61,200.
- Automated dunning (the schedule above): 24 + 14 + 6 = 44 recovered (55%); 36 lost, 36 × ₺900 = ₺32,400.
- Difference: ₺61,200 − ₺32,400 = ₺28,800 of monthly revenue.
With an investment of ₺240,000 (billing engine, dunning flow, integration) and running cost of ₺6,000 a month, monthly net gain is 28,800 − 6,000 = ₺22,800, and payback is 240,000 ÷ 22,800 ≈ 10.5 months. If the recovery gain halves to ₺14,400, net becomes ₺8,400 and payback stretches to 240,000 ÷ 8,400 ≈ 28.6 months. So measure your own failed-payment rate first. The calculation is conservative because it ignores the later months of revenue from a lost subscription; the real cost of a loss is higher (see the lifetime value guide).
| Item | Manual follow-up | Automated dunning |
|---|---|---|
| Subscriptions recovered (of 80) | 12 | 44 |
| Subscriptions lost | 68 | 36 |
| Monthly revenue lost | ₺61,200 | ₺32,400 |
| Monthly difference | — | ₺28,800 |
| Payback (₺240,000; running ₺6,000/month) | — | ≈ 10.5 months |
How Do You Set Up a Subscription Billing System?
A six-step path forces you to deal with the unavoidable edge cases up front.
- Plan and price model: Write down plans, unit prices and the tier rule (graduated or volume).
- Invoice rules: Define the period, issue timing, proration, day-count rule and tax lines.
- Collection: Connect the payment provider; set up unique request IDs and response code handling.
- Dunning: Decide the retry schedule, customer messages and suspension rule.
- E-invoice and accounting: Link the invoice to the document and the payment to the ledger; make the error queue visible.
- Monitoring: Track failed-payment rate, recovery rate, duplicate invoice count and MRR monthly.
During setup, customer-facing screens and permissions also need clarity; for a structure where subscribers view invoice history and update cards themselves, see our customer portal guide. For protecting payment data and authenticating API calls, our API security guide is useful.
What Are Common Mistakes in Subscription Billing?
- Coding before writing the rules: If proration, day count and tier style are not written down, every developer interprets them differently.
- Billing jobs without a unique key: A restart produces duplicate invoices.
- Treating every failed payment the same: Retrying a card declined for a permanent reason wastes time and goodwill.
- Deleting a canceled invoice: The accounting trail disappears; produce a corrective record instead.
- Confusing cash with revenue: If an annual upfront payment is counted entirely as that month's revenue, reports mislead.
- Not measuring failed payments: You cannot make an investment decision on a problem whose rate you do not know.
We recommend: What is SaaS? Subscription model, multi-tenant architecture and metrics
We recommend reading: What Is Appointment Booking Software? Calendar Model, Double-Booking Prevention, No-Show Rate and Payback Guide
We recommend reading: How to Analyze and Prevent Customer Churn: NRR, Early-Warning Score and Action Decision Guide
We recommend reading: How to Manage API Keys, Quotas and Usage Plans: Key Lifecycle, Rate Limits and Usage Billing Guide
We recommend reading: How to Price and Package a SaaS Product: Value Metric, Tiers, Discounts and Price Testing Guide
Custom Software and Integration with İnovabil
At İnovabil our focus is building bespoke software from scratch for your company: custom software, ERP, CRM, e-commerce, web, mobile and integration. We do not claim to have a ready-made subscription billing product; NetKasam is among our own SaaS products. If your billing rules are specific enough that ready-made tools cannot cover them, we suggest addressing plans, proration, collection and e-invoice flows in writing during requirements analysis.
We built CRM, purchasing and mobile for Avcılar İnşaat; a purchasing system for İZBAN; logistics and shipment planning with wholesale order management for Karyak; and warehouse management plus a complaint and support management system for Sleepy. Share your pricing model and subscriber count briefly and we will put together an assessment with you.
We recommend: Our software development process: from analysis to launch, step by step
Frequently Asked Questions
What is subscription billing software?
It is software that manages plan and price definitions, periodic invoice generation, payment attempts and the hand-off to accounting. It bills the right amount, at the right time, exactly once each period.
How is a prorated invoice calculated?
The unused days of the old plan count as a credit, the remaining days of the new plan as a charge, and the difference is invoiced. In the example, moving from Basic ₺600 to Pro ₺1,500 with 20 days left gives a credit of ₺400, a charge of ₺1,000 and ₺600 due.
What is dunning and why does it matter?
It is the process of recovering a failed card payment through automatic retries and customer notices. In the example, 44 of 80 failed subscriptions are recovered, and the monthly difference against manual follow-up is ₺28,800.
How do you prevent duplicate invoices?
Give every invoice a unique key made of the subscriber and the period, and keep that key unique in the database. Even if the job runs again, it hits the same record and produces no second invoice.
How does e-invoicing work with subscription billing?
The billing engine calculates the amount and the lines; the e-invoice integration creates the document in its official format, delivers it and writes the status back. For issue timing, cancellation and refund procedures, consult your accountant and the tax authority rules.