Case study · Data residency and platform

Onshore by January: moving Nigerian payment data home without breaking a pan-African platform

A Lagos-based payments company ran one platform for Nigeria, Kenya and Ghana from an overseas cloud region. The Central Bank of Nigeria then set a deadline for payment transaction data generated in Nigeria to be stored in Nigeria. The task was to move that data onshore, keep one platform for every market and cut over without losing a payment.

Case studyPayments · NigeriaSumanta Mukhopadhyay9 min read
#platform#data#kubernetes
CASE STUDY · CASE STUDY · DATA RESIDENCY AND PLATFORM30 Oct 2026 · 12:30 GST
At a glance
SectorPayments · Nigeria
My roleFractional CTO and principal architect
EngagementAssessment, architecture and migration leadership
ScopeData classification, cell architecture, onshore infrastructure, migration and cutover, vendor alignment
What changed
  • Nigerian payment transaction data stored and processed in Nigeria
  • One codebase and deployment process across all markets
  • Data classes defined, so each field has a known home
  • Cross-border flows reduced to tokens and aggregates with documented safeguards
  • Cutover rehearsed and run per payment product, with rollback ready
KubernetesCluster APIGitOpsPostgreSQL with logical replicationEvent streamingTokenisation serviceOpenTelemetryInfrastructure as code

Anonymised composite. Client names, identifying details and confidential figures are withheld; public facts are cited in the references.

The situation

A payments company headquartered in Lagos offered merchant collections, payouts and card processing in Nigeria, Kenya and Ghana. Nigeria was its largest market. Everything ran in one overseas public cloud region: one set of databases, one event stream, one analytics warehouse. It was simple to run, and every market shared the same release process.

Why now. The Central Bank of Nigeria directed banks, fintechs and other payment service providers to store payment transaction data generated in Nigeria on servers in Nigeria from 1 January 2027, with vendors that handle that data expected to align1. Legal commentary noted open questions, such as how "generated in Nigeria" applies to transactions that cross borders2. Separately, the federal government adopted a National Digital Cloud Policy in 2026, which commentators describe as classifying data and applying residency rules to defined sensitive and sovereign categories rather than all data34. With only months to the deadline, the company needed a plan it could execute, not a debate about interpretation.

What had to be true

  • Nigerian payment transaction data at rest and in processing in Nigeria by the deadline, including backups and logs.
  • One platform: the same code, pipelines and on-call for every market.
  • Every field classified, so engineers know what may leave a country and in what form.
  • No lost or duplicated payments during migration.
  • Vendors aligned: fraud, card and support tools that touch Nigerian payment data had to follow it.

Architecture

Global control
Management clusterCluster API and GitOpsShared servicesno payment data
Nigeria cell
Onshore data centrepayments, ledger, logsTokenisationtokens only leave
Kenya and Ghana cells
Cloud regionsame code, own data
Cross-border layer
Allowed exportstokens, aggregates, metricsPolicy checksin the pipeline
Group functions
Analyticsaggregates onlyFraud modelstrained per cellObservabilityno payload data
One control plane, data pinned to cells. Only classified, permitted data crosses borders.

The data flow, end to end

  1. RouteThe edge routes each request to the cell for its market
  2. ProcessAuthorisation, ledger and settlement run inside the Nigeria cell
  3. StoreTransactions, logs and backups stay on Nigerian infrastructure
  4. TokeniseIdentifiers that must be shared are replaced with tokens
  5. ExportOnly classified, permitted aggregates and metrics leave the cell
  6. ReportGroup analytics and dashboards work from those exports
Processing and storage stay local; reporting works from what is allowed to travel.

The hard part: one platform, several homes

The tempting answer was to fork: copy the platform into a Nigerian data centre and run it separately. That doubles releases, on-call and drift. Instead, the team adopted a cell design. Each market runs as a cell with identical services, deployed from the same Git repository. The cells differ only in where they run and in the data rules applied to them.

Cluster API made that practical across very different infrastructure. A management cluster declares the workload clusters, whether they run in a Nigerian colocation facility or a public cloud region, and the same tooling creates, upgrades and replaces them5. The management cluster holds no payment data, so it can sit outside Nigeria.

