What Not to Build in a SaaS: Build vs Buy for Auth, Email, Analytics and Payments
By Obaid Tariq, Founder & Lead Engineer · Published
Disclosure: AI Dev Planner builds SaaS products and charges for development time, so building more would be in our commercial interest. This guide recommends building less. See our disclosure policy.
The short answer
Deciding what not to build in a SaaS is simple to state: build what makes your product different and buy what every product needs. Authentication, transactional email, payments and billing, product analytics, file storage and support chat are almost always better bought from a specialist at the MVP stage, because they carry security, deliverability or compliance risk that you would otherwise own. Build only where the feature is your differentiation, where no provider meets a real requirement, or where the cost at scale justifies it, and keep an exit path for everything you buy.
How do I decide what not to build, including authentication, email, analytics and payments?
Ask whether the feature is part of why customers choose you. If it is not, and a reputable provider does it well, buy it. Authentication, transactional email, payments and billing, and product analytics are the classic examples: each looks small but carries security, deliverability or compliance obligations that a specialist handles better. Keep your own code for the workflow that makes the product worth paying for.
Why this decision matters so much early on
In startup MVP development, every week spent on infrastructure is a week not spent on the thing customers pay for. Commodity features also tend to hide their real size. A login form is a few hours; a secure authentication system, with password resets, rate limiting, multi-factor authentication, session handling and account recovery, is weeks, and it is a security liability for as long as you maintain it. OWASP's Authentication Cheat Sheet lists the areas an implementation has to get right, including secure password storage, MFA, account recovery, throttling of login attempts, session management and error messages that do not reveal whether an account exists. A good authentication provider has done that work already. This guide is about infrastructure you can buy; for deciding which product features belong in version one, see our post on SaaS MVP planning and the SaaS MVP planning checklist.
The six decision criteria
- Differentiation. Would a customer notice, and care, if this were done differently? If not, it is a commodity: buy it.
- Risk. What happens if it is wrong? Security-sensitive features (authentication, payments, file uploads) punish small mistakes; specialists spend all their time on them.
- Compliance. Does the feature bring legal or industry obligations, such as PCI DSS for card data or consent rules for analytics cookies? Buying can shrink those obligations.
- Lock-in. How hard would it be to leave? Prefer providers that let you export your data and that use open standards where they exist (OAuth/OIDC for sign-in, SMTP for email, SQL for data).
- Cost at scale. Per-user or per-event pricing that is negligible at a hundred customers can dominate costs at a hundred thousand. Model it at ten times your expected volume, using the provider's current pricing page.
- Exit path. Before you integrate, write down how you would replace the provider. If the answer is "rewrite half the app", put an interface between your code and theirs.
A build vs buy table for common SaaS features
| Feature | MVP default | Consider building when | Watch for |
|---|---|---|---|
| Authentication | Buy: a managed auth provider or a well-maintained framework library | You have unusual identity needs and the in-house security skill to maintain them | Per-user pricing at scale; how users and password hashes can be exported; enterprise SSO (SAML) costs |
| Transactional email | Buy: an email delivery service | Rarely; even large companies use specialist senders | Domain authentication (SPF, DKIM, DMARC); separating marketing from transactional sending |
| Payments and billing | Buy: a payment provider with subscription billing, such as Stripe Billing | Complex invoiced B2B contracts, usage metering or multiple regional providers | Webhook handling, tax, and how hard it is to migrate saved payment methods |
| Product analytics | Buy: a product analytics tool, configured for consent | You need analytics as a customer-facing feature of your product | Cookie consent rules; sending personal data to a third party; event volume pricing |
| Search | Start with your database's built-in full-text search | Search quality is part of the product, or data outgrows the database | Index synchronisation and per-record pricing for hosted search |
| File storage | Buy: object storage from your cloud or hosting provider | Almost never build storage itself; do build the access rules | Private by default, signed URLs, upload size and type limits, malware scanning for shared files |
| Feature flags | A simple flag table or config in your own code | Many teams, gradual rollouts and experiments justify a dedicated service | Flags left in the code long after release |
| Admin panel | Build a minimal one, or use an internal-tool builder | Support staff need workflows the generic tools cannot provide | Admin access is a security boundary: log it and restrict it |
| Support chat and help desk | Buy: a help desk or shared inbox tool | Almost never at the MVP stage | Script weight on page performance; who sees customer data |
| Notifications (email, in-app, push) | Send email through your email service; build a simple in-app list | Many channels, user preferences and digests justify a notification service | Unsubscribe and preference handling; not over-notifying |
Authentication: the strongest case for buying
Choosing between authentication providers is mostly about where your users will sign in from and what your buyers will ask for. Check that the provider supports the methods you need (email and password, magic links, Google and Microsoft accounts), that it can add SAML or OIDC single sign-on when an enterprise buyer requires it, and that you can export users if you leave. Keep authorisation, meaning what each user is allowed to do inside each organisation, in your own code and database, because it is tightly bound to your data model. Our SaaS tech stack guide compares common options.
Payments and billing: let the specialist hold the card data
Card data is where building it yourself is most expensive. Stripe's integration security guide says that a business that handles sensitive card data directly might be required to meet more than 300 security controls in PCI DSS, and that its low-risk integrations send payment details directly to Stripe without passing through your servers, reducing your PCI obligations. Stripe Billing then adds subscriptions, invoices and retries, and Stripe's customer portal lets customers update payment methods, view invoices and change or cancel subscriptions without you building those screens. Your engineering work is connecting billing events to access rules; our guide to failed payments and dunning covers that part.
Email: deliverability is the hard part
Sending an email is easy; getting it into the inbox is not. Google's email sender guidelines require all senders to Gmail to set up SPF or DKIM, and bulk senders (more than 5,000 messages a day to Gmail accounts) to use SPF, DKIM and DMARC and offer one-click unsubscribe on marketing messages. A transactional email service handles the sending reputation and gives you logs when a password reset does not arrive. Send transactional and marketing email from separate streams or subdomains, so a marketing complaint cannot block your login emails.
Analytics: buy the tool, design the events
Product analytics tools are mature, so building your own pipeline at the MVP stage is rarely worthwhile. What you should own is the list of events, named and agreed before the build, so you can measure activation and retention. Check consent rules for your markets: in the UK, the ICO's guidance on storage and access technologies describes an exception for analytics where the sole purpose is statistics to improve your service and users are given clear information and a simple way to object, but advertising uses still need consent. EU rules differ, so take advice for your situation. For the wider picture, see our guide to GDPR and SaaS legal basics.
What you should build
- The core workflow and the data model behind it: this is the product.
- Authorisation rules: who can see and change what, in which organisation. See multi-tenant SaaS architecture.
- The glue: webhook handlers, background jobs and the logic that keeps your data consistent with providers.
- Anything a customer would describe as the reason they chose you.
When building the commodity is right
Building a commodity feature makes sense when a hard requirement rules out providers (data must stay on infrastructure you control, for example), when usage-based pricing has grown to exceed the cost of owning it including maintenance, or when the feature has become part of your differentiation. Make that decision with real usage numbers, not at the MVP stage. If you are unsure whether your current set of tools is costing more than it should, our guide to SaaS sprawl and software costs helps you audit it, and our SaaS development services team can review a build-or-buy plan before you commit.
Frequently asked questions
Should I build my own authentication for a SaaS MVP?
Usually not. Secure authentication involves password storage, rate limiting, multi-factor authentication, session management and account recovery, all of which OWASP documents as areas that are easy to get wrong. Use a managed provider or a well-maintained framework library, and keep authorisation rules in your own code.
Is Stripe Billing enough for a B2B SaaS?
For most early B2B SaaS products, yes: it covers subscriptions, invoices, retries and a hosted customer portal. Custom billing work starts to pay off with complex negotiated contracts, usage metering reconciled against your own data, or several payment providers in different regions.
How do I avoid vendor lock-in when buying SaaS features?
Check that you can export your data before you sign up, prefer open standards such as OIDC and SMTP where they exist, and call each provider through a small interface in your own code. That way switching providers is a contained change rather than a rewrite.
When should a startup build its own search?
Start with the full-text search built into your database, which is enough for many products. Move to a dedicated search service when search quality is a core part of the product, when the data outgrows what the database handles well, or when you need features such as typo tolerance and relevance tuning.
Sources
- OWASP Cheat Sheet Series: Authentication Cheat Sheet — Areas a secure authentication implementation must handle: password storage, MFA, account recovery, login throttling, session management and generic error messages. Accessed 19 October 2026.
- Stripe Docs: Integration security guide — Handling card data directly might require meeting more than 300 PCI DSS security controls; low-risk integrations send payment details directly to Stripe, reducing PCI obligations. Accessed 19 October 2026.
- Stripe Docs: Provide a customer portal to your customers — Customer portal features: update billing information and payment methods, update or cancel subscriptions, view and pay invoices. Accessed 19 October 2026.
- Google Workspace Admin Help: Email sender guidelines — All senders must set up SPF or DKIM; bulk senders (more than 5,000 messages a day to Gmail) must use SPF, DKIM and DMARC and support one-click unsubscribe. Accessed 19 October 2026.
- ICO: Guidance on the use of storage and access technologies, What are the exceptions? (UK) — UK statistical purposes (analytics) exception and its conditions, including clear information and a simple means of objecting; advertising uses still need consent. Accessed 19 October 2026.
Recommendations without a source are AI Dev Planner’s own engineering opinion. Platform features and prices change; check the linked pages for the current position. Found an error? See our corrections policy.
Related guides
- Tech Stack & ArchitectureChoosing a SaaS Tech Stack in 2026: Is Next.js, Supabase and Stripe Still the Default?When the Next.js, Supabase and Stripe default is right, when Rails, Laravel, Django or .NET fit better, and how to decide.
- Pricing, Metrics & Business ModelFailed Payments and Dunning for SaaS: Retries, Emails and Billing Edge CasesRetry schedules, dunning emails, hard declines, webhook handling and what to do when recovery fails.
- Building & Shipping ProductsHow to Build a SaaS: From Software Idea to Launched ProductThe stages from idea to launch, realistic cost and timeline, DIY vs agency, and the biggest first-SaaS mistake.
- Operations, Security & ComplianceHow to Manage SaaS Sprawl, Overlapping Subscriptions and Software CostsA practical SaaS audit: inventory, owners, usage, renewals, shadow IT, consolidation and offboarding.
Browse all 50 questions in the SaaS & web development guide.
Want a second opinion on what to build?
Send us your feature list. We will mark what we would buy, what we would build and what we would leave for later, with the reasons.