Back to Glossary

API & Integration

How to implement a retry budget for a payment connector

A retry budget for payment connectors limits automatic retry attempts to prevent cascade failures and preserve system stability. Implement by setting maximum retry counts per time window, typically 3-5 attempts over 30 minutes per transaction.

Why It Matters

Retry budgets prevent payment system overload during downstream failures, reducing incident recovery time by 60-80%. Without limits, failed connectors can generate 1000+ retry attempts per minute, overwhelming upstream systems and extending outages from minutes to hours. Proper budgeting maintains 99.9% availability during partner API degradation while preventing unnecessary operational alerts and preserving transaction success rates above 97%.

How It Works in Practice

  1. 1Configure maximum retry attempts per transaction (typically 3-5 retries)
  2. 2Set time window boundaries for retry counting (usually 15-30 minute sliding windows)
  3. 3Define circuit breaker thresholds when retry budget exceeds 80% consumption
  4. 4Implement exponential backoff starting at 1 second with 2x multiplier per attempt
  5. 5Route budget-exceeded transactions to dead letter queue for manual review
  6. 6Monitor budget utilization rates across all payment connectors in real-time

Common Pitfalls

Failing to account for PCI DSS logging requirements when transactions exceed retry limits

Setting budgets too low during high-volume periods like Black Friday, causing legitimate payment failures

Not distinguishing between retriable errors (timeouts) and permanent failures (invalid card) in budget calculations

Missing regulatory reporting deadlines when retries delay settlement by pushing transactions past cutoff times

Key Metrics

MetricTargetFormula
Retry Budget Utilization<50%Current retry attempts in window / Maximum allowed retries * 100
Circuit Breaker Trip Rate<1%Circuit breaker activations / Total transaction attempts * 100
Dead Letter Queue Size<100Count of transactions exceeding retry budget awaiting manual processing

Related Terms