How a payment survives a timeout (retries, idempotency keys, status checks and webhooks)
Silence is not a no. Keep a key, ask what happened, send again only if you must, and give the later callback the same care.
L1–L4 are part of the Pro pass
L0 Explain simply
Riya orders a sandwich in the Demo Coffee Ltd app and taps Pay. The wheel spins. After a long wait the screen has not changed, and she does not know whether she has paid.
(SYNTHETIC / TRAINING ONLY — Riya, Demo Coffee Ltd and Larkpay are invented.)
Behind the screen, the café's app asked a payment company, Larkpay, to take the money. Larkpay runs a gateway, which is the front door that receives such requests. No answer came back. From where the app stands, three things could have happened, and all three look the same. The request may never have arrived. It may have arrived and failed. Or it may have worked, and the reply was lost on the way back.
That is the heart of this topic. Silence is not a no. A timeout means the app is missing information. It does not mean the payment failed. If the app treats silence as a failure and sends the request again, it may charge Riya twice.
So a careful app follows an order. Before the first send, it makes a unique number for this one payment and keeps it. That number is an . (Idempotency means that doing something twice has the same effect as doing it once.) When the wait ends, the app asks Larkpay what happened to the payment with that number. Only if Larkpay says it never saw it, or no answer can be had, does the app send again. It sends the same number, so Larkpay can see that this is a repeat.
In this invented service, Larkpay does its half too. It keeps each number beside the result of the first attempt. When the same number comes again, it returns that first result and does not charge again. Within the agreed key scope and retention window, repeating this instruction does not create another charge. A key is useful only if the receiver implements that contract.
There is a second road for news. Later, Larkpay's system can call the café's server to say the payment succeeded. That call is a push message, which developers call a webhook. It can arrive twice, arrive late or arrive out of order, and anyone could fake it, so it needs checks of its own.
Read the diagram as text
- Find a message to send: GOV.UK Pay’s webhooks app checks its delivery queue for a payment event to send.
- Send it to the service address: The app sends the message to the address the receiving service registered. The diagram shows a POST request.
- Queue a retry after a failed response: If the app receives a failed response, it adds a retry to the delivery queue. The payment event can arrive again, so the receiving service needs to handle repeated messages.
Follow the Government Digital Service diagram step by step.
This topic covers the rules for trying again and the number that makes a repeat safe. It also covers the question to ask before sending again, and the care a push message needs. A timeout is an ordinary day for a network. Handling it calmly is part of the design. It is not a sign that something broke.
PLAIN WORDS · 1 in this section
- café
- a small place that serves drinks and snacks
PICTURE IT
Posting a parcel, then ringing the shop before sending another
Picture a person who posts a parcel at a shop and gets a numbered receipt. Days pass with no word that it arrived. The person cannot tell whether the parcel is lost, late or delivered, and a second parcel would cost the same again.
A careful person rings the shop first and quotes the receipt number. If the shop says it never had the parcel, the person posts another and writes the same receipt number on it. The clerk checks the order book. If that number is already there, the clerk does not send a second parcel and reads out the first parcel's record instead.
Later the shop may ring to say the parcel was delivered. The person first checks that the caller really is the shop. A second call about the same parcel is ignored. Calls that come in a different order from the events cause no alarm.
THE REAL JOB A safe retry design lets a sender find out what happened to an unanswered request, repeat it safely, and check later news.
- Make the key and keep it before the first send
- Send, and wait for a limited time
- No answer: mark the outcome unknown
- Ask for the status, using the key
- Send again only if needed, with the same key
- Later news arrives as a webhook: check it, then read the status
- Compare the records afterwards
HOW THE PICTURE MAPS
| In the picture | In the payment |
|---|---|
| The numbered receipt | The idempotency key made before the first send |
| The parcel posted at the shop | The payment request, sent by the app of Demo Coffee Ltd, a fictional caféWho: Demo Coffee Ltd |
| No word that it arrived | A timeout, which leaves an unknown outcome |
| Ringing the shop and quoting the number | A status check that asks by key before any resend |
| Posting another with the same receipt number | A retry that carries the same key |
| The clerk and the order book | The gateway of Larkpay, a fictional payment company, keeping each key beside its first resultWho: Larkpay |
| The person waiting for word | Riya, a fictional payer, who must not be charged twiceWho: Riya |
| The shop ringing to say it was delivered | A webhook sent to the café's server |
| Checking the caller really is the shop | Checking the signature and the signed time |
| Two calls about one parcel | One event delivered twice and handled once |
WHERE THIS PICTURE STOPS
- A parcel posted twice costs only money. A repeated payment moves money, and getting it back needs the other bank to agree. So the aim is to stop the second payment, not to recall it.
- A shop clerk always reads the order book. A real service may keep keys for a limited time only. It may not honour a key at all. It may also answer differently while the first request is running. So each provider's own document has to be read.
- A tracking line tells the truth about the parcel. A status answer can lag behind a request that is still on its way, so a never-seen answer is evidence and not proof. A supported receiver contract makes a repeat safe only within its scope, matching payload and retention window.
- A friendly voice on the phone is easy to trust. A webhook can come from anyone who knows the address. So the signature and the signed time must be checked before the content is believed.
- A parcel takes days, and a payment timeout lasts seconds. The wait is shorter but the doubt is the same, and a late answer can still arrive.
HOOK
No answer is not a no: ask before you resend.
REMEMBER IT THIS WAY
A sequence: the real steps, in order.
Key first, ask second, resend last, and always under the same key.
| In the trick | What it stands for |
|---|---|
| Key first | make the idempotency key before the first send and store it |
| Ask second | ask for the status of the payment, using its key |
| Resend last | send again only with the same key |
If a service offers no way to ask for a status, the same key on the resend carries all the protection.
TELL A FRIEND
When a gets no answer, the sender does not know what happened. It asks for the status using a key made before the first send, and sends again only if it must, with the same key.
OFTEN MIXED UP WITH R-transactions: reject, return, recall. A recall or a return deals with money that has already moved twice or moved wrongly. It needs the other bank to agree. This topic is about stopping the second payment from being made at all. Ask whether the money has already left.
CURRENT AS CHECKED
1 FIGURE
2025 SCT Inst Rulebook version 1.2
The 2025 Rulebook, in version 1.2 (published 30 September 2026 and still the edition in effect as checked 20 November 2026), sets a five-second target . It also sets a seven-second time-out for the confirmation to reach the CSM, and receipt of the confirmation by the originator PSP by the ninth second. Ten seconds is the outer deadline under the amended SEPA Regulation. If no confirmation has arrived at ten seconds, the originator PSP restores the payer account. A later positive or negative confirmation can still arrive and must be communicated.
The timeline was set in version 1.0 and carried through version 1.1. The European Payments Council says version 1.2 has no impact on other business or operational rules compared with version 1.1. The rulebook page and the version 1.2 PDF cover were re-checked on 20 November 2026. The next regular SCT Inst rulebook is now due for publication in the second quarter of 2027 and takes effect no earlier than the end of the third quarter of 2028.
CHECKED 2026-11-20RECHECK BY 2026-12-31
Sources & standards — 1 source
- Scheme-specific rule2025 version 1.2 (EPC004-16)
2025 SEPA Instant Credit Transfer rulebook version 1.2 (EPC004-16) ↗ — European Payments Council · 2025 v1.2 cover/effective 30 Sep 2026; sections 1.4 and 4.2.3 timing model; re-checked 20 November 2026: still in effect, no operational-rule change claimed vs 1.1; EPC SCT Inst page: next regular rulebook published Q2 2027, in effect end Q3 2028 at the earliest.
Version 1.2 formally replaced version 1.1 at its publication on 30 September 2026 (the European Payments Council's wording, seen as a search excerpt; the page was not opened). The change is limited to address-message elements and delays the previously planned end date for unstructured addresses. The EPC states that no other business or operational rules changed compared with version 1.1.
Selected primary follow-up7November2026: actual EPC004-16 2025v1.2 PDF, issued/effective30September2026, operative4.2.1–3A–D/fn14,4.3.1 and4.3.2.1–4 read. Successful checks require reservation; formal debit follows Originator PSP receipt of positive confirmation; beneficiary availability follows certainty of delivery to its CSM. Restoration lifts the reservation while settlement certainty continues until confirmation; late-positive notice is required and further action is outside the Scheme.
Recall and RFRO have distinct grounds and authorisation rules. Not all142pages, AnnexIII, licensed implementation guidelines, private CSM profiles or reproduction permission. Prior search-only release-history note remains historical.
Re-checked 12 November 2026: 2025 SCT Inst rulebook version 1.2 remains the edition in effect; published/effective 30 September 2026; unstructured-address end date removed with no replacement yet.
PRACTISE AND KEEP
IMPLEMENTATION RESOURCES
63 RESOURCES
EVIDENCE AT ARM'S REACH
Apply the base message definition first, then the scheme or infrastructure profile that governs this topic.
An XSD checks XML structure. A usage guideline adds profile rules, conditional fields, code restrictions, and business controls. XSD-valid does not mean scheme-compliant.
CBPR+ usage guidelines
HVPS+ usage guidelines
SEPA Credit Transfer rulebook
SEPA Credit Transfer implementation guidelines
SEPA Instant Credit Transfer rulebook
SEPA Instant Credit Transfer implementation guidelines and XSDs
SEPA Direct Debit Core rulebook
SEPA Direct Debit Core implementation guidelines and XSDs
SEPA Direct Debit B2B rulebook
SEPA Direct Debit B2B implementation guidelines and XSDs
T2 functional specifications, validation rules, and binding XSDs
TIPS release specifications and professional-use documentation
CHAPS and RTGS ISO 20022 handbook and schema access
Fedwire Funds Service ISO 20022 implementation and technical documents
CHIPS ISO 20022 usage-guideline resources and rules
pacs.002 payment status — raw XML
pacs.002 payment status — rejection — raw XML
pacs.028 payment status request — raw XML
Corporate MX positive lifecycle — ZIP pack
MT103 /REJT/ convention → pacs.002 implementation mapping
pacs.002 field matrix
pacs.028 field matrix
Payment lifecycle test cases
T2 RTGS implementation pack field and process matrix
T2 RTGS implementation pack test cases
T2 RTGS implementation pack BA checklist
T2 RTGS implementation pack acceptance criteria
T2 RTGS implementation pack migration notes
T2 RTGS implementation pack restricted and release-specific gaps
TIPS instant-settlement implementation pack field and process matrix
TIPS instant-settlement implementation pack test cases
TIPS instant-settlement implementation pack BA checklist
TIPS instant-settlement implementation pack acceptance criteria
TIPS instant-settlement implementation pack migration notes
TIPS instant-settlement implementation pack restricted and release-specific gaps
CHAPS RTGS implementation pack field and process matrix
CHAPS RTGS implementation pack test cases
CHAPS RTGS implementation pack BA checklist
CHAPS RTGS implementation pack acceptance criteria
CHAPS RTGS implementation pack migration notes
CHAPS RTGS implementation pack restricted and release-specific gaps
Fedwire Funds Service implementation pack field and process matrix
Fedwire Funds Service implementation pack test cases
Fedwire Funds Service implementation pack BA checklist
Fedwire Funds Service implementation pack acceptance criteria
Fedwire Funds Service implementation pack migration notes
Fedwire Funds Service implementation pack restricted and release-specific gaps
CHIPS implementation pack field and process matrix
CHIPS implementation pack test cases
CHIPS implementation pack BA checklist
CHIPS implementation pack acceptance criteria
CHIPS implementation pack migration notes
CHIPS implementation pack restricted and release-specific gaps
CBPR+ implementation pack
SEPA credit-transfer implementation pack
SEPA direct-debit implementation pack
High-value payments implementation pack
T2 RTGS implementation pack
TIPS instant-settlement implementation pack
CHAPS RTGS implementation pack
Fedwire Funds Service implementation pack
CHIPS implementation pack
Sources for this topic — 18 sources
- Official requirement
RFC 9110 — HTTP Semantics ↗ — IETF · Section 9.2.2 Idempotent Methods: do not automatically retry a request that is not idempotent unless it is known to be harmless to repeat or the original is known not to have been applied; section 15.6.5 504 Gateway Timeout
Internet Standard, June 2022, obsoleting RFC 7230 through 7235.
Cited for method semantics only. "Idempotent" in RFC 9110 is a property of a method: that repeating the request has the same intended effect on the origin server. It is not the same claim as "this payment cannot be duplicated", which is a scheme-level guarantee with its own documents.
Read through a mirror, because the publisher's own domain could not be fetched (a reachability gap, not a statement about the publisher). A 403 there is a policy refusal and says nothing about whether the document exists or is reachable elsewhere.
Anyone on an unrestricted network should open the canonical URL above and confirm the section and page numbers cited against it. Every claim drawn from this entry is written so that it can be checked against a numbered page.
Read in full from the HTTP Working Group's own publication mirror at httpwg.github.io.
- Official requirement
RFC 9110 — HTTP Semantics ↗ — IETF · Section 15.6.4 503 Service Unavailable and section 10.2.3 Retry-After: a server may suggest how long to wait; the existence of 503 does not oblige an overloaded server to send it
Internet Standard, June 2022, obsoleting RFC 7230 through 7235.
Cited for method semantics only. "Idempotent" in RFC 9110 is a property of a method: that repeating the request has the same intended effect on the origin server. It is not the same claim as "this payment cannot be duplicated", which is a scheme-level guarantee with its own documents.
Read through a mirror, because the publisher's own domain could not be fetched (a reachability gap, not a statement about the publisher). A 403 there is a policy refusal and says nothing about whether the document exists or is reachable elsewhere.
Anyone on an unrestricted network should open the canonical URL above and confirm the section and page numbers cited against it. Every claim drawn from this entry is written so that it can be checked against a numbered page.
Read in full from the HTTP Working Group's own publication mirror at httpwg.github.io.
- Market practiceDraft, not in force09, 21 November 2026; expires 25 May 2027
The Idempotency-Key HTTP Header Field — draft-ietf-httpapi-idempotency-key-header-09 ↗ — IETF HTTPAPI Working Group · A proposal, not a standard: a client-chosen key repeated on a retry; 400 for a missing key and 422 for a reused key with a different payload (seen in the earliest version, search excerpt, page not opened); the latest version seen, draft 07 of 15 October 2025, expired in April 2026; a client cannot assume the server honours the key
Primary IETF revision 09 §§2.2–2.7 and Appendix A checked 23 November 2026. It is an active Internet-Draft. Section 2.6 describes a response consistent with completion according to user intent. Revision 09 clarifies optional fingerprints, lets each resource define uniqueness, and recommends that resources document behaviour and expiry. The provider contract determines actual payment retry behaviour.
- Market practice
Timeouts, retries, and backoff with jitter (Amazon Builders' Library) ↗ — Amazon Web Services · Retries add load to a failing system; limit retries; capped exponential backoff; jitter; unsafe to retry unless idempotent (search excerpt, page not opened)
Seen as a web-search excerpt of the publisher's own page on the access date (results from aws.amazon.com, including the sister article Making retries safe with idempotent APIs). The page itself was not opened, so every locator that cites it says search excerpt. It is cited at no more than the market-practice label. A vendor engineering article, not a standard.
- Implementation-specific
Stripe API — Idempotent requests ↗ — Stripe · One provider's behaviour: a client-generated key; the first result is saved and returned on a repeat; a reused key with different parameters is an error (search excerpt, page not opened)
Actual primary page/document sections opened and compared in the Industry Contexts audit on 6 November 2026; scope and section-reading limits are documented in docs/research/v43-testing-industry-contexts-progress-20261106.md. Paraphrase teaching facts; a public page is not itself permission to republish proprietary source figures.
- Implementation-specific
Stripe — Receive events in your webhook endpoint ↗ — Stripe · The same event might arrive more than once, so log processed event IDs; delivery order is not guaranteed; failed deliveries are retried for a limited time with exponential backoff (search excerpt, page not opened)
Publisher documentation read through web search on the access date. The interview cases are original hypothetical examples; provider behavior is scoped to this documentation. Event delivery behaviors; duplicate events; API versioning.
- Implementation-specific
Stripe — Resolve webhook signature verification errors ↗ — Stripe · A timestamp inside the signed payload as replay protection, with a default tolerance that must not be zero; each attempt gets a new signature; verification uses the unchanged body and the endpoint secret (search excerpt, page not opened)
Publisher documentation read through web search on the access date. The interview cases are original hypothetical examples; provider behavior is scoped to this documentation. Check the endpoint secret; Check the request body.
- Implementation-specific
Stripe — Process undelivered webhook events ↗ — Stripe · Undelivered events can be listed and processed by hand; manual processing does not stop automatic retries, so guard against processing an event twice
Publisher documentation read through web search on the access date. The interview cases are original hypothetical examples; provider behavior is scoped to this documentation. List webhook events; Process the events; Respond to automatic retries.
- Implementation-specific
Stripe — Check PaymentIntent status ↗ — Stripe · Server-side fulfilment is driven by the payment's current status, with webhooks used to monitor it
Publisher documentation read through web search on the access date. The interview cases are original hypothetical examples; provider behavior is scoped to this documentation. Monitor a PaymentIntent with webhooks; Handling specific webhook events.
- Implementation-specific
Razorpay — Validate and Test Webhooks ↗ — Razorpay · Raw-body signature verification; retries of older events are validated with the old secret after a secret change; event identifiers
Publisher documentation read through web search on the access date. The interview cases are original hypothetical examples; provider behavior is scoped to this documentation. Validate Webhooks; Idempotency.
- Scheme-specific rule2025 version 1.2 (EPC004-16)
2025 SEPA Instant Credit Transfer rulebook version 1.2 (EPC004-16) ↗ — European Payments Council · Ten-second timeline, account restoration when no confirmation has arrived, and handling of a belated positive or negative confirmation
Version 1.2 formally replaced version 1.1 at its publication on 30 September 2026 (the European Payments Council's wording, seen as a search excerpt; the page was not opened). The change is limited to address-message elements and delays the previously planned end date for unstructured addresses. The EPC states that no other business or operational rules changed compared with version 1.1.
Selected primary follow-up7November2026: actual EPC004-16 2025v1.2 PDF, issued/effective30September2026, operative4.2.1–3A–D/fn14,4.3.1 and4.3.2.1–4 read. Successful checks require reservation; formal debit follows Originator PSP receipt of positive confirmation; beneficiary availability follows certainty of delivery to its CSM. Restoration lifts the reservation while settlement certainty continues until confirmation; late-positive notice is required and further action is outside the Scheme.
Recall and RFRO have distinct grounds and authorisation rules. Not all142pages, AnnexIII, licensed implementation guidelines, private CSM profiles or reproduction permission. Prior search-only release-history note remains historical.
Re-checked 12 November 2026: 2025 SCT Inst rulebook version 1.2 remains the edition in effect; published/effective 30 September 2026; unstructured-address end date removed with no replacement yet.
- Official requirement
Electronic Banking Internet Communication Standard specification ↗ — EBICS SC · Replay and sequence protection
Used only for protocol-level teaching. Bank support, order types, national profiles and onboarding procedures must be confirmed with the participating bank and the current EBICS material.
- Scheme-specific rule
Swift Standards MT (annual standards releases) ↗ — Swift · The possible-duplicate marking on a repeated FIN message, as used in the linked exc-swift-duplicate-recovered scenario; the scenario's own sources carry the detail
Full field-level specifications live in the Swift Knowledge Centre User Handbook behind a swift.com login. Coexistence for in-scope FI-to-FI payment instructions ended on 22 November 2025, but treatment differs by MT: some instructions are NAKed and selected messages can enter temporary, chargeable contingency conversion. Reporting, initiation, investigations and correspondence follow separate roadmaps.
Re-checked on 2026-10-04 by web search for the schedule of Standards Release 2026. Only search excerpts of the Standards Releases page were seen; the page was not opened. They said the deferred part of the release, which holds MT messages outside category 1, ISO 20022 securities and funds messages, tracker messages and exceptions and investigations messages, now has a date of 12 June 2027. They said the first target was the first quarter of 2027, and that the later date follows industry feedback about other change work, including the European move to T+1 settlement. An audit note in docs/research dated 29 September 2026 recorded the same date from the same page.
Re-checked 12 November 2026 via Swift Standards Releases schedule: SR2025 remains the in-force annual MT release pending the deferred SR2026 package.
- Scheme-specific ruleV2.2 — June 2026
RTGS Rules ↗ — Bank of England · Processing points: a transfer enters RTGS when it has entered the Swift network and been acknowledged by Swift, or when a manual entry in the Bank's entry tool is approved and its status changes to pending
Read in full from the publisher's own site on the access date, HTTP 200, 221,240 bytes. The document dates itself V2.2 of June 2026, and records that a first version was published in March 2025 with an April 2025 revision for TS3.
Scope worth holding. These are the Bank's expectations of participants rather than the legal terms, and the document says so: the RTGS Terms and Conditions and the CHAPS Reference Manual are the agreements. Where a designated system has defined its own processing points, Annex 4 says those take priority over the points summarised here.
Two boundaries. The document does not use the name RT2 anywhere, searched on the access date with zero occurrences, so it is not a source for that name. And it does not say which net settlement systems use prefunding, so it cannot be cited for the prefunding of Bacs and Faster Payments by name.
- Official requirement
ISO 20022 Catalogue of messages ↗ — ISO 20022 Registration Authority · pacs.028 FIToFIPaymentStatusRequest and pacs.002 FIToFIPaymentStatusReport message definitions
Each message set is described by a Message Definition Report; earlier versions remain available in the ISO 20022 messages archive.
- Scheme-specific rule
Swift gpi (global payments innovation) ↗ — Swift · End-to-end tracking defined through the UETR, which stays the same along the chain
Only public short overviews are used here; the full service definition and rulebook sit behind a swift.com account.
- Market practice
Payment Initiation API Profile — v4.0 ↗ — Open Banking Limited · Alternative and Error Flows: Idempotent Payment Order. An identical retry with the same x-idempotency-key creates no new payment order and retains the payment order identifier
Version 4.0, read on the access date; not a claim that this is the latest release. The consent exercise uses fictional plain-language snapshots rather than implementing these endpoints, status codes, security requirements or idempotency semantics. Its single-approver authentication requirement and amount cap are disclosed teaching simplifications.
- Simplified educational illustration
Payments Signal editorial teaching models — Payments Signal · Editorial teaching model
What this simplifies: Riya, Demo Coffee Ltd and Larkpay are invented. One request stands for the many calls a real integration makes. Provider details are those of the named providers only; a sender must read each bank's or provider's own specification.
Used wherever diagrams, scenarios, figures, or example values are didactic constructions rather than sourced facts; every such use carries a simplifications disclosure. All people, companies, banks, and list entries in examples are fictional.
Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.
