Group
  • Payments

    Make my checkout double-submit proof

    Hardens the full checkout path against duplicate orders and charges from retries, refreshes, and racing requests.

    • Improve quality
    • Debug & fix
    • Intermediate
    • General

Free Prompt

Audit my checkout flow end to end for every path that can produce a duplicate order or charge, and close each one. Cover: the pay button (disable on submit and show working state, as UI courtesy, not as the defense); the server endpoint (one pending order per checkout session, so a second request joins the existing attempt instead of creating a new order); the payment provider call (idempotency key forwarded so provider-level retries don't double-charge); the success redirect (page refresh after payment must not re-run the charge; the confirmation page reads order state, it doesn't trigger payment); and the webhook handler (order fulfillment keys off payment provider events, processed once per event, not off the redirect alone, since users close tabs before redirects complete). Don't change the checkout UX flow. Don't treat the client redirect as proof of payment; only a verified webhook or a server-side status check against the provider confirms money moved. Deliver: each duplicate path found and the fix, and a stress pass: double-click pay, refresh mid-checkout, close the tab after paying and return, refresh the success page. Exactly one order and one charge in every case.

What This Does / How This Helps

Hardens the entire checkout path so the messy realities of the web (double-clicks, refreshes, closed tabs, racing requests) each produce exactly one order and one charge. Duplicate charges are the fastest way to generate refunds, chargebacks, and support tickets from a brand-new store. The bugs are boring: refresh re-runs the charge, the redirect counts as payment confirmation, two racing requests create two orders. Each one is a known pattern with a known fix. The stress pass at the end simulates what real users do to checkouts, and the acceptance criterion is simple: one order, one charge, every time.

Want to skip doing this by hand?

Fortivibe audits your app for all of the areas these prompts cover (and more).

See What We Check

Related Prompts