#natalia_91907

1 messages · Page 1 of 1 (latest)

fleet hamletBOT
wanton geode
#

Are your customers applying promo code through checkout sessions?

wheat orbit
#

yes they are

wanton geode
#

OK, there's no API to retrieve the redemption history. You need to listen to checkout.session.completed event, expand breakdown to the discounts list (https://stripe.com/docs/api/checkout/sessions/object?lang=php#checkout_session_object-total_details-breakdown-discounts-discount), from there you can find the promo code (https://stripe.com/docs/api/discounts/object?lang=php#discount_object-promotion_code).

#

Based on these information, you'll then update your DB to record which customer used this promo code.

wheat orbit
#

Ok thank you, so there is no way to get this information on the business level from Stripe portal?

wanton geode
#

In Dashboard, you can find a "active redemptions" for each coupon, but there's no "active redemption" for promo codes. So yes you need to build it by yourself.