Skip to content
SaaS Development11 June 2026 · 7 min readUpdated 11 October 2026

GDPR Compliance for B2B SaaS in 2026: Practical Architecture

GDPR compliance for B2B SaaS is an architecture problem: data inventory, right-to-erasure flows, access and portability requests, residency and sub-processors, built in code.

GDPR Compliance for B2B SaaS in 2026: Practical Architecture

What you'll learn

  • What does "GDPR in code" mean for a B2B SaaS?
  • How do you build a right-to-erasure flow?
  • How do you handle access and portability requests at scale?
Article contents

If your first enterprise security questionnaire is coming and your GDPR setup is a privacy policy plus a cookie banner, start with one action: list every system that stores a user's email address and check whether you can delete or export it from each. That list is the map every other GDPR task depends on.

GDPR compliance for B2B SaaS is an architecture problem more than a policy one. Each data-subject right needs a code path that runs without a person copying data by hand, and each vendor that touches personal data needs a contract and an entry on a list. This post covers erasure, access and portability requests, residency, and sub-processors, with code where it helps. It isn't legal advice, so have counsel confirm the points that depend on your contracts and your role.

DLA Piper's January 2026 survey reports an average of 443 breach notifications per day across the jurisdictions it covers in 2025, up 22% from 363 the year before, and cumulative fines of EUR 7.1 billion since May 2018. Regulators are busy, and your customers' procurement teams read the same numbers.

What does "GDPR in code" mean for a B2B SaaS?

It means every data-subject right, such as erasure, access and portability, has a dedicated code path that works across all the places personal data lives, not just your main users table.

Overhead view of a grid of small concrete cubes on a warm beige surface, all connected by converging cyan wires to a single glowing cyan node at the center, representing a personal data map

Take one email address. It sits in your users table, and probably also in your email platform, your support tool, your audit logs, your payment provider, your analytics or warehouse, and your server access logs. A "delete account" button that sets is_deleted = true on one table leaves the other locations untouched. Multi-tenant SaaS adds a layer: tenant isolation keeps customers apart, but each tenant's end-user data still spreads across shared infrastructure.

Start with a data inventory

The foundation is a literal mapping of every data type to every table, integration, backup and log. This is my recommendation rather than a legal rule, but every flow below depends on it: without the map you build erasure against a system you can't fully see. A spreadsheet with four columns (data type, location, purpose, who can delete it) is enough to begin.

Why a surface layer isn't enough

A concrete cube with its lid face partially lifted open, revealing empty darkness inside, with a small cyan sphere beside it on a warm beige surface, representing hidden compliance gaps beneath a surface layer

Consider a hypothetical team that ships fast, gains paying customers and then moves upmarket. The first enterprise questionnaire asks for a data processing agreement covering all sub-processors. The team lists the two vendors it remembers, and procurement returns with questions about the analytics, error-tracking and logging tools an engineer added months earlier. Nobody did anything wrong; sub-processor management simply wasn't part of how tools got adopted. The fix is procedural and architectural at once: before a tool that touches personal data reaches production it gets a DPA and a security review, and the data inventory tells you which tools are in scope.

How do you build a right-to-erasure flow?

Use two-phase deletion: hide the user immediately with a soft delete, then hard-delete on a schedule that finishes well inside the legal deadline, and handle every system outside the database separately.

A vertical concrete plate with a narrow slot, a bright cyan sphere balanced in the slot opening, set against a warm beige backdrop with geometric paper forms in shadow, representing a scheduled erasure mechanism

Article 17 gives the data subject the right to erasure "without undue delay" where its grounds apply, and Article 12(3) sets one month from receipt as the outer limit for acting on the request, extendable by two further months for complex or numerous requests if you tell the person within the first month. So a long "grace period" before hard delete is a design choice you must be able to justify. The pattern below uses a short one.

Phase 1, soft delete on request:

ALTER TABLE users ADD COLUMN deleted_at TIMESTAMPTZ;
ALTER TABLE users ADD COLUMN hard_delete_at TIMESTAMPTZ;

UPDATE users
SET deleted_at = NOW(),
    hard_delete_at = NOW() + INTERVAL '7 days'
WHERE id = $1;

Once deleted_at is set, add WHERE deleted_at IS NULL to every user-scoped query so the person disappears from the product at once. Phase 2, a scheduled hard delete:

-- Run nightly via pg_cron or an external scheduler
DELETE FROM users WHERE hard_delete_at < NOW();

Foreign keys with ON DELETE CASCADE propagate the deletion to related tables. Audit those relationships before building the job, because orphaned rows in appointments, invoices or consent records are both a compliance gap and an integrity bug.

What the database pattern doesn't cover

  1. Email and analytics platforms: call their contact-deletion or data-deletion endpoints as part of the same job.
  2. Payment provider records: Stripe's delete-customer API permanently deletes the customer object, cancels active subscriptions and removes card details, while deleted customers can still be retrieved to track history. Check your accounting retention duties first; Article 17(3) lists legal obligations and legal claims among the exceptions to erasure, and which records that covers is a question for your accountant or counsel.
  3. Backups: Article 17 doesn't mention backups, so document your backup retention window and how deleted data ages out, and tell customers what it is.
  4. Your role: when you act as a processor for business customers, erasure requests usually arrive through the customer, and your product needs an endpoint or admin action that executes them on instruction.

