Skip to content
Engineering

Payments on Sale Day: Rate Limits, Load Tests and Fallbacks Before Peak Traffic

A festive sale, a product drop or a ticket launch puts the most pressure on the step that earns the money: payment. What actually breaks under peak load, how provider rate limits work and how to stay inside them, how to load test without hammering a provider, a capacity estimate you can do on paper, and a week-by-week readiness checklist.

LILPE Editorial Team9 October 2026 8 min read
Cover for a checklist on preparing payments for sale days and peak traffic

On a normal day, a slow payment is an annoyance. On sale day, when thousands of customers reach checkout in the same few minutes, it's lost revenue you can watch draining in real time. Payment is also where the load concentrates: browsing spreads out, but everyone pays at the moment the sale opens or the stock is about to run out.

Most peak-day payment failures are predictable and preventable. They come from a handful of limits that are invisible on an ordinary day: your own database and connection pools, your providers' rate limits, risk rules tuned for normal traffic, and the banks and apps your customers pay with. This guide goes through each, then gives a readiness timeline.

What breaks under peak load

The weakest link is rarely the one people test. In rough order of how often they cause trouble:

Common peak-day payment failure points
WhereWhat goes wrongMitigation
Your order and stock logicLocks on popular items, slow queries, connection pools exhausted before a payment is even createdLoad test checkout end to end; reserve stock briefly instead of locking
Provider API rate limitsRequests rejected with HTTP 429 when calls per second exceed your account's limitKnow your limits, ask for increases early, throttle and back off
Status pollingThousands of "is it paid yet?" calls consume the same rate limit as new paymentsRely on webhooks; poll on a slow, jittered schedule
Your webhook endpointBursts of events time out, providers retry, and the backlog growsAcknowledge fast, process from a queue, scale the consumer
Risk and fraud rulesVelocity rules tuned for normal days block genuine buyersReview thresholds with the expected volume in mind
Banks, UPI apps and OTPsSlower authentication and more technical declines at national peaksOffer several methods; you can't fix a bank, but customers can switch
Provider capacity or risk reviewAn unannounced spike far above your usual profile can draw scrutiny or hit account limitsTell providers your dates and expected volume in advance

Rate limits: the ceiling you can't see until you hit it

Payment providers limit how many API requests an account can make in a period, often per endpoint, to protect their systems and other customers. When you exceed the limit, the usual response is HTTP 429 Too Many Requests, sometimes with a Retry-After header saying how long to wait. Limits differ by provider, plan and endpoint, and some apply separately to live and test environments.

  • Find your actual limits in your providers' documentation or from your account manager, for every endpoint you call at checkout, not just create-payment.
  • Count all the calls a payment makes. A single payment can mean a create call, one or more status checks, a capture for cards, and later a refund or two. Status checks are often the biggest share.
  • Ask for higher limits well before the event if your estimate gets close. Providers usually need notice.
  • Throttle on your side, so bursts are smoothed before they reach the provider, rather than discovering the limit through rejected payments.
  • When you do get a 429, wait (honouring Retry-After if present), then retry with the same idempotency key. Never retry immediately in a tight loop.
TypeScriptA simple token-bucket throttle for outbound provider calls (single process)
// Allows short bursts up to "capacity", then a steady "ratePerSec".
class TokenBucket {
  private tokens: number;
  private last = Date.now();

  constructor(private capacity: number, private ratePerSec: number) {
    this.tokens = capacity;
  }

  async take(): Promise<void> {
    for (;;) {
      const now = Date.now();
      this.tokens = Math.min(this.capacity, this.tokens + ((now - this.last) / 1000) * this.ratePerSec);
      this.last = now;
      if (this.tokens >= 1) {
        this.tokens -= 1;
        return;
      }
      const waitMs = ((1 - this.tokens) / this.ratePerSec) * 1000;
      await new Promise((resolve) => setTimeout(resolve, waitMs));
    }
  }
}

// Keep a margin below the provider's documented limit.
const createPaymentBucket = new TokenBucket(20, 15);

async function createWithProvider(payload: PaymentRequest, key: string) {
  await createPaymentBucket.take();
  return provider.createPayment(payload, { idempotencyKey: key });
}

This sketch works within one process. If many servers call the same provider account, the limit is shared, so the throttle has to be shared too, for example in a central store or a single outbound service. The numbers in the example are placeholders; use a margin below your provider's real limit.

Estimate your peak on paper first

