Steps of this lesson, in order.
Real-time data and streaming: Kafka, events and the payment event log
What you will learn
Your objective. By the end of this lesson, you will be able to explain real-time data and streaming: KAFKA, events and the payment event log and apply it to a real banking scenario.
Why it matters. For a business analyst, the streaming architecture is a set of requirements: the topics, the schemas, the partitioning, the retention, the idempotency, and the consumers.
Chapter objective: Embedded payments, banking as a service, and what richer ISO 20022 data makes possible
Key learning points
- Payments as events
- Kafka event persistence
- Event schema compatibility
- Payment event log
- Streaming fraud scoring
- BA practice: streaming requirements
Key terms
Event-driven: An architecture where systems react to events, such as a payment received or a status changed, rather than polling for updates.
Payment hub: A central system in a bank that receives payment instructions from all channels, validates them, applies screening and routing rules, and sends them to the correct clearing system or correspondent.
Idempotency: The property that repeating the same request has the same effect as sending it once. In payments, an idempotency key lets a client safely retry a request after a timeout without creating a duplicate...
Payment flow diagram showing Real-time data and streaming: Kafka, events and the payment event log.
Practise this lesson
Exercise
Apply the concept in this lesson to a real banking scenario.
Use the definition, the example and the key points in this lesson.
- What to do. Explain the concept in your own words, give a banking example with an amount, and state what goes wrong if it is misunderstood.
Correct result. A correct answer names the concept accurately, uses a realistic banking example with a concrete amount, and identifies the consequence of getting it wrong.
Why. Understanding is not memorising a definition. It is being able to explain it, apply it, and spot the failure it prevents.
Check your understanding
Practice question
Which of the following best describes real-time data and streaming: KAFKA, events and the payment event log?
Takeaway and next step
What to remember
This makes recovery simple, because the state can always be rebuilt, and makes auditing simple, because the log is the audit trail.
Follow a payment through every stage, from instruction to beneficiary credit, and note where it can stop.
Open the Payment Lifecycle Simulator →
Builds on "Analytics on payment data: liquidity, fraud and customer insight".
Transcript and full text
Show transcript
A payment is an event, and a payment system is a stream of events. When a customer initiates a payment, an event is created. When the payment is validated, another event. When it is screened, settled, and credited, more events. The event log is the complete history of the payment, in order, with a timestamp for each event. A system built on events can answer any question about a payment by replaying the log, can recover from a failure by replaying the log, and can feed analytics by streaming the log. A system built on a database that only stores the current state cannot do any of these. Kafka is the most common streaming platform for payment events. A payment hub publishes each event to a Kafka topic, and the consumers subscribe to the topics they need: the screening engine subscribes to the initiation topic, the ledger subscribes to the settlement topic, the analytics subscribes to all of them. Kafka persists the events, so a consumer that was down can catch up, and it partitions the topics, so the volume can scale. The requirements must state the topics, the event schema, the partitioning key, and the retention period for each topic. The event schema is the contract. Each event must have a type, a timestamp, a payment identifier, and a payload with the data for that event. The schema must be versioned, because the event format will change, and the consumers must be able to handle both the old and the new version during the transition. The schema must be registered in a schema registry, and the registry must enforce compatibility, so a producer cannot publish an event that breaks the consumers. A schema change without a compatibility check will break the system in production. Exactly-once processing is the hardest problem in streaming. A payment event must be processed exactly once, not zero times and not twice, because processing it twice will double-pay. Kafka provides at-least-once delivery, which means a consumer may receive the same event twice, and the consumer must therefore be idempotent: processing the same event twice must have the same effect as processing it once. The idempotency is usually achieved by storing the event identifier and checking it before processing. The requirements must state the idempotency mechanism for each consumer, and the test must prove that a duplicate event does not cause a duplicate payment. The payment event log as a source of truth is an architectural decision with deep consequences. If the log is the source of truth, the current state of a payment is derived by replaying the log, and the database is a cache, not the truth. This makes recovery simple, because the state can always be rebuilt, and makes auditing simple, because the log is the audit trail. But it also means the log must be immutable, must be retained for the statutory period, and must be protected, because a log that can be altered is not a source of truth. The requirements must state the retention, the immutability, and the access control for the log. Streaming analytics is the real-time use of the event log. A fraud model that subscribes to the initiation topic can score a payment before it is processed. A liquidity forecast that subscribes to the settlement topic can update the forecast as payments settle. An operations dashboard that subscribes to the exception topic can show the exceptions as they happen. The analytics must be designed around the events, not around a batch extract, because a batch that runs once a day cannot score a payment that settles in seconds. For a business analyst, the streaming architecture is a set of requirements: the topics, the schemas, the partitioning, the retention, the idempotency, and the consumers. The acceptance criteria must include a test where a payment is traced through the event log, event by event, and the state at each point is verified. Last reviewed 7 November 2026. Further reading: the Apache Kafka documentation; Martin Kleppmann, Designing Data-Intensive Applications; the Confluent documentation on event-driven architecture; the Bank for International Settlements work on real-time payment data.
A payment is an event, and a payment system is a stream of events. When a customer initiates a payment, an event is created. When the payment is validated, another event. When it is screened, settled, and credited, more events. The event log is the complete history of the payment, in order, with a timestamp for each event. A system built on events can answer any question about a payment by replaying the log, can recover from a failure by replaying the log, and can feed analytics by streaming the log. A system built on a database that only stores the current state cannot do any of these.
Kafka is the most common streaming platform for payment events. A payment hub publishes each event to a Kafka topic, and the consumers subscribe to the topics they need: the screening engine subscribes to the initiation topic, the ledger subscribes to the settlement topic, the analytics subscribes to all of them. Kafka persists the events, so a consumer that was down can catch up, and it partitions the topics, so the volume can scale. The requirements must state the topics, the event schema, the partitioning key, and the retention period for each topic.
The event schema is the contract. Each event must have a type, a timestamp, a payment identifier, and a payload with the data for that event. The schema must be versioned, because the event format will change, and the consumers must be able to handle both the old and the new version during the transition. The schema must be registered in a schema registry, and the registry must enforce compatibility, so a producer cannot publish an event that breaks the consumers. A schema change without a compatibility check will break the system in production.
Exactly-once processing is the hardest problem in streaming. A payment event must be processed exactly once, not zero times and not twice, because processing it twice will double-pay. Kafka provides at-least-once delivery, which means a consumer may receive the same event twice, and the consumer must therefore be idempotent: processing the same event twice must have the same effect as processing it once. The idempotency is usually achieved by storing the event identifier and checking it before processing. The requirements must state the idempotency mechanism for each consumer, and the test must prove that a duplicate event does not cause a duplicate payment.
The payment event log as a source of truth is an architectural decision with deep consequences. If the log is the source of truth, the current state of a payment is derived by replaying the log, and the database is a cache, not the truth. This makes recovery simple, because the state can always be rebuilt, and makes auditing simple, because the log is the audit trail. But it also means the log must be immutable, must be retained for the statutory period, and must be protected, because a log that can be altered is not a source of truth. The requirements must state the retention, the immutability, and the access control for the log.
Streaming analytics is the real-time use of the event log. A fraud model that subscribes to the initiation topic can score a payment before it is processed. A liquidity forecast that subscribes to the settlement topic can update the forecast as payments settle. An operations dashboard that subscribes to the exception topic can show the exceptions as they happen. The analytics must be designed around the events, not around a batch extract, because a batch that runs once a day cannot score a payment that settles in seconds.
For a business analyst, the streaming architecture is a set of requirements: the topics, the schemas, the partitioning, the retention, the idempotency, and the consumers. The acceptance criteria must include a test where a payment is traced through the event log, event by event, and the state at each point is verified. Last reviewed 7 November 2026. Further reading: the Apache Kafka documentation; Martin Kleppmann, Designing Data-Intensive Applications; the Confluent documentation on event-driven architecture; the Bank for International Settlements work on real-time payment data.
Full lesson text (all scenes)
Completing a lesson updates your progress dashboard on the homepage.
Scene timestamps are estimated by allocating the narration text proportionally across the real audio length. The audio playback position is the source of truth: pause freezes the visual, seeking restores the correct scene, replay restarts the scene animation.