#yogeshwari
1 messages ยท Page 1 of 1 (latest)
Hello ๐
The coupon object has a times_redeemed parameter you can look at once you retrieve the coupon
https://stripe.com/docs/api/coupons/object#coupon_object-times_redeemed
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
it gives count for all users? or one user?
All users
If you'd like to track per user then you'd need to use webhooks and track the redemption yourself
wheich webhook event?
Are you using Stripe Checkout? If so, you can listen to checkout.session.completed
no actually created custom to apply popup
PaymentIntents API doesn't support coupons ๐ค
Are you working with Subscriptions/Invoices API directly?
Are you working with Subscriptions/Invoices API directly?
yes
In that case, you can listen to invoice.* events as the invoice object should reflect the discount used
https://stripe.com/docs/api/invoices/object#invoice_object-discounts
In order to get redemption count retroactively, you'd need to look at all the subscriptions/invoices created for that customer and look at the discounts/coupons they've used in the past
The feature in the screenshot is currently dashboard only. There's no way to get that info via the API without tracking it yourself.
ok got it..means every time i need to check invoice for that customer
Correct