#Jack Bauer-products-list-by-coupon

1 messages ยท Page 1 of 1 (latest)

jaunty bramble
#

Hello ๐Ÿ‘‹
As far as I can remember, there's not. Let me reconfirm this. In the meantime, I'm curious about the usecase here if you don't mind sharing.

tall glen
#

The user can fill in a coupon at registration, which can give him the right to a discount, but also to a different trial period than the one proposed by default (a longer one, or on a different product). I would have liked to centralize this information on Stripe, and retrieve the coupon's information at the time of registration to know on which product the trial period applies, and its duration (saved on coupon's metadata for example).

jaunty bramble
#

In the Stripe API section, On the coupon object I see that there's an applies_to field that should contain product IDs but that field is expandable.

You could try getting the coupon and expanding the applies_to field to see if you're indeed receiving the list of products

https://stripe.com/docs/api/coupons/object#coupon_object-applies_to

tall glen
#

It's working ! Thanks ๐Ÿ™‚

jaunty bramble
#

Awesome!