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
- Search your handler for refund and dispute events.
- Check who gets dispute emails from Stripe and whether anyone reads that inbox.
- Refund a test payment and see if your app changes the user's access.
How to fix it
- Handle refund events: revoke credits or access for the refunded order, and record the refund.
- Handle
charge.dispute.created: alert yourself and mark the account for review. - 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
- Refund and cancel payments Stripe docs
- Respond to disputes Stripe docs
- Disputes Stripe docs
Sponsor this page: get in touch.