Refunds, Disputes, Taxes and Invoices
Refunds
stripe.Refund.create(payment_intent=order.payment_intent_id, amount=to_minor_units(10, "usd"))
Full or partial. Update your records from the charge.refunded webhook and revoke access if your policy says so. Publish a clear refund policy; it reduces disputes.
Disputes (chargebacks)
A customer can dispute a payment with their bank. You will be notified (charge.dispute.created) and can submit evidence: receipts, delivery or download logs, terms accepted, communication. Keep these records for every sale; access and download logs are strong evidence for digital goods. Disputes carry a fee, and high dispute rates can put your account at risk.
Fraud prevention
Stripe Radar scores payments for fraud. Help it by passing customer email and using 3-D Secure. Watch for card testing (many small failed payments) on public payment endpoints and rate-limit them.
Taxes
Depending on where you and your customers are, you may need to charge VAT, GST or US sales tax, especially on digital products. Options:
- Stripe Tax calculates and collects tax automatically in Checkout (
automatic_tax={"enabled": True}) once you register in the relevant places. - A merchant of record service (Paddle, Lemon Squeezy) sells on your behalf and handles global tax compliance for a higher fee.
This is not tax advice; ask an accountant which obligations apply to you.
Invoices and receipts
- Stripe can email receipts automatically and generate invoices (with your business details and tax IDs).
- For B2B clients, use Stripe Invoicing to send invoices with payment links and due dates.
- Show order history in your app with links to Stripe-hosted invoices.
Exercise
Add an admin action to issue full or partial refunds, handle charge.refunded and charge.dispute.created webhooks, store download logs as dispute evidence, and enable automatic tax in test mode.
Check yourself
- What evidence helps win a dispute for a digital product?
- What is a merchant of record?
- Where should refunds be reflected in your app's data?
Votre progression est enregistrée dans ce navigateur uniquement.
Envoyer pour relecture (10 points)