Payments Preflight · Check 9 of 15

Handle refunds and disputes

Listen for refund and dispute events so access is removed when money goes back, and so you see disputes before the response deadline.

What it is

Refunds and disputes (chargebacks) reverse a payment. Stripe sends events such as refund.created, refund.updated, refund.failed and charge.dispute.created.

Why it matters

If you ignore them, refunded customers keep what they paid for. Disputes have a limited response window, usually 7 to 21 days depending on the card network. Miss it and you lose the dispute automatically.

How to check

How to fix it

  1. Handle refund events: revoke credits or access for the refunded order, and record the refund.
  2. Handle charge.dispute.created: alert yourself and mark the account for review.
  3. Keep evidence you may need for disputes, such as order records and delivery or usage logs.

Prompt for your AI coding tool

Paste into Cursor, Claude Code, Lovable or similar. Review the diff before you accept it.

Add refund and dispute handling to my Stripe webhook handler. On refund.created and refund.updated, find the related order and revoke what was refunded. On refund.failed, log and alert. On charge.dispute.created, send me an alert with the charge id, amount and reason and flag the account. Keep it idempotent by event id. Show the diff.

Sources

All payments checks

Sponsor this page: get in touch.

Get new checks by email

New checks and real leak post-mortems, about once a month. No spam.