Diagram of a management Kubernetes cluster running Cluster API, which creates and manages three tenant Kubernetes clusters
One management cluster, many workload clusters: the pattern that kept every market on the same platform. Source: Kubernetes blog, Andrei Kvapil · CC BY 4.0

The second hard part was the data no one thinks about: logs, traces, backups, support tickets and fraud vendor feeds. The team classified fields into a short list of classes, from public to payment transaction data, and enforced the classes in code: telemetry carried identifiers as tokens, backups were written to onshore storage only, and export pipelines refused unclassified fields. See data contracts for how to make that stick.

Localisation fails in the side channels. Classify logs, traces, backups and vendor feeds as carefully as the main database.

How it ran

Compliance and legal
  1. Directive interpretation
  2. Data classes
  3. Vendor terms
Platform engineering
  1. Onshore facility
  2. Cluster API and GitOps
  3. Backups and DR
Payments engineering
  1. Replication
  2. Product-by-product cutover
  3. Reconciliation
Legal defined the classes, platform built the home, payments moved the money flows.
Phase 1Classify
  • Field inventory
  • Data classes
  • Vendor review
Phase 2Build
  • Onshore cell
  • Management cluster
  • Tokenisation service
Phase 3Replicate
  • Logical replication
  • Dual-run checks
  • Reconciliation reports
Phase 4Cut over
  • Per product
  • Rollback rehearsed
  • Old copies removed
Classify first: it decides what has to move.

Migration ran product by product, starting with payouts, which had the simplest flows. Databases were replicated into the Nigeria cell and both copies ran side by side, with reconciliation reports comparing every transaction, before traffic moved. Payment idempotency mattered here; see idempotent payment pipelines. After each cutover, overseas copies and backups were deleted on a recorded schedule.

Key decisions and trade-offs

DecisionAlternativeWhy
Cells on one codebaseFork a Nigerian platformOne release process and one on-call
Cluster API across colocation and cloudDifferent tooling per locationSame lifecycle everywhere
Tokens and aggregates cross bordersCopy full records to the group warehouseGroup reporting without moving payment data
Product-by-product cutoverOne big switchSmaller blast radius and real rollback
Classify telemetry and backupsFocus on primary databasesSide channels are where localisation breaks

What I'd do again, and differently

Again: classify before building. The classes answered most of the hard questions, including which vendors were affected. Differently: involve card and fraud vendors earlier. Their onshore options and timelines set the critical path more than our own engineering did. For related patterns, see a multi-cloud Terraform estate, Kubernetes multi-tenancy and where I work.

If you run payments or financial data across African markets, see my fractional CTO work, or analyse your challenge and bring the result to a call.

References
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
FAQ

Common questions

What does the CBN localisation directive require?

As reported, the Central Bank of Nigeria directed banks, fintechs and other payment service providers to store payment transaction data generated in Nigeria on servers in Nigeria from 1 January 2027, and said vendors with access to that data must align. Check the circular's exact wording with your legal team.

Does Nigeria's cloud policy require all data to be localised?

Commentary on the National Digital Cloud Policy, adopted in 2026, describes a classification scheme with residency requirements for defined sovereign and sensitive categories rather than blanket localisation. Commercial personal data remains governed by the Nigeria Data Protection Act and sector rules, such as the CBN directive.

Do we need a separate platform for Nigeria?

Usually not. A cell-based design runs the same code and deployment process in each location, with data pinned to the cell where rules require it. What changes is where each cell runs and which data may leave it.

Keep reading

Related

Open to advisory, fractional CTO & select builds

Let's talk about what you're building.

The fastest route is a free 30-minute call. Prefer to write? Send a message and I'll reply personally within two business days.

Start a conversation

How would you like to reach me?

Book a 30-min callFastest. Pick any open slot on my calendar.→ Write in GmailOpens a pre-filled draft in your browser.→ Use my email appOutlook, Apple Mail or your default client.→

I reply personally within two business days. Time zones from the Americas and Europe to the Middle East and Asia-Pacific.