You can create a Checkout Session with an applied discount by passing the coupon ID in the coupon
parameter of the discounts array. You can add only one coupon or promotion code to a Checkout Session.
const session = await stripe.checkout.sessions.create({ line_items: [ { price_data: { currency: 'usd', product_data: { name: 'T-shirt', }, unit_amount: 2000, }, quantity: 1, }, ], mode: 'payment', ui_mode: 'custom', return_url: '{{RETURN_URL}}' discounts: [{coupon: '{{COUPON_ID}}'}], });