#numericity
1 messages · Page 1 of 1 (latest)
Hi there,
What is you question ?
Hey @wild imp. I hope you're well.
Fine, thanks 🙂
I want to display a list of prices to a customer, and that customer may have a coupon
That coupon may apply to one, or many of the prices
How would I request the reduced costs for those prices most efficiently?
For example, I fetch these prices from Stripe via the API, but my customer has a coupon that reduces the Startup plan by £10/mo
Do I have to make 5 requests to Stripe, passing the coupon?
How would I request the reduced costs for those prices most efficiently?
What do you mean by this ?
Do I have to make 5 requests to Stripe, passing the coupon?
Actually you apply the coupon when creating the subscription by the user, Why you want to pass the coupon for all the prices at once ?
In my scenario, if a customer is referred by an affiliate, behind the scenes we assign a coupon to them in our db. This knocks 20% off. I'd like to show my customer the subscription cost that they'd actually be paying
Then once you fetch the prices by API, in your integration you apply the reduction in your integration and you show the user the final price, after that you just apply the coupon to the subscription
How would I request the reduced costs
There is no API to request the reduced costs meanwhile
So I fetch the coupon details in a request, then manually do the deduction my end?
I'm currently doing this with the upcoming invoice endpoint using subscription_items, but can only do 1 at a time
Yes
Yes but this is when the customer did choose the plan, but you can't do it for all plans without knowing which plan is chosen I think. The best way is to do the deduction on your end.
Ok, cool
It'd be amazing if Stripe could support a coupon param when listing prices in some way
Actually, the change of the coupon is affected once the user did choose the plan, there is no preview of the coupons using Stripe API, this is something you need handle in your end unfortunately yeah.
Ok, got it, thanks