Build vs Buy: Should You Build Your Own Dunning System

Every SaaS founder hits this fork in the road: do you build your own dunning system, or do you buy one off the shelf?
It feels like a straightforward engineering decision. You already have Stripe. You know webhooks. Your team ships fast. How hard can it be to send a few retry attempts and a couple of emails when a payment fails?
Harder than you think. And more expensive, too.
The build vs buy dunning debate isn't really about code. It's about where you want your engineering hours to go, how much revenue you're willing to lose while you figure it out, and whether payment recovery is actually your core competency.
Let's break down both sides honestly, with real numbers, so you can make the right call for your business.
What a Dunning System Actually Needs to Do
Before you can evaluate build vs buy, you need to understand the full scope of what a proper dunning system handles. Most founders underestimate this by 3-5x.
Here's the minimum viable dunning system:
Payment retry logic. Not just "try again in 3 days." Smart retries need to account for decline codes, card types, time of day, day of week, and issuer patterns. A blanket retry schedule recovers 15-20% less than an optimized one.
Email sequences. Pre-dunning warnings before a card expires. Failed payment notifications. Escalation emails. Final cancellation warnings. That's 4-6 email templates minimum, each needing A/B testing and iteration.
Card update flows. When a payment fails, you need a way for customers to update their payment method without logging in, finding their billing page, and navigating your settings. A direct link to a hosted card update page converts 2-3x better than "please log in and update your card."
Cancellation and grace period management. When do you actually cancel a subscription after repeated failures? Too soon and you lose recoverable customers. Too late and you're carrying dead weight in your MRR.
Analytics and reporting. Recovery rate by decline code. Revenue recovered per email. Retry success rate by attempt number. Without this data, you're flying blind and can't improve.
Webhook processing and state management. Stripe sends events asynchronously. You need to track payment intent states, handle race conditions, manage idempotency, and deal with edge cases like partial payments, disputes, and refunds happening mid-dunning.
That's the baseline. A competitive dunning system also includes in-app notifications, SMS alerts, dynamic retry timing based on machine learning, and automatic card updater integration.

The Real Cost of Building Your Own Dunning System
Let's do the math that most "just build it" advocates skip.
Engineering Time
A senior engineer billing $150-200/hour (fully loaded cost including benefits, tooling, and management overhead) needs approximately:
- Core retry logic and Stripe webhook handling: 2-3 weeks
- Email template system with scheduling: 1-2 weeks
- Card update hosted page: 1 week
- Cancellation/grace period logic: 1 week
- Dashboard and reporting: 2-3 weeks
- Testing, edge cases, and hardening: 2-3 weeks
That's 9-13 weeks of focused engineering time. At $150/hour, you're looking at $54,000-$78,000 just for the initial build. And that's assuming your engineer has built billing systems before and doesn't need to learn the intricacies of Stripe's payment intent lifecycle, decline code taxonomy, or webhook delivery guarantees.
Ongoing Maintenance
Here's where the real cost hides. A dunning system isn't a build-once-and-forget feature. It requires:
- Stripe API updates: Stripe ships breaking changes and new features constantly. Someone needs to monitor changelogs, update integrations, and test compatibility. Budget 2-4 hours per month minimum.
- Email deliverability monitoring: Your dunning emails need to actually reach inboxes. That means monitoring bounce rates, spam scores, and deliverability across providers. When Gmail changes its filtering rules (which happens multiple times per year), you need to adapt.
- Retry logic tuning: Payment networks change. Issuer behavior shifts. What worked six months ago may not work today. Optimizing retry timing is an ongoing process, not a one-time configuration.
- Bug fixes and edge cases: Every month brings new edge cases. A customer with a prepaid card that allows partial charges. A currency conversion that causes a rounding error. A webhook that arrives out of order. Each one needs investigation and a fix.
Conservatively, ongoing maintenance runs 8-15 hours per month. That's $14,400-$36,000 per year in engineering time alone.
Opportunity Cost
This is the number that never shows up in a spreadsheet but matters the most. Every hour your engineers spend on dunning is an hour they're not spending on your core product. For an early-stage SaaS, that tradeoff can be fatal.
If your product is a project management tool, your competitive advantage is project management features, not payment retry algorithms. Your users don't care that you built an elegant dunning system. They care that your product solves their problems better than the alternative.
Total Cost of Ownership: Year One
| Cost Category | Low Estimate | High Estimate |
|---|---|---|
| Initial build | $54,000 | $78,000 |
| Year 1 maintenance | $14,400 | $36,000 |
| Opportunity cost | Hard to quantify | Significant |
| Total | $68,400 | $114,000+ |
Compare that to a dedicated dunning tool, which typically runs $50-500/month depending on your transaction volume. Even at the high end, you're paying $6,000/year vs $68,000+ to build and maintain it yourself.
The Real Cost of Buying a Dunning Solution
Buying isn't free either. Let's be honest about the downsides.
Monthly Fees
Most dunning tools charge based on your MRR or transaction volume. Typical pricing:
- $0-$10K MRR: $50-100/month
- $10K-$50K MRR: $100-300/month
- $50K-$500K MRR: $300-800/month
- $500K+ MRR: Custom pricing, usually $800-2,000/month
Over a year, that's $600-$24,000. Meaningful, but a fraction of building in-house.
Integration Time
Even with a third-party tool, you still need to integrate it. Most dunning solutions require:
- Connecting your Stripe account (usually OAuth, takes minutes)
- Configuring retry schedules and email templates (a few hours)
- Setting up your branding and custom domain for emails (1-2 hours)
- Testing the flow end-to-end (half a day)
Total integration time: 1-3 days of engineering work. Call it $1,200-$4,800.
Loss of Control
This is the legitimate concern founders raise. When you buy, you're dependent on another company's:
- Uptime and reliability. If their system goes down, your payment recovery stops.
- Feature roadmap. If you need a specific capability they don't offer, you're stuck.
- Pricing decisions. They can raise prices, change tiers, or sunset your plan.
- Data access. Your payment recovery data lives in their system. Exporting it may be limited.
These are real risks. But they're the same risks you accept with Stripe itself, your email provider, your hosting platform, and every other third-party service in your stack.

When Building Makes Sense
Despite the cost analysis, there are legitimate scenarios where building your own dunning system is the right call:
You're a payments company
If your core product IS payments or billing infrastructure, dunning is a core competency. Building it in-house gives you a competitive advantage and deeper understanding of your own domain.
You have extreme customization needs
Some businesses have genuinely unique billing models that no off-the-shelf solution handles well. Usage-based billing with prepaid credits, multi-party marketplaces with split payments, or enterprise contracts with complex payment terms might require custom dunning logic.
You're at massive scale
At $50M+ ARR with millions of transactions, the economics flip. A third-party tool charging percentage-based fees can cost more than a dedicated in-house team. At this scale, you also have the engineering resources to build and maintain a world-class system.
You have regulatory requirements
Certain industries (healthcare, finance, government) have specific compliance requirements around payment communications and data handling that may not be supported by off-the-shelf tools.
When Buying Makes Sense
For the vast majority of SaaS companies, buying is the clear winner:
You're pre-$5M ARR
At this stage, every engineering hour needs to go toward product-market fit, not billing infrastructure. A $100/month dunning tool pays for itself if it recovers even one churned customer per month.
Your team is small
If you have fewer than 10 engineers, dedicating one to billing infrastructure for 3 months is a 10% hit to your engineering capacity. That's enormous.
You want to move fast
Third-party dunning tools can be live in a day. Building your own takes months. If you're losing $5,000/month to failed payments right now, every week of delay costs you $1,250.
Payment recovery isn't your expertise
Unless you've built dunning systems before, you'll make mistakes. You'll retry at the wrong times, send emails that land in spam, and miss edge cases that a dedicated vendor has already solved. Those mistakes cost real revenue.
The Hidden Complexity Most Founders Miss
Here's what catches builders off guard: the long tail of edge cases.
Decline code handling
Stripe returns dozens of decline codes, and each one requires a different response. An "insufficient_funds" decline should trigger a retry in 3-5 days (the customer might get paid). A "stolen_card" decline should never be retried. A "do_not_honor" decline is ambiguous and needs careful handling.
Most homegrown systems treat all declines the same. That's leaving money on the table.
Timezone-aware retries
Retrying a payment at 3 AM in your customer's timezone is less likely to succeed than retrying at 10 AM on a Tuesday. Why? Because many declines are caused by temporary holds, daily spending limits, and bank processing windows that reset during business hours.
Building timezone-aware retry logic means storing customer timezone data (which you may not have), mapping it to optimal retry windows, and handling daylight saving time transitions. It's 10x more complex than a simple "retry every 3 days" cron job.
Email deliverability at scale
Your dunning emails are transactional, but many email providers treat them like marketing. If your domain reputation drops because of high bounce rates from failed payment notifications, ALL your emails suffer, including onboarding sequences, password resets, and feature announcements.
Dedicated dunning tools have spent years building relationships with email providers, warming domains, and optimizing deliverability. Replicating that from scratch is a multi-month project.
State machine complexity
A subscription in dunning can be in dozens of states: initial failure, first retry pending, first retry failed, email sent, card update link clicked, card updated but retry pending, second retry failed, grace period active, cancellation pending, cancelled, reactivated. Each state transition has business logic, side effects, and potential race conditions.
Most engineers underestimate this complexity until they're deep into the build. By then, they've already spent weeks and are committed to finishing, even when buying would have been cheaper.

