6

Payments Platform

Production paytech spanning wallets, cards, remittances, and program disbursement. Architecture, security, observability, and the path from CI through staging into production, under one owner. The repository is proprietary.

Context and problem

A multi-sided service needed a financial layer that could move money for people, businesses, and institutions without becoming a pile of one-off provider scripts. The surface that is public covers payments, remittances, prepaid cards, a closed-loop wallet, lending, and program disbursement. The work behind that surface is the architecture, the security program, the telemetry, and the release path that keeps those flows correct in production.

I own that layer as a senior full-stack engineer across architecture and security. The repository is proprietary.

What the platform does

The public program is a payments partnership with Mastercard, including work that came through Mastercard Start Path. Card issuance and settlement sit with a major banking institution. Regional mobile-money rails sit beside the card network, behind the same application boundary.

Capabilities, described only at the level the public site already states:

  • Everyday payments and remittances for individuals.
  • A closed-loop wallet with one-time-code challenges on sensitive steps.
  • Prepaid cards on global card rails, issued with a major banking institution.
  • Microfinance, lending, and development-program disbursement on the same ledger, so grant money and everyday payments do not fork into a second system.
  • Partner and institutional access that is separate from consumer and operator access.

Commercial results, volumes, and institution-specific rollout status stay off this page. What follows is the engineering.

Architecture

  • One service, many clients. A shared backend-for-frontend owns identity, wallets, payouts, cards, KYC, and operator workflows. Web and mobile clients call that contract. Business rules do not get copied into each app.
  • Provider adapters, not provider leakage. Banking, card-network, and mobile-money differences stop at an adapter. Failure states are explicit. A partner's quirk does not become a field on every other flow.
  • Ledger before narrative. Balance changes are recorded as movements with a clear commit boundary. A retried provider call must not debit twice. Display balances are derived from the committed movement, not from a second write that can drift.
  • Identity and money stay apart. Session, KYC, and payment credentials are different stores and different failure modes. A healthy login is not treated as proof that a payout or a card call succeeded.
  • Edge in front of the app. TLS, security headers, and route policy live in versioned edge config. The application does not invent a second, divergent policy per environment.

The service is a long-lived codebase. Changes are incremental: keep client contracts stable, isolate a provider, and promote through a gate. A rewrite was the wrong trade. It would have thrown away a working ledger for a cleaner diagram.

Security

Security is a delivery control, not a review that happens after the release.

  • Blocking static analysis with a ratchet, so the baseline shrinks and does not quietly grow.
  • Taint analysis on paths that touch money, identity, and file handling.
  • Dependency, image, and credential scanning in the same gate as the tests.
  • Output-escaping checks on views, so a template change cannot reintroduce injection.
  • Content-Security-Policy and the rest of the edge header set, generated from a manifest rather than edited by hand on a server.
  • Staging dynamic analysis against the real routes, with a defined account and a defined exclusion list. Findings either land as a fix or as a written exception.
  • Secret material stays in an environment vault. Values are applied per environment. They are not committed, and a staging value is not a production value with the hostname changed.

Unconfirmed partner behavior stays gated. A sandbox response is not treated as a production contract.

Observability

HTTP 200 is not a healthy payment.

  • OpenTelemetry traces across the request and the provider call, so a slow or failed rail is visible as its own span.
  • Prometheus metrics and Grafana dashboards for route latency, error rate, and scheduled-job liveness.
  • Loki for logs and Tempo for traces, with cardinality kept bounded on purpose. A label that can take a user id or a free-text reason does not go on a metric.
  • Alerting on provider health, session-store capacity, certificate age, and jobs that stop running. A silent cron is an incident, not a quiet success.
  • Staging and production are separate series. A green staging probe is never drawn as a production success.

The point of the stack is detection of failures that an uptime check misses: a provider that accepts the call and does not settle, a job that last ran yesterday, a balance read that is stale.

CI, staging, and production

  • CI. Unit tests, contract fixtures, a hermetic integration lane, shell checks, and the security gate run before a change is allowed to move. A red gate is a stop. It is not a note in the pull request.
  • Contracts. Partner-confirmed behavior is captured as fixtures. OpenAPI drift and breaking-change checks keep the public contract honest against the code. A response the server no longer sends fails the gate.
  • Staging. The staging host is a real promotion target with its own environment, its own edge config, and its own probes. It is where partner behavior is rehearsed. It is not where production secrets are tried out.
  • Production. Releases are built, checked, and activated as a unit. Rollback restores what that release changed. Edge config, alert rules, and host policy are applied from the same revision as the application, so a box cannot drift into an unrecorded state.
  • Tooling. The probes, backfills, contract runners, and release checks are part of the product. They are reviewed and tested with it. An operator script that only lives on one machine is treated as a defect.

Ownership

Git history is the credit, not a title.

I authored the security program, the deploy and environment tooling, the operations and observability tree, and the automated test suite. On the shared application I am the largest author. Other engineers commit to that application. The financial, security, and release paths above are mine.

Outcomes and trade-offs

The public site is one surface over a ledger, a card program with a major banking institution, a global card-network partnership, and regional mobile-money rails. The same release path carries all of them. Verified behavior is what the tests and the probes say. Anything a partner has not confirmed stays off production.

What that costs: the codebase stays a mature service, so every change has to respect an existing contract. Provider isolation and staged promotion are slower than editing the live path. That slowness is the control. It is how a payments platform keeps a retry from becoming a second debit, and how a header or a vault value stays the same on the next box.

Stack

  • Shared REST backend-for-frontend for web and mobile clients
  • Document store for application data, with a separate session and cache tier
  • Provider-isolated banking, card, and mobile-money integrations
  • OpenTelemetry, Prometheus, Grafana, Loki, and Tempo
  • Versioned edge policy, environment vault, and atomic promotion from CI through staging to production
  • Static analysis ratchet, taint checks, dependency and secret scanning, contract fixtures, and staging dynamic analysis