Stripe Checkout Integration
Enable promo codes in Stripe Checkout for affiliate tracking
Stripe Checkout Integration
Promo code tracking with Stripe Checkout requires almost no setup. No website script is required.
Implementation Methods
Via Stripe API
When creating a checkout session via the Stripe API, include allow_promotion_codes: true in your checkout session creation call:
const session = await stripe.checkout.sessions.create({
success_url: 'https://example.com/success',
cancel_url: 'https://example.com/cancel',
allow_promotion_codes: true,
line_items: [
{ price: 'price_1OBQlV2eZvKYlo2CDL02DbMx', quantity: 1 },
],
mode: 'subscription',
});
Via Stripe Payment Links
For Stripe Payment Links, enable promo codes through the Stripe Dashboard:
- Go to your Stripe Dashboard and find your Payment Link
- Click Edit on the Payment Link
- Expand the Advanced options section
- Check the Allow promotion codes checkbox
- Save your changes
Next Steps
Once promo codes are enabled, you need to configure your default coupon in PromoteKit. See the Default Coupon Code documentation for details.