A Framework for Your Decision
Here's a simple decision framework based on real-world patterns:
Build if ALL of these are true:
- Your ARR exceeds $10M
- You have a dedicated billing/payments team (2+ engineers)
- Payment recovery is a competitive differentiator for your product
- You have specific requirements no vendor can meet
Buy if ANY of these are true:
- Your ARR is under $10M
- Your engineering team is under 20 people
- You need payment recovery working within 2 weeks
- You'd rather spend engineering time on core product features
For most SaaS companies reading this article, buying is the right answer. Not because building is impossible, but because the ROI on buying is dramatically higher when you factor in time-to-value, ongoing maintenance, and opportunity cost relative to your core product.
The Hybrid Approach
There's a middle ground that some companies adopt successfully: buy a dunning tool now, plan to build later.
Start with a third-party solution to stop the bleeding immediately. Use it for 12-18 months while you gather data on your specific failure patterns, recovery rates, and customer behavior. Then, if you've grown to a scale where building makes economic sense, you have real data to inform your architecture decisions instead of guessing.
This approach gives you the best of both worlds: immediate revenue recovery today and informed engineering decisions tomorrow.
The key insight is that your payment recovery benchmarks will look completely different after 12 months of data collection. Building without that data means building on assumptions. Building with it means building on evidence.
What to Look for in a Dunning Tool
If you decide to buy (and you probably should), here's what separates good dunning tools from mediocre ones:
Smart retry logic. Not just fixed schedules, but retries optimized by decline code, card type, and historical patterns. Ask vendors about their recovery rates segmented by decline reason.
Customizable email sequences. You need full control over copy, timing, and design. Pre-built templates are fine as a starting point, but they should be fully editable.
Direct card update links. One-click links that take customers straight to a payment update page without requiring login. This single feature can double your recovery rate.
Analytics that matter. Recovery rate, revenue recovered, recovery by decline code, email open/click rates, and time-to-recovery. If a tool can't show you these numbers, it's not worth using.
Stripe-native integration. The tool should work directly with Stripe's APIs, not require you to pipe data through a middleware layer. Native integration means fewer failure points and faster setup.
Making the Decision for Your Team
The build vs buy dunning debate ultimately comes down to one question: is payment recovery a core competency that differentiates your business, or is it infrastructure that should just work?
For 95% of SaaS companies, it's infrastructure. You don't build your own email delivery system, your own CDN, or your own payment processor. Dunning falls into the same category: critical infrastructure that specialists handle better than generalists.
The math supports this. The time-to-value supports this. The opportunity cost supports this.
Stop losing revenue to failed payments while you debate whether to build or buy. Pick a tool, integrate it this week, and get back to building the product your customers actually pay for.
Take the First Step
Not sure how much revenue you're losing to failed payments right now? Before you make any build vs buy decision, you need to know the size of the problem.
Run a free churn audit to see exactly where your Stripe account is leaking revenue. It takes two minutes, and it'll give you the data you need to make an informed decision about your dunning strategy.
Related Posts



How healthy is your Stripe account?
Get a free churn health report. Find pending cancellations, failed payments, and expiring cards putting your MRR at risk.
Run Free Audit