# Stripe Checkout Integration
URL: /docs/affiliate-promo-codes/stripe-checkout
Description: Enable promo codes in Stripe Checkout for affiliate tracking

# Overview

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:

```javascript
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:

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](/docs/affiliate-promo-codes/default-coupon-code) for details.