Before any load test, work out roughly how many calls per second you'll make at the busiest moment. A simple estimate is enough to tell you whether you're near a limit:

  1. Start from the busiest minute you expect: the number of orders, from last year's sale or your marketing forecast.
  2. Divide by 60 for orders per second at that peak, and allow for bursts within the minute: traffic is spikier than an average suggests.
  3. Multiply by attempts per order, since some customers retry or switch methods.
  4. Multiply by API calls per attempt (create, status checks, capture) for each endpoint, and compare each endpoint's figure with its limit.
  5. Do the same for inbound webhooks: events per payment times payments per second is the rate your endpoint must absorb.

If any figure is within shouting distance of a limit, that's the conversation to have with your provider now, not on the day.

Load testing without hammering a provider

Load testing payments has a catch: you shouldn't, and usually can't, send peak volumes of real payments through a provider's live system to see what happens. Provider sandboxes have their own, typically lower, limits and different performance, so they won't tell you much about peak behaviour either.

  • Load test your own stack against a stub that imitates the provider: realistic response times (including a slow tail), occasional errors, 429s when you exceed a configured rate, and webhooks fired back at your endpoint.
  • Test the whole checkout, from basket to confirmation page, because the bottleneck is often before the payment call.
  • Test webhook ingestion separately at several times your expected peak rate, including duplicates and out-of-order events.
  • Run a small number of real end-to-end payments on production with each method before the event, to confirm configuration rather than capacity.
  • If you need to test against a provider's systems at volume, agree it with them first.

Make overload graceful

Even with preparation, something may saturate. Decide in advance how the system degrades, so overload slows payments down rather than breaking them:

  • Queue and shed load at the edge (a waiting room or a short queue before checkout) rather than letting every request pile onto the payment step.
  • Cap concurrent calls to each provider, so a slow provider can't tie up all your workers. Time out deliberately, and treat a timed-out payment as unknown. Our guide to payment API timeouts explains why.
  • Back off with jitter when a provider returns 429 or 503, so your retries don't arrive as a synchronised wave.
  • Keep a second provider for your main methods if your volume justifies it, with routing rules ready to shift a share of traffic. Our incident runbook covers moving traffic safely.

The Google SRE book's chapters on handling overload and addressing cascading failures are worth reading before any big event; the same principles apply to a checkout as to a search engine.

A readiness timeline

Work backwards from the event date:

Payment readiness for a planned peak
  1. 4–6 weeks beforeTell each provider the dates and expected peak. Confirm rate limits, account and transaction limits, and settlement timing. Request increases.
  2. 3–4 weeks beforeEstimate peak calls per endpoint. Build or update the provider stub. Review risk-rule thresholds against expected volume.
  3. 2 weeks beforeLoad test checkout and webhooks. Test switches that disable a method or move traffic. Rehearse the incident runbook.
  4. 1 week beforeFreeze non-essential changes. Run real low-value payments on every method. Prepare checkout messages and support scripts.
  5. On the dayDashboards per provider and method, someone in charge, provider contacts on hand, switches ready.
  6. AfterReconcile the peak window, process refunds and cancellations, and review what came close to a limit.

Don't forget the money after the sale

A big sale creates a big tail: refunds, cancellations, disputes and a larger-than-usual settlement. Check how your providers settle a spike in volume, how refunds are netted from settlements, and whether your reconciliation can handle several times the normal number of lines. Our reconciliation guide covers the daily routine; on a peak day it simply has to scale.

If you spread peak traffic across providers, LILPE's intelligent routing page describes rules that split traffic by percentage and move it as provider performance changes, and its automatic failover page describes pausing a struggling provider for a method.

Frequently asked questions

What does HTTP 429 mean from a payment gateway?

Too many requests: your account exceeded the provider's rate limit for that endpoint. Wait before retrying, using the Retry-After value if the response includes one, retry with the same idempotency key, and throttle your outgoing calls so you stay below the limit.

How do I find my payment gateway's rate limits?

Check the provider's API documentation and ask your account manager, because limits can depend on your plan and may differ by endpoint and environment. If your estimated peak gets close to a limit, request an increase several weeks before the event.

Can I load test my payment gateway integration?

Load test your own systems against a stub that imitates the provider's responses, delays and errors. Sandboxes have their own limits and don't reflect live performance, and sending peak volumes through a provider's live systems needs their agreement. Confirm configuration on production with a few real low-value payments.

Why do payments fail more during festive sales?

Several things peak at once: your own systems, provider rate limits, risk rules that treat unusual volume as suspicious, and banks and payment apps handling national peaks. Preparing each in advance, and offering more than one payment method, reduces failures.

Official sources

Last reviewed . Examples, amounts and screens marked illustrative are not LILPE figures.

Route every payment to where it succeeds.

Tell us which providers you use today and where payments get stuck. We'll show you what the setup would look like on LILPE.