#bondero
1 messages · Page 1 of 1 (latest)
Hi, can you reword this question please?
I'd like to make sure that I understand your question fully so I can provide the best support.
sure. i created a coupon with promo codes. i'm watching for checkout session completed triggers and kicking off a workflow from that. i already have the checkout session object, the payment intent, the line items, but i'd like to know what promo code was used too
i can see the discounted amount tho
i created 1 coupon with multiple promo codes to it, to be precise
i'd like to know what promo code was used in a transaction
Got it, looking
like, i had to go find balance transactions to figure out the fee, so i'm sure this bit is lurking somewhere there too 😅
From the checkout.session.completed event, you can get the Checkout Session id and retrieve the checkout session object, https://stripe.com/docs/api/checkout/sessions/retrieve with total_details.breakdown expanded, https://stripe.com/docs/expand/use-cases so that you can get the coupon ID from total_details.breakdown.discounts[0].discount.coupon.id
kool lemme try that
nah, it gives me the discount
i already had thaat
i wanna know what coupon code was used to get that discount
Let me test this on my end