How Stripe Handles Affiliate Commissions When Discount Coupons Are Applied
When a customer uses a discount coupon after clicking an affiliate link, calculating the correct commission requires careful handling to avoid paying out more than the sale earns. Stripe's invoice.amount_paid field already reflects the post-discount amount, making it the only reliable base for calculating affiliate commissions. Using the full list price instead can result in commission payouts that nearly wipe out or exceed the actual revenue collected, especially during promotional periods. Unique affiliate promo codes, such as JANE20, can serve a dual purpose by both discounting the purchase and identifying which affiliate should be credited. When both a tracked link and a coupon code are present, developers are advised to establish a single attribution rule — prioritizing code-based attribution over click-based tracking — and to key every commission entry to the invoice ID to prevent duplicate payouts.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in