Log every erasure: timestamp, subject identifier and the hard_delete_at date. That log is your evidence when an auditor asks whether a specific person's data was removed. For the audit-trail schema itself, see audit logs for B2B SaaS.

How do you handle access and portability requests at scale?

Automate the export for the stores that hold most of the data, and treat the one-month response limit as a hard deadline. Manual email handling works for a handful of requests and breaks when volume grows.

Article 12(3) applies the one-month limit, with the two-month extension described above, to requests under Articles 15 to 22. For portability, Article 20 requires data the person provided to be delivered in a "structured, commonly used and machine-readable format", and it applies where processing is based on consent or contract and carried out by automated means. A SAR is broader than portability, so design the export for access first.

A workable growth-stage flow has five steps:

  1. An intake form creates a ticket and records the date received.
  2. A backend job queries the application database for everything tied to the user ID.
  3. Connectors pull analytics events and support history.
  4. Sub-processors that hold their own copy are asked for an export.
  5. A person reviews the assembled JSON, then delivers it securely.

Design the export schema before your first request: a flat JSON with profile, activity and preferences is far easier to build calmly than under a countdown. Full automation is overkill at ten requests a month; manual handling is a liability at several hundred.

What do data residency and sub-processors require?

GDPR doesn't require EU-only hosting, but it does require safeguards when personal data leaves the EU and a contract chain covering every sub-processor. Residency is therefore mostly documentation plus vendor configuration.

Article 46 allows a transfer to a third country only if the controller or processor has provided appropriate safeguards, and lists standard data protection clauses adopted by the Commission among them. Enterprise buyers often ask where data lives and which legal entities can access it, so make your answers match your real setup.

RequirementWhat to implement
Database regionChoose an EU region at your cloud provider and state it in your DPA
BackupsKeep backups in the same region and document retention
Sub-processor optionsConfirm that email, logging and analytics vendors offer EU processing, and select it
Transfers outside the EUPut safeguards such as standard contractual clauses in place and record them
Processor recordsKeep records of processing activities where Article 30 applies to you

On Article 30, processors must keep records of processing carried out for each controller, and the exemption for organisations under 250 people doesn't apply where processing is regular or includes special categories of data, which suggests a small SaaS shouldn't assume it is exempt.

Keep a living sub-processor list

Article 28(2) says a processor needs the controller's prior specific or general written authorisation to engage another processor, and under a general authorisation it must inform the controller of intended changes so they can object. Article 28(4) requires the same data-protection obligations to flow down to each sub-processor by contract. The practical pattern is a public page listing each sub-processor's name, country, purpose and data categories, with a changelog and optional change alerts for customers.

Breach handling is part of the same chain. Article 33 requires a processor to inform the controller without undue delay after becoming aware of a breach, which is why your secrets and logging hygiene, covered in secrets management for SaaS, belongs next to your GDPR work. The broader compliance picture, including SOC 2, is in SaaS security and compliance, and the isolation model underneath all of it is in multi-tenant SaaS architecture. For the tool side, see multi-tenant SaaS tools.

Callidus, a clinic SaaS I built, lists GDPR handling among its scope in its case study; clinic data is a reminder that every store, including payments, needs its own deletion path. For a two-sided product, see how BookBed is scoped.

Which data store in your product has no deletion path today? Pick that one, write the endpoint this week, and add it to your data inventory with the date it shipped.

Free resource

Free SaaS MVP Scope Template

A Notion document with the full feature checklist, MVP vs. nice-to-have table, pre-build questions, and cost signals — so you walk into any developer call knowing exactly what to ask for.

Get the template →
DL

Dusko Licanin

Full-Stack Developer · Banja Luka, Bosnia

Full-stack developer shipping SaaS MVPs, web apps, and mobile apps using AI-augmented workflows — without agency coordination overhead. Live portfolio: BookBed, Callidus, Pizzeria Bestek.

Frequently Asked Questions

How do you implement the right to erasure in a SaaS?

Use two-phase deletion: a soft delete that hides the user at once, then a scheduled hard delete that completes well inside the legal deadline. Article 17 requires erasure without undue delay where its grounds apply, and Article 12(3) sets one month from receipt as the outer limit, extendable in complex cases. Then handle systems outside your database, such as email, analytics and payment records, through their own deletion endpoints, and log every erasure as evidence. Check retention duties, such as accounting records, with your counsel first.

How long do you have to answer a data subject request?

You must act without undue delay and in any event within one month of receiving the request. Article 12(3) allows an extension of two further months for complex or numerous requests, but only if you tell the person within the first month and explain why. Record the date each request arrives, because that date starts the clock. Automating the export for your main data stores makes the deadline much easier to meet.

Does GDPR require EU data residency for a B2B SaaS?

No, GDPR does not itself require data to stay in the EU, but transfers to third countries need appropriate safeguards under Article 46, such as standard contractual clauses. Enterprise buyers often ask where data is stored and who can access it anyway, so choose an EU region, keep backups there, and make your documentation match your real setup. Residency is mostly vendor configuration plus accurate paperwork.

What do sub-processors require under GDPR?

A processor needs the controller's prior specific or general written authorisation to engage a sub-processor, and under a general authorisation it must inform the controller of intended changes so they can object. Article 28(4) requires the same data-protection obligations to flow down by contract. In practice, keep a public sub-processor list with name, country, purpose and data categories, and review every new tool that touches personal data before it reaches production.