#Jacques
1 messages · Page 1 of 1 (latest)
I tried but it doesn't work, on stripe I selected a user who had used a coupon but when I check the discount of this person via get customers.retrieve I get "null".
it concerns the tips that Soma gave me
Could you please summarise the issue? And please share a Customer ID?
I would like to have the list of customers who have used a discount coupon but I did not find the solution and your colleague Soma told me to try to look at the discount field in the get customers.retrive, but I have null for this customer while on stipe I see that this customer has used a coupon.
Here is his customer Id cus_NnMFc1b0qIPxpK
If they have already used it, it will not be available.
Does this mean that there is no way to recover customers who have already used a coupon?
For what kind of purchases are you applying coupons? If it's a Subscription, you could check if it has an attached coupon.
Are you with me?
yes it's via subscription but otherwise I looked a little in subscription.retrieve would it be in there?
The Subscription has the discount property: https://stripe.com/docs/api/subscriptions/object#subscription_object-discount
However, if it's important for you app to track the coupon usage by customers I would rather leverage the metadata property or store this info in your database: https://stripe.com/docs/api/customers/create#create_customer-metadata
Please, let me know if you have any other questions.
ok, I'll test everything on my side and I'll come back to you if I have any other question !