# Event-driven architecture in fintech: how to build it without losing money

> Where events help a payment or banking platform and where they do not, how to publish them reliably, process them exactly once in effect, change them safely, and move an existing system over one flow at a time.

Ilya Ismatov · CTO · 2 November 2026 · Platforms

Bitmason: https://bitmason.dev/en/blog/event-driven-architecture-fintech/

A payment is not one action. It is an authorisation, a ledger entry, a fraud check, a notification to the customer, a fee calculation, an update to the merchant's dashboard and, later, a settlement and a reconciliation. In many platforms all of that happens in one chain of synchronous calls, each waiting for the next. The chain works until a busy day. Then one slow service slows everything, a timeout leaves a payment half-processed, and nobody is sure whether to retry.

Event-driven architecture changes the shape of that chain. The service that does the work records what happened as an event, and the other services react to it in their own time. Done well, this makes a financial platform faster, easier to change and easier to audit. Done carelessly, it creates a new class of problems, and in fintech some of them cost money. This post covers both.

## Events tell the system what happened

An event is a statement of fact in the past tense: a payment was authorised, a card was blocked, a payout was sent. It is published once, and any service that cares can subscribe to it. The publisher does not know or wait for its consumers.

That is different from a command, which asks a specific service to do something and expects an answer. "Charge this card" is a command. "The card was charged" is an event. Mixing the two up is the most common design mistake, and it produces systems where events are really hidden commands with nobody responsible for the result.

The benefits follow from the separation:

- **Services scale and fail independently.** A slow notification service no longer delays an authorisation.
- **New features attach without touching old code.** A new fraud model or analytics feed subscribes to existing events.
- **The history is kept.** An ordered log of business facts is the natural basis for audit, reconstruction and analysis.
- **Busy periods are absorbed.** Events queue up when consumers are behind, instead of turning into errors.

## Keep money movements strictly consistent

The most important rule in fintech comes before any choice of broker. **The ledger is not eventually consistent.** Moving money between accounts, holding funds and recording a payment must happen as a single, strictly consistent operation, usually as a database transaction over double-entry records, where every debit has a matching credit.

Events then carry the news of that change to everything else: the customer's notification, the fraud model, the reporting store, the merchant's balance view. Those can be a few seconds behind without harm. The balance itself cannot.

Teams that spread a single money movement across several services joined by events end up rebuilding transactions by hand, badly. Draw the line deliberately: what must be correct at the moment of the write stays inside one transaction, and what may follow a moment later becomes an event.

## Publish events reliably with an outbox

The first technical trap is the dual write. A service updates its database and then publishes an event. If it crashes between the two, the database says the payment happened and the rest of the system never hears of it. If it publishes first and the write fails, the system hears about a payment that did not happen.

The **transactional outbox** removes the gap. The service writes the business change and the event, into an outbox table, in the same database transaction. A separate relay reads the outbox and publishes to the broker, retrying until it succeeds. Either both are recorded or neither is.

For an older system that is hard to change, **change data capture** offers a route in: a tool reads the database's own change log and turns committed changes into events. It is a useful bridge, but the events it produces describe rows rather than business facts, so plan to translate them into proper domain events close to the source.

## Ordering, partitions and hot accounts

Most event platforms guarantee order within a partition, not across the whole stream. In payments that matters: a refund processed before the charge it refunds is a bug that someone has to clean up.

The partition key decides what "in order" means. Keying by account or by payment keeps the events for each one in sequence while spreading the load across partitions. The cost appears with very active keys. A large merchant or a busy corporate account can push all its traffic into one partition while the rest sit idle. Watch the load per partition from the start, and for known heavy keys, decide in advance whether they need their own handling.

Where order matters across different keys, it is a sign that the logic belongs in one transaction or one service, not spread over several streams.

## Process each event exactly once, in effect

Distributed systems deliver messages at least once. A consumer can process an event, crash before recording that it did, and receive it again. Exactly-once delivery across real networks is either expensive or narrower than it sounds. The dependable answer is to make every consumer **idempotent**: processing the same event twice must have the same effect as processing it once.

The usual techniques:

- **Give every event a unique identifier when it is first recorded**, in the outbox and in the same transaction as the change. Each consumer records the ones it has handled in the same transaction as the work they caused.
- **Use the business key where one exists.** A payout keyed by its instruction identifier cannot be created twice.
- **Write conditionally**, applying a change only if the record is still at the version the event expects.
- **Send idempotency keys to outside systems** such as card processors and banks, so a retried request is recognised as a repeat.

Where the key comes from matters as much as having one. A key built from anything that changes between attempts, such as a request identifier generated per call, a timestamp, a retry counter, the event's position in the stream or an identifier the relay assigns when it publishes, makes every retry look new. It passes code review and still pays twice. The key has to be fixed once, when the operation is first recorded, and carried unchanged through every retry, every consumer and every call to an outside system.

A duplicate event must never settle a payment twice. If a consumer cannot guarantee that, it is not ready for money.

Test it before you trust it. Replay a day of real events through each consumer in a staging environment, with personal data masked and emails and provider calls stubbed, then compare the ledger payment by payment rather than by totals, because errors can cancel out in a total. A clean day rarely contains the failures that matter, so add them on purpose: replay the same day twice, reorder the events of one account, and stop a consumer after it has done the work but before it has recorded it.

## Retries and dead letters

Some events fail for reasons that pass: a timeout, a locked record, a provider that is briefly down. Others will fail every time, because the data is wrong or the code has a bug. Treating them the same way is how one bad message stops a whole stream.

