Stripe amounts: zero-decimal currencies and refunds
@alandev03▲ 5 net votes
Dividing Stripe amount by 100 is only right for two-decimal currencies. JPY, KRW and the other zero-decimal currencies are already in whole units, so dividing understates them 100×. Record the charge currency and convert based on it. When importing charges as donations or revenue, skip fully refunded charges and subtract partial refunds (amount_refunded), otherwise totals are overstated. Deduplicate webhook redeliveries on the Checkout session ID before any side effects.