What does Acquirer Risk Steps and Reserve Survival conclude, in numbers, about “Hot Failover: Common-Cause Failure, Timeout Budgets and Idempotency”?
Answer: Chapter 5 computes the availability ceiling of two acquiring channels with a common-cause share, and uses same-key retries, status queries and a one-success order ledger to bring 1,640 double charges per hundred thousand payments down to none left open at the end of the day.
Scope of the numbers: Parameters are illustrative; all calculations come from the book's programs. This is general risk analysis, not legal, financing or investment advice, and promises no income.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 1640
| per 100,000 payments, timeout 4 s | ||
| policy | double charges | open at end of day |
| A naive | 1,640 | 1,640 |
| B retry-key | 483 | 483 |
| C query | 46 | 46 |
| D C + ledger | 46 | 0 |
Show the full program
# Chapter 5. p53: double charges after failover, with and without keys.
# 100,000 payments; client timeout 4 s, so from p52 a timeout happens
# with probability 0.02763 and a timed-out call has still charged the
# card with probability 0.6. The backup gateway charges with
# probability 0.97. Four policies (same seed for each):
# A naive : on timeout, charge the backup at once;
# B retry-key : retry the primary once with the same idempotency key
# (answers with probability 0.7, never double charges),
# then fail over as in A;
# C query : B, then ask the primary for the order's status (the
# status call answers with probability 0.9); fail over
# only when the answer is "not charged" or no answer;
# D C + ledger: C, and the order ledger accepts one success per order
# key; a second success is voided the same day, and the
# end-of-day reconciliation refunds what is left.
# Reported: double charges made, and double charges still open at the
# end of the day. All numbers illustrative.
import random
N = 100000
P_TO, P_LATE_OK, P_BACKUP = 0.02763, 0.6, 0.97
P_RETRY_ANS, P_STATUS = 0.7, 0.9
def run(policy):
rng = random.Random(39753)
made = open_end = 0
for _ in range(N):
if rng.random() >= P_TO:
continue
charged_primary = rng.random() < P_LATE_OK
if policy in "BCD" and rng.random() < P_RETRY_ANS:
continue
if policy in "CD" and rng.random() < P_STATUS:
if charged_primary:
continue
if rng.random() < P_BACKUP and charged_primary:
made += 1
if policy != "D":
open_end += 1
return made, open_end
def main():
names = {"A": "naive", "B": "retry-key", "C": "query", "D": "C + ledger"}
print("per {:,} payments, timeout 4 s".format(N))
print("policy double charges open at end of day")
for p in "ABCD":
made, left = run(p)
print("{} {:<11} {:>10,} {:>10,}".format(p, names[p], made,
left))
if __name__ == "__main__":
main()Single source and citation
Fan, Y. (2026). Payment-Acquirer Risk Step-Functions, Multi-Gateway Hot Failover and Rolling-Reserve Survival for Digital Fleets (Version 1.0.0), Chapter 5: Hot Failover: Common-Cause Failure, Timeout Budgets and Idempotency. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-397 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026397,
author = {Fan, Yafu},
title = {Payment-Acquirer Risk Step-Functions, Multi-Gateway Hot Failover and Rolling-Reserve Survival for Digital Fleets},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · Steps: Noise in the Chargeback Ratio, the Beta Posterior and Card-Network Definitions
- Chapter 2 · Lag: Cohort Measures, Arrival-Date Measures and Underestimation During Surges
- Chapter 3 · Jumps: Cumulative Sums, Exponentially Weighted Averages and Bayesian Online Change Points
- Chapter 4 · Refunds: The Optimal Interception Threshold Before a Dispute
- Chapter 6 · Reserves: Rolling Holdbacks, Settlement Freezes and the Minimum Buffer That Keeps Cash Flowing
- Chapter 7 · Reading the Classics: Peace and Peril in the Zuo Zhuan, Forethought in the Doctrine of the Mean, Joseph's Granaries and Bagehot's Reserve
- Chapter 8 · The Empirical Loop: the Acquirer-Risk Ledger, Field Tools and Checker Specifications