A runnable reference that rebuilds the bank as small, independent, consent-first services.
Each capability of the bank is its own service — it owns its data, speaks Open Banking on the wire, and deploys on its own. Nothing is read or paid without an authorised consent that the Consent service has issued.
The trust anchor. Owns the lifecycle of every consent — account-access, payment and funds-confirmation — from awaiting → authorised → consumed / revoked. Every other service validates against it.
Account Information — accounts, balances and transactions, for a consent that permits it.
Repo ›Payment Initiation — turns a single-use payment consent into an idempotent domestic payment.
Repo ›Confirmation of Funds — a yes/no on availability. Asks Accounts; never stores balances itself.
Repo ›The customer identity behind the accounts — readable only with the ReadParty permission.
Repo ›The shared spine — OBIE response & error envelopes, an exact-decimal money type, HTTP middleware, Postgres helpers and the inter-service clients. Two test tiers: in-memory unit tests, plus Postgres integration tests via testcontainers.
Banking software spent decades as a single, indivisible core. Regulation forced it open — this estate is the architecture that makes the openness standard, safe and sustainable.
Every service speaks the same OBIE contract. A fintech integrates the standard once — not a different proprietary API per bank. Connection cost falls from N×M to N+M.
No service trusts the caller's claim. Each fetches and checks the consent — status, type, permissions, expiry — before acting. Authorisation is a hard gate in code, not a line in a policy.
Following BIAN, each capability is an independently ownable service domain with its own data and schema. Teams ship Accounts without touching Payments. The org chart and the architecture finally agree.
Behind each service is a clean port: in-memory for tests, Postgres for real, a fake for the upstream. Swap the datastore or rewrite a service — as long as the contract holds.
It builds, it tests, it boots with zero infrastructure — go run . and you have a working bank service. Turning an abstract standard into something a team can run in a minute is how good architecture actually spreads.
The same five-service shape points at where the industry is headed — away from the monolithic core, toward an ecosystem that is embedded, consent-governed, and increasingly acted on by software agents.
When capabilities are independent services, the bank evolves the parts instead of risking the whole. New products become a recombination of existing domains — not another change request against a core no one dares touch.
Standard, consent-gated APIs let fintechs, marketplaces and non-banks build on the bank's rails. Payments and account insight show up inside the products people already use.
The consent lifecycle — granted, scoped, time-boxed, revocable, audited — is modelled in the code itself. Regulators get provable control; customers get a clear switch; the bank gets trust it can demonstrate.
As AI agents begin to move money and read accounts on a customer's behalf, the consent boundary becomes essential infrastructure: an agent operates only within an explicit, permissioned, revocable grant. The same gate that protects a human keeps autonomous software safe.
Swap Postgres for another store, add a second market's API flavour (Berlin Group, FDX), split a hot domain or scale it alone — each is a local move behind a stable contract, not a bank-wide migration. Evolution becomes routine instead of existential.
Each repository is fully self-contained — its own SQL migrations, a vendored copy of the shared library, a Dockerfile and tests — so it clones and builds on its own.
# clone a service and start it with an in-memory store git clone https://github.com/Sreenivas-Sadhu-Prabhakara/openbank-consent.git cd openbank-consent && go run . # a consent-first journey: create → authorise → use curl -X POST localhost:8081/account-access-consents \ -d '{"Data":{"Permissions":["ReadBalances","ReadParty"]},"Risk":{}}' curl -X POST localhost:8081/internal/consents/{id}/authorise curl localhost:8082/accounts -H "x-consent-id: {id}"
Short answers to what OBIE, BIAN and consent-first microservices actually mean — and what this reference is (and isn't).
git clone, go run ., and an in-memory store boots a working Open Banking service in seconds.