By Hanzalah Seikhai, Stripe developer. 3 December 2026

Stripe charged the customer twice: 5 causes of duplicate payments and how to stop them

Two charges for one order is the bug customers forgive least. In almost every case Stripe did exactly what the app asked: the app asked twice. These are the causes I find, in order.

1. The pay button can be pressed twice

A slow network and an impatient customer create two requests. Disable the button on the first click and show a loading state. This hides the problem but does not solve it on its own, so keep going.

2. A new PaymentIntent or Checkout Session on every attempt

If each click or page reload creates a new PaymentIntent, each one can be paid. Create one PaymentIntent per order, store its id on the order, and reuse it when the customer comes back.

3. No idempotency key on the server call

Stripe accepts an idempotency key on create requests. If the same key is sent again, Stripe returns the first result instead of creating a second charge. Base the key on something stable, such as the order id.

// PHP
$stripe->paymentIntents->create(
    ['amount' => $order->total, 'currency' => 'usd', 'metadata' => ['order_id' => $order->id]],
    ['idempotency_key' => 'order-'.$order->id]
);

// Node.js
await stripe.paymentIntents.create(
  { amount: order.total, currency: 'usd', metadata: { order_id: order.id } },
  { idempotencyKey: `order-${order.id}` }
);

4. The webhook handler is not idempotent

Stripe can deliver the same event more than once. If the handler charges a saved card, adds credits or creates a second order on each delivery, a retry becomes a double charge. Save the event id and skip events you have already processed, or check the order status before acting.

5. A background job charges again

Retry logic in a queue job that runs a charge again after a timeout can succeed twice: the first call timed out on your side but went through on Stripe's. Before retrying, look up the PaymentIntent and only charge if it did not succeed.

Cleaning up

Search the Dashboard for payments with the same order id in metadata, refund the extras, and email those customers before they open a dispute.


If you want this fixed or built in your app, see Stripe webhook or payment bug fix, hire me on Upwork, or get in touch.

Written by Hanzalah Seikhai, Stripe developer. Hire me on Upwork.

More notes