| Field | Meaning | Required |
|---|---|---|
GrpHdr | The header of the message, holding the message identification, creation date and time, number of transactions and control sum. It identifies the file or message | M |
PmtId | The identification block holding instruction identification, end to end identification and transaction identification. End to end identification stays unchanged | M |
IntrBkSttlmAmt | The amount and currency settled between banks for this payment, for example USD 25,000. It is the amount the debtor agent transfers to the creditor agent. It ma | M |
IntrBkSttlmDt | The date on which settlement between banks takes place. It is the value date for the interbank leg and drives liquidity planning and nostro funding. The date mu | O |
SttlmInf | Information about how settlement will occur, including the settlement method, settlement account and clearing system. Values include INDA for instructed agent s | M |
Dbtr | The customer who ordered the payment, with structured name, postal address and identification. Rich debtor data supports sanctions screening and anti money laun | M |
DbtrAcct | The account of the debtor from which the payment is debited, identified by IBAN or other account identification. It links the payment to the correct customer ac | O |
DbtrAgt | The bank holding the debtor account and sending the payment instruction onward. It is identified by BIC and sometimes by name and address. The debtor agent is r | M |
CdtrAgt | The bank holding the creditor account and receiving the payment for onward credit. It is identified by BIC and sometimes by name and address. The creditor agent | M |
Cdtr | The final beneficiary of the payment, with structured name, postal address and identification. The creditor agent credits this party on receipt of funds. Comple | M |
CdtrAcct | The account of the creditor to be credited, identified by IBAN or other account identification. It tells the creditor agent exactly where to post the funds. A w | O |
ChrgsInf | Details of the charges applied to the payment, including the amount, currency, bearer and the agent that applied each charge. The bearer can be debtor, creditor | O |
Meridian Bank London sends a pacs.008.001.08 for USD 25,000 value 5 November 2026 to Harbour Bank Singapore, with a UETR, full structured debtor and creditor names and addresses, charge bearer SHAR, and remittance reference INV-1187. Harbour Bank screens the payment, credits Bright Logistics, and reports the status in a pacs.002.Valid example from the message catalogue. Scheme rules: pacs.008 is a base ISO 20022 message: the structure and fields below are the base definition, and each scheme adds or restricts elements for its rail. Under CBPR+ the message must carry a UETR for end
Orchestration failure handling: timeouts, retries, compensation and sagas
What you will learn
Your objective. By the end of this lesson, you will be able to explain orchestration failure handling: timeouts, retries, compensation and sagas and apply it to a real banking scenario.
Why it matters. For a business analyst, the requirement is to define the saga for each payment type: the steps, the compensation for each step, and the state in which the payment rests while the saga waits.
Chapter objective: What is inside a payment engine, and how operations sees what it is doing
Key learning points
- Multi-system payment flow
- Status enquiry after timeout
- Safe retry conditions
- Saga pattern and compensation
- Recovery by failure type
- Recovery verification tests
Key terms
Reconciliation: The process of comparing records from two sources, such as a bank statement and an internal ledger, to confirm they agree.
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...
Settlement: The final movement of funds between banks to discharge obligations created by cleared payments. Settlement is usually made in central bank money or through correspondent accounts.
ISO 20022 XML explorer showing Orchestration failure handling: timeouts, retries, compensation and sagas.
Insights and practice scenarios
Worked insights and practice scenarios for this lesson. Each one is a reusable PaymentForge case, so the same case may appear in more than one lesson.
Practise this lesson
Exercise
Handle the exception described in this lesson the way the lesson prescribes.
Use the exception type, the reason code and the recovery path in this lesson.
- What to do. State what happened, what the correct action is, what must not be done, and what the post-incident review should capture.
Correct result. The correct action is the one the lesson prescribes for this exception type, with the right reason code and the right message. The payment must not be resent without checking whether it already settled, because that creates a duplicate.
Why. An exception handled wrongly is worse than the exception itself. A duplicate payment is a loss, and an unlearned exception will happen again.
Check your understanding
Practice question
Which of the following best describes orchestration failure handling: timeouts, retries, compensation and sagas?
Takeaway and next step
What to remember
The payment may have been accepted, rejected, or never received.
Follow a payment through every stage, from instruction to beneficiary credit, and note where it can stop.
Open the Payment Lifecycle Simulator →
Builds on "Worklists and audit trails: what operators see and what auditors need".
Transcript and full text
Show transcript
A payment crosses many systems, and any one of them can fail, time out or return an ambiguous result. Orchestration is the discipline of making the whole journey reliable even though each step is unreliable. The engine does not assume a step succeeded because it sent a request; it assumes nothing until it has a positive confirmation, and it has a defined recovery for every way a step can fail. The three failure modes a payments SME must be able to explain are the timeout, the duplicate and the partial failure, and the three recovery patterns are retry with idempotency, compensation, and the saga. Source: microservices and distributed systems patterns as applied to payment engines; ISO 20022 status reporting. A timeout is the hardest failure because the engine does not know what happened. It sent a pacs.008 to the clearing system and received no response within the agreed window. The payment may have been accepted, rejected, or never received. The engine must not simply resend, because a resend could create a duplicate payment. Instead it enquires: it sends a status request, using the original end to end identification, and waits for the clearing system to confirm the payment status. If the clearing system confirms the payment was accepted, the engine moves on. If it confirms the payment was never received, the engine resends safely. If the clearing system cannot confirm either way, the payment goes to an exception worklist for an operator to resolve with the clearing system directly. The rule is absolute: never resend a payment whose outcome is unknown. For a business analyst, the requirement is to define this behaviour explicitly, because the engine does what the requirement says and nothing more. Retry with idempotency is the recovery for a failure where the outcome is known to be negative. If the clearing system returns a clear rejection, or if a downstream system returns a 500 error and the engine knows the request was not processed, the engine retries the same request with the same idempotency key. The idempotency key is a unique value the engine generates for the request; the receiving system stores it, and if it sees the same key again it returns the original response instead of executing twice. This is what makes a retry safe. A retry without an idempotency key is a duplicate payment waiting to happen. For an API, the client supplies the idempotency key in a header; for an internal engine step, the engine generates it from the payment identifier and the step name. Compensation reverses a step that succeeded when a later step fails. Suppose the engine debits the customer account, then the clearing system rejects the payment because the beneficiary bank is unreachable. The debit has already happened, so the engine must compensate: it credits the customer account back, posts a reversal entry, and notifies the customer. Compensation is not a simple undo, because the original debit may have already been reported to the customer or used in a balance calculation. The engine therefore posts an explicit reversal entry, linked to the original, so the ledger shows both the debit and its reversal and the audit trail is complete. A compensation that is not recorded is a reconciliation break. A saga is the pattern that coordinates a sequence of steps where each step has its own compensation. A cross border payment is a saga: debit the customer, send the instruction to the correspondent, wait for the cover, confirm settlement, credit the beneficiary. Each step has a compensating action, and the saga tracks which steps have completed so it knows which compensations to run if a later step fails. If the correspondent rejects the cover after the customer has been debited, the saga compensates by crediting the customer and notifying the channel. The saga pattern is what lets a payment engine handle a failure at any point in a multi system journey without losing money or leaving the payment in an unknown state. For a business analyst, the requirement is to define the saga for each payment type: the steps, the compensation for each step, and the state in which the payment rests while the saga waits. The recovery for a duplicate is different from the recovery for a timeout, because a duplicate means the money has already moved twice. When the engine detects that a payment was sent twice, it must stop the second payment if it has not yet settled, or recall it if it has. The detection comes from the idempotency key, from the end to end identification, or from the reconciliation process that finds two identical payments. The engine then raises an exception with both payment identifiers, so the operator can see which one is the original and which one is the duplicate, and can confirm the recall of the duplicate. A duplicate that is not detected is a customer who has been debited twice, and a customer who has been debited twice is a complaint, a refund, and a loss of trust. For a business analyst, the requirement is to define the duplicate detection rules, the recall procedure, and the customer notification for a duplicate payment. Testing failure handling is as important as building it, and it is often neglected. A payment engine that has never been tested with a downstream system that times out will behave unpredictably the first time it happens in production. The test pack must include a test for every failure mode: a clearing system that returns no response, a clearing system that returns a 500 error, a database that is unavailable during posting, and a message that arrives twice. Each test must verify that the engine recovers correctly, that no duplicate is created, that the ledger balances, and that the operator can see what happened. A test that only checks the happy path is not a test of the engine; it is a test of the demo. Further reading: microservices patterns, saga pattern; ISO 20022 status and investigation messages. Last reviewed 7 November 2026. The operations team must be able to see this state on a dashboard, because a payment that cannot be seen cannot be managed.
A payment crosses many systems, and any one of them can fail, time out or return an ambiguous result. Orchestration is the discipline of making the whole journey reliable even though each step is unreliable. The engine does not assume a step succeeded because it sent a request; it assumes nothing until it has a positive confirmation, and it has a defined recovery for every way a step can fail. The three failure modes a payments SME must be able to explain are the timeout, the duplicate and the partial failure, and the three recovery patterns are retry with idempotency, compensation, and the saga. Source: microservices and distributed systems patterns as applied to payment engines; ISO 20022 status reporting.
A timeout is the hardest failure because the engine does not know what happened. It sent a pacs.008 to the clearing system and received no response within the agreed window. The payment may have been accepted, rejected, or never received. The engine must not simply resend, because a resend could create a duplicate payment. Instead it enquires: it sends a status request, using the original end to end identification, and waits for the clearing system to confirm the payment status.
If the clearing system confirms the payment was accepted, the engine moves on. If it confirms the payment was never received, the engine resends safely. If the clearing system cannot confirm either way, the payment goes to an exception worklist for an operator to resolve with the clearing system directly. The rule is absolute: never resend a payment whose outcome is unknown. For a business analyst, the requirement is to define this behaviour explicitly, because the engine does what the requirement says and nothing more.
Retry with idempotency is the recovery for a failure where the outcome is known to be negative. If the clearing system returns a clear rejection, or if a downstream system returns a 500 error and the engine knows the request was not processed, the engine retries the same request with the same idempotency key. The idempotency key is a unique value the engine generates for the request; the receiving system stores it, and if it sees the same key again it returns the original response instead of executing twice. This is what makes a retry safe. A retry without an idempotency key is a duplicate payment waiting to happen. For an API, the client supplies the idempotency key in a header; for an internal engine step, the engine generates it from the payment identifier and the step name.
Compensation reverses a step that succeeded when a later step fails. Suppose the engine debits the customer account, then the clearing system rejects the payment because the beneficiary bank is unreachable. The debit has already happened, so the engine must compensate: it credits the customer account back, posts a reversal entry, and notifies the customer. Compensation is not a simple undo, because the original debit may have already been reported to the customer or used in a balance calculation. The engine therefore posts an explicit reversal entry, linked to the original, so the ledger shows both the debit and its reversal and the audit trail is complete. A compensation that is not recorded is a reconciliation break.
A saga is the pattern that coordinates a sequence of steps where each step has its own compensation. A cross border payment is a saga: debit the customer, send the instruction to the correspondent, wait for the cover, confirm settlement, credit the beneficiary. Each step has a compensating action, and the saga tracks which steps have completed so it knows which compensations to run if a later step fails.
If the correspondent rejects the cover after the customer has been debited, the saga compensates by crediting the customer and notifying the channel. The saga pattern is what lets a payment engine handle a failure at any point in a multi system journey without losing money or leaving the payment in an unknown state. For a business analyst, the requirement is to define the saga for each payment type: the steps, the compensation for each step, and the state in which the payment rests while the saga waits.
The recovery for a duplicate is different from the recovery for a timeout, because a duplicate means the money has already moved twice. When the engine detects that a payment was sent twice, it must stop the second payment if it has not yet settled, or recall it if it has. The detection comes from the idempotency key, from the end to end identification, or from the reconciliation process that finds two identical payments.
The engine then raises an exception with both payment identifiers, so the operator can see which one is the original and which one is the duplicate, and can confirm the recall of the duplicate. A duplicate that is not detected is a customer who has been debited twice, and a customer who has been debited twice is a complaint, a refund, and a loss of trust. For a business analyst, the requirement is to define the duplicate detection rules, the recall procedure, and the customer notification for a duplicate payment.
Testing failure handling is as important as building it, and it is often neglected. A payment engine that has never been tested with a downstream system that times out will behave unpredictably the first time it happens in production. The test pack must include a test for every failure mode: a clearing system that returns no response, a clearing system that returns a 500 error, a database that is unavailable during posting, and a message that arrives twice.
Each test must verify that the engine recovers correctly, that no duplicate is created, that the ledger balances, and that the operator can see what happened. A test that only checks the happy path is not a test of the engine; it is a test of the demo. Further reading: microservices patterns, saga pattern; ISO 20022 status and investigation messages. Last reviewed 7 November 2026. The operations team must be able to see this state on a dashboard, because a payment that cannot be seen cannot be managed.
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.