Skip to content

Add missing checkout session params + expand discount data in webhook #35

Description

@alim888aa

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions