Handling Refunds & Disputes
Complete your one-time payment flow by issuing refunds with the Stripe API, handling partial refunds, and responding to chargebacks and disputes.
Why Refunds Matter
Charging customers is only half the job. A smooth refund process builds trust, meets legal obligations, and reduces costly chargebacks. Stripe makes refunds a single API call.
What You Need to Refund
To refund, you need the original PaymentIntent or charge ID. Store it on your order record at purchase time so you can look it up later.
await prisma.order.update({
where: { id },
data: { paymentIntentId: session.payment_intent }
});All lessons in this course
- Stripe Account & API Keys
- Creating Products & Prices
- Implementing Checkout Sessions
- Handling Refunds & Disputes