- **Retry with increasing delays** for failures that may pass, with a limit.
- **Move events that keep failing to a dead-letter stream**, so the rest keep flowing.
- **Alert on dead letters and own them.** A dead-letter stream nobody reads is a slow data loss.
- **Make reprocessing a supported operation**, with a tool to fix and replay failed events after the cause is found.

## Treat event schemas as contracts

Once several teams consume an event, its shape is a public contract. Renaming a field in one service can break three others that the author never heard of.

- **Keep a schema for every event type**, checked automatically when events are published, with a registry or an equivalent shared definition.
- **Evolve compatibly.** Add optional fields; do not remove or repurpose existing ones. A breaking change gets a new version and a period when both are published.
- **Give each event type an owner**, the team that publishes it and answers for its meaning.
- **Keep payloads lean.** Carry identifiers and the facts of the change, not a copy of the whole internal record. Large payloads are slow, and they leak internal design into every consumer.
- **Name events in the language of the business**: a payment was authorised, not a row was updated in a table.

## Replay, retention and personal data

A retained event log can rebuild a read model, fill a new reporting store or recover from a consumer's bug. That is one of the strongest reasons to use one. It only works if consumers are idempotent and events are stable, and it needs a policy: how long events are kept, who may start a replay, and how a replay avoids triggering side effects such as emails to customers a second time.

Retention meets privacy law here. An immutable log full of personal data is hard to reconcile with a customer's right to have data deleted, and with local rules on where personal data may be stored. The practical answers:

- **Keep personal data out of events** and refer to it by identifier, with the data itself in a store that can delete it.
- **Where it must be included, encrypt it with a key per customer.** Deleting the key makes every stored copy unreadable.
- **Tokenise payment data.** A fraud service needs a card token and an amount, not a card number.
- **Protect the event platform like the ledger**: encryption in transit and at rest, access per topic, short-lived service credentials and a log of who read what.

## Long processes need sagas, not hope

Some processes take several steps across services and minutes or days to finish: opening an account with checks, a loan from application to disbursement, a cross-border transfer. No single transaction can cover them.

A **saga** models such a process as a series of steps, each with a compensating action that undoes it if a later step fails. A transfer that reserved funds and then failed a compliance check releases the reservation. The saga's state is stored explicitly, so anyone can see where each process stands, and timeouts move stuck processes to a decision instead of leaving them in limbo.

Two styles exist. In choreography, each service reacts to the previous event. In orchestration, a coordinator tells each service what to do next. Choreography suits short chains; for anything a support team must explain to a customer, a visible orchestrator is usually easier to run.

## Reconciliation and observability

Events reduce the need to check, but they do not remove it. Every financial platform still reconciles: its ledger against the processor's reports, the bank statements and the card network files, every day. Differences are found by reconciliation, not by trust in the pipeline.

To see what the event layer is doing, measure:

- **Consumer lag**: how far each consumer is behind the stream.
- **Latency at the slow end**, not only the average.
- **Retries, dead letters and schema validation failures.**
- **Business measures**: authorisation time, failed payments, duplicate attempts caught, settlement on time.

Put a correlation identifier in every event, log line and trace span. When a customer asks where their payment is, the team should be able to answer three questions quickly: where it stopped, why, and whether it is safe to retry.

## When events are the wrong tool

Event-driven design adds moving parts. It is not worth them when:

- **Volumes are modest and the flows are simple.** A well-structured application with one database is easier to run and to reason about.
- **The caller needs an immediate answer** that depends on the result, such as whether a card was approved. That is a request and a response.
- **The team cannot yet operate the platform**: monitoring lag, managing schemas, handling dead letters. A managed service helps, but the operating discipline cannot be bought.

A common middle path is a modular application that writes an outbox. It gains reliable events for notifications, analytics and integrations without splitting the core into many services.

## Moving an existing platform, one flow at a time

A rewrite is the riskiest way to get there. A safer order:

1. **Map the events of one business flow**, such as payment status or fraud checks, and name each one with its owner.
2. **Add an outbox, or change data capture, at the source**, so committed changes become reliable events.
3. **Set up the platform before critical traffic**: the broker, schemas, access control, monitoring and dead-letter handling.
4. **Build one or two consumers with clear value**, often customer notifications, fraud scoring or reconciliation.
5. **Run the new path beside the old one** and compare the results until they match.
6. **Switch over gradually**, with a flag, a rollback plan and measures agreed in advance.
7. **Only then take the next flow.**

Judge the result by the platform, not by the diagram: faster authorisations, fewer stuck payments, quicker recovery, and changes that ship without coordinating five teams.

## Where to start

Pick the flow in your platform that hurts most on a busy day. Draw its chain of calls, mark which steps must be correct at the moment of the write and which can follow a moment later, and look for the dual writes. That drawing usually shows the first outbox to add and the first event worth publishing.

Event-driven architecture is not a goal in itself. In fintech, it is a way to keep the ledger strict, let everything else move at its own pace, and always know where every payment is.

## Questions about this article

### Is event-driven architecture the same as microservices?

No. Microservices are a way to split a system into deployable parts; events are a way for parts to tell each other what happened. A single well-structured application can publish events, and many microservice systems still call each other synchronously.

### Do we need Kafka?

Not necessarily. Kafka and similar logs suit high volumes, ordering per key and replay. A message queue can be enough for lower volumes and simple workflows, and a managed service saves operations work. Choose by the guarantees you need, then by what your team can run.

### Can events guarantee exactly-once processing?

Across real systems, assume a message can arrive more than once. Make every consumer idempotent, so processing the same event twice has the same effect as processing it once. That gives the result people want from exactly-once.

### How do immutable event logs fit with deleting personal data?

Keep personal data out of events where possible and refer to it by identifier. Where it must be included, encrypt it with a key per customer and delete the key when the data has to go, which makes the stored copies unreadable.

