Case Study

Billing & Subscription Management Platform for a SaaS Company

A growing SaaS (software as a service) company was managing subscriptions and billing through a patchwork of spreadsheets and a basic payment gateway, causing billing errors and a steady stream of support tickets. DXDasia built a custom billing platform that cut billing support tickets 40%.

Key result

40% Reduction in Billing-Related Support Tickets

Custom Billing & Subscription PlatformPayment Gateway IntegrationDunning & Retry AutomationUsage-Based Billing LogicCustomer Self-Service Portal
Person reviewing a billing dashboard on a laptop by candlelight

The challenge

Subscription billing was handled through the payment gateway’s basic tools plus manual spreadsheet tracking for plan changes, upgrades, and cancellations — a process that didn’t scale as the customer base grew.

  • Plan upgrades and downgrades required manual intervention, often with billing errors
  • Failed payments had no automated retry process, leading to avoidable churn
  • Customers had no self-service way to view invoices or update payment details
  • Usage-based pricing tiers were calculated manually each billing cycle

Our approach

We built a dedicated billing and subscription platform designed around the company’s actual pricing model, replacing manual processes with automated, auditable workflows.

  • Automated plan upgrade/downgrade handling with correct prorated billing
  • Dunning automation with a structured retry sequence for failed payments before cancellation
  • Self-service customer portal for invoices, payment methods, and plan changes
  • Automated usage-based billing calculation replacing the manual monthly process

The outcome

Replacing manual billing processes with automated workflows changed both the customer experience and the internal workload:

  • 40%reduction in billing-related support tickets
  • Failed-payment recovery improved meaningfully through automated dunning
  • Billing errors on plan changes dropped close to zero with automated proration
  • Finance team freed from manual usage-based billing calculations every cycle
  • Customers self-serve invoice and payment updates instead of emailing support
Want results like this for your business?Tell us what you need. You get a free plan and a fixed quote within one business day.

Why it worked

Billing is one of the few product experiences that touches every single customer, every single cycle — so errors and friction there compound faster than almost anywhere else in a SaaS product. Automating the parts that were previously manual removed both the errors they were causing and the support burden those errors created.

The technical approach

The platform integrates directly with the existing payment gateway rather than replacing it, adding the subscription logic, proration calculations, and dunning automation the gateway didn’t provide out of the box. Usage-based billing pulls consumption data directly from the product’s own event logs rather than a separate manually-maintained tracking sheet, so the numbers billed always match actual usage. The dunning sequence was tuned specifically to the company’s customer base — timing and messaging for retry attempts were adjusted based on when payments were actually recovering, not a generic best-practice default.

Tech Stack: React, Node.js, PostgreSQL, Stripe Billing API (application programming interface), webhook-driven event architecture for real-time usage syncing.

Should a SaaS company build its own billing platform or rely on its payment gateway?

Most subscription businesses start on their payment gateway's built-in tools, and many never need more. This section uses the gateway's own documentation to show what those tools cover, where the gaps tend to appear, and what to weigh before building. It describes the problem domain, not any one company's results.

What do gateway tools already handle?

Stripe's documentation is a useful reference because it is explicit. Its Smart Retries default to 8 tries within 2 weeks, configurable from 1 week to 2 months, but Stripe does not retry hard declines or India-issued cards. Its revenue recovery tools also include customer emails and automatic card updates. For usage-based pricing, Stripe now says new integrations should start with Metronome rather than basic Meters, while existing Meters setups remain supported.

Where do the gaps appear?

Proration is the first. Stripe calls it the most complex aspect of changing subscriptions: a mid-period upgrade from a 10 to a 20 plan bills an extra 5, calculated to the second by default, and negative prorations are not automatically refunded. In Stripe's own example, the same sequence of plan changes gives a net credit of 3.34 under its classic billing mode and a zero-total invoice under flexible mode, so the rules you pick change what customers see.

Events are the second. Stripe warns that webhook endpoints may receive the same event more than once, events can arrive out of order, and delivery is retried for up to three days. It recommends logging processed event IDs and handling events through an asynchronous queue, since renewal days create spikes.

Regulation is the third. For India, the RBI's e-mandate rules, as documented by Stripe, require a pre-debit notification at least 24 hours before charging and additional authentication each time for recurring amounts over INR 15,000, and without a mandate an off-session payment is declined.

When does building make sense?

A custom layer is worth considering when pricing rules are unusual, billing errors are driving support contacts, or finance spends each cycle on manual calculation. It sits on top of the gateway rather than replacing it, which keeps card handling with the processor. A custom web application for subscription logic, invoices and a customer portal then carries your rules. If a standard plan model fits, configure the gateway instead.

Billing taskWhat the gateway documentsGap to plan for
Failed paymentsSmart Retries; no retry on hard declinesDunning messages and a route to a new payment method
Plan changesProration to the second; preview availableChoosing and testing rules for downgrades and unpaid invoices
Usage billingMeters; Metronome for new buildsA trusted usage source and reconciliation
Indian cardsE-mandate, 24-hour notice, extra authenticationCustomer messaging and delayed collection
EventsDuplicates and disorder possibleIdempotent, queued handlers

Gateway behaviour per Stripe documentation, and the work that usually remains. Other gateways differ.

How can you apply this approach in your own business?

Build only what your gateway cannot do. These steps help you find that line before committing to a custom platform.

  1. Write your pricing rules down List plans, add-ons, usage tiers, proration, tax and cancellation rules in plain language. If a rule cannot be written, it cannot be automated reliably.
  2. Test the gateway against your edge cases Use proration previews and a sandbox to run upgrades, downgrades and unpaid-invoice changes. Only gaps that remain justify custom work.
  3. Treat webhooks as unreliable by design Store event IDs, process through a queue and tolerate out-of-order arrival. This belongs in any SaaS product that touches money.
  4. Tune dunning with your own data Record when failed payments actually recover, then set retry timing and wording from that. Hard declines need a new payment method, not another retry.
  5. Meter usage from one source of truth Bill from the product's own event log, make events idempotent, and reconcile totals before invoices finalise. Workflow automation can run those checks every cycle.
  6. Offer self-service and measure tickets A portal for invoices and payment methods removes routine contacts. Categorise billing tickets monthly, and keep the system maintained through application support.

Looking ahead

With billing now running reliably in the background, the company is exploring additional pricing models (usage tiers, add-ons) that would have been difficult to support under the old manual process but are now a configuration change rather than a rebuild. The self-service portal is also reducing time-to-resolution for the billing questions that do still reach support, since customers arrive with account context already visible instead of starting from scratch.

Frequently asked questions

Can I rely on Stripe's built-in retries instead of building dunning?

For many businesses, yes. Smart Retries need no code and default to 8 tries within 2 weeks. They do not retry hard declines or India-issued cards, so you still need customer emails or a self-service route to update a payment method. Build custom dunning only if recovery data shows a gap.

How does proration work when a customer changes plan mid-cycle?

The customer is credited for unused time on the old plan and charged for remaining time on the new one. Stripe's example: moving from a 10 to a 20 monthly plan halfway through bills an extra 5. Stripe calculates to the second by default and lets you preview the invoice first.

Why do recurring payments on Indian cards behave differently?

RBI rules require customers to register an e-mandate with additional authentication and to receive a pre-debit notification at least 24 hours before each charge. Recurring payments above INR 15,000 need authentication every time. Stripe documents that card charges are therefore delayed by 26 hours and are declined without a mandate.

Are webhook events reliable enough to drive billing?

They are reliable if you design for their limits. Stripe says events can be delivered more than once and not in order, and retries run for up to three days. Log event IDs, process asynchronously, and fetch the current object from the API when order matters.

Sources

  1. Stripe Docs: Automate payment retries (Smart Retries)
  2. Stripe Docs: Revenue recovery
  3. Stripe Docs: Prorations
  4. Stripe Docs: Usage-based billing
  5. Stripe Docs: Receive Stripe events in your webhook endpoint
  6. Stripe Docs: India recurring payments

More case studies

Get Started

Want results like this?

Get a Free Proposal →