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',
});

For Stripe Payment Links, enable promo codes through the Stripe Dashboard:

  1. Go to your Stripe Dashboard and find your Payment Link
  2. Click Edit on the Payment Link
  3. Expand the Advanced options section
  4. Check the Allow promotion codes checkbox
  5. 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.

On this page