You send an authorization, wait, and get a timeout. The merchant sees a failure. But did the issuer debit the card?

Often it did. This is the classic payment failure: the issuer approves and debits, but its answer arrives after the acquirer stopped waiting. From the acquirer's side the outcome is unknown. Real acquirers send a reversal for timed-out requests so the cardholder is not left with a debit for a sale the merchant never confirmed.

I built a small browser-based ISO 8583 simulator, PaymentLab, to make this visible. This post walks through the flow as the simulator implements it.

Disclaimer. The 9000.XX amounts below are a simulator convention. Real issuers decide from risk, limits and card state, never from the amount. This post describes what this simulator does, not any specific network. Do not enter real card numbers anywhere in it.

The flow

  1. The acquirer sends an authorization request (0100) and starts a timer.
  2. The issuer approves and debits the card, but replies late.
  3. The timer expires. The acquirer reports a timeout (HTTP 504, switch_timeout). The money is already gone.
  4. The acquirer sends a reversal that points at the original.
  5. The issuer credits the card back and answers.

Triggering it on purpose

In the simulator, sending a purchase of exactly 9000.98 produces this scenario. The issuer debits the card, then holds its answer back longer than the acquirer's wait time. You get a 504, and the balance has dropped anyway.

You can preload the amount here (it does not send anything on its own): https://paymentlab.dev/?scenario=9000.98&utm_source=devto&utm_medium=social&utm_campaign=timeout-was-i-charged

The other 9000.XX amounts (05, 51, 54, 55, 61, 91) force a fixed decline code for any card. They apply only to debit types in MTI 0100/0200. Refunds, deposits and reversals ignore them.

The timeout scenario debits one of your own cards, so use a card from the Cards page.

Pointing at the original: DE90

A reversal has to say which transaction to undo. Field 90 (Original Data Elements) is 42 digits:

Digits Content
1-4 Original MTI (e.g. 0100)
5-10 Original STAN (Field 11)
11-20 Original transmission date/time (Field 7), MMDDhhmmss
21-31 Acquiring institution ID (zeros here)
32-42 Forwarding institution ID (zeros here)

The simulator finds the original by card, STAN and transmission time together, so a different card cannot reverse yours. Real systems also use the institution IDs and often the amount.

Sending the reversal

Replace the placeholders with your card's PAN and the STAN and Field 7 of the original.

curl -X POST https://paymentlab.dev/v1/transaction \ -H 'Content-Type: application/json' \ -d '{"MTI":"0420","PAN":"<YOUR_CARD_PAN>","ProcCode":"000000", "AmountTrn":"000000900098","TransDateTime":"<MMDDhhmmss>", "STAN":"<NEW_STAN>","LocalTime":"<hhmmss>","LocalDate":"<MMDD>", "TerminalID":"POS00001","MerchantID":"MERCH0001234567", "CurCodeTrn":"949", "OrigDataElements":"0100<ORIG_STAN><ORIG_DE7>0000000000000000000000"}' 

What the issuer answers

  • 00: the original was approved and debited. The card is credited once.
  • 00 again: the same reversal arrives a second time. The simulator still answers 00 so the sender can stop retrying, and nothing is credited twice.
  • 28: the original was declined, so there is nothing to undo (simulator meaning).
  • 29: no original matches DE90 (simulator meaning).
  • 30: DE90 is missing or malformed. It is refused, never credited blindly.

A 0420 is answered with a 0430 (a 0400 with a 0410). The simulator accepts both, because networks differ.

What it deliberately does not do

  • It keeps one record per authorization for 7 days, then forgets it. A later reversal would get 29.
  • It does not retry automatically. Real links keep repeating a reversal until answered.
  • It does not check that the reversal amount equals the original.
  • Sending the exact same card, STAN and Field 7 twice as originals debits twice, and only the first can be reversed. There is no duplicate-request detection.

Takeaways

  • A timeout means "outcome unknown", not "failed".
  • A reversal must be idempotent: the retry that follows a lost answer must not refund twice.
  • Rejecting a reversal that has no valid reference is safer than crediting blindly.

If you handle timeouts in your own systems, I would like to hear what you do differently. Feedback is welcome.