createCheckoutSession is missing common Stripe Checkout parameters:
allow_promotion_codes
payment_method_types
payment_method_options
discounts
locale
currency
Additionally, the checkout.session.completed webhook handler doesn't expand discount data. When a customer uses a promo code, session.discounts contains IDs, not the actual promotion code string. Custom handlers need to make a separate stripe.checkout.sessions.retrieve() call to get it.
Since processEvent already makes Stripe API calls for subscription mode (retrieving subscriptions/invoices), adding a similar call to expand discounts would be consistent.
createCheckoutSession is missing common Stripe Checkout parameters:
allow_promotion_codes
payment_method_types
payment_method_options
discounts
locale
currency
Additionally, the checkout.session.completed webhook handler doesn't expand discount data. When a customer uses a promo code, session.discounts contains IDs, not the actual promotion code string. Custom handlers need to make a separate stripe.checkout.sessions.retrieve() call to get it.
Since processEvent already makes Stripe API calls for subscription mode (retrieving subscriptions/invoices), adding a similar call to expand discounts would be consistent.