#forcewill
1 messages ยท Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- forcewill, 20 hours ago, 26 messages
Hi ๐ that's correct, because Promotion Codes are only usable on Stripe hosted surfaces like Checkout Sessions. For an Invoice API, you'd instead pass the ID of the Coupon that the Promotion Code relates to.
It would still be nice to be able to provide those, we're not using checkout
So we use promotion codes
Its a nitpick but we use that simulation in the UX to return to the user the resulting simulation
Where can one open feature requests/changes Github?
I can file that feedback for you, but I'm not convinced it's a change that you would likely see. Nevertheless I'll get that feedback to the right team.
I see that as parity between the update subscription endpoint and the get upcomming invoice
- When updating a subscription I can provide a Promotion Code
- When using the
uppcommingendpoint to get a simulation (before running an update subscription), it would also be nice to be able to provide the promotion code directly (and get it in the result)
I guess its a common flow to show a simulation to a customer before he commits to an upgrade, and that would simplify a bit us integrators the code ๐
Right now I have to do something like this
// Stripe invoice upcoming endpoint does not allow passing a promotion code to get an invoice preview. // And as such we do not get a promotion code in the response also. // So we if params.PromoCode != nil { result.SimulatedDiscount.Discount.Code = *params.PromoCode }
๐
A nitpick anyway, I can easly work around it
Thanks @winged epoch ๐ซถ
You can't provide a Promotion Code when updating a Subscription, you can only provide Coupons.
Yes I can https://stripe.com/docs/api/subscriptions/update?lang=curl#update_subscription-promotion_code
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 wow, I'm very wrong on that, sorry