#Toby
1 messages · Page 1 of 1 (latest)
Yup! You would just add the applies_to field: https://stripe.com/docs/billing/subscriptions/coupons?dashboard-or-api=api
Thanks! Can I do this from the Stripe dashboard or will I need to make the API call in order to create a coupon like this?
I think a similar field is available in the dashboard. The docs allow you to select Dashboard, so I'd take a look in there at what is available
On the Stripe Dashboard it seems like you can only apply a coupon to a specific product, not to a specific price
That seems to be the case. So this is a limitation of the Coupon product it seems
OK, I'll create the coupon with the Stripe CLI then. For applies_to I just put the price id?
I'm pretty sure that's the same thing for the API and CLI though, so you can only add Products to the applies_to field unfortunately: https://stripe.com/docs/api/coupons/create#create_coupon-applies_to
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Oh 😦 so then it's only possible to create a coupon that applies to a whole product, I can't create a coupon that would only apply to the yearly price?
hi, stepping in here as two-shoes is away. Let me catch up
Yes, that is correct. You can only apply it to the product id, https://stripe.com/docs/api/coupons/create#create_coupon-applies_to
OK. I'll put in a feature request to have coupons that can apply to a given price, but thanks for the info!