#WhySoAsync-invoices-coupons
1 messages · Page 1 of 1 (latest)
So it sounds like the Subscription had already been paid for in this case. Are you updating a Subscription or creating a new one?
So when user is selecting the plan, i'm creating the subscription.
The subscription will have status Incompleted and will expire if it's not paid in 1 day.
I get the client secret, user fills the form with his data and he can apply a coupon.
When he applies coupon i'm just showing him a preview of the price.
When he presses pay,i'm updating first the subscription with coupon, trying to update the invoice so he wil pay 50% discount and after that i'm using client secret to pay the subscription.
The subscription update with coupon works, the invoice update doens't work.
Do you have a request ID for the request that gave you the error?
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
req_OFoe9dQmK8xmlx
👋 stepping in as two-shoes has to step away.
So yeah, to accomplish what you want you should pass the coupon with the Subscription creation
Then i will need to get the priceId when the user selects a plan
Use it for invoice preview
And when user presses pay, it will create the subscription with the coupon , get the clientSecret and then pay the invoice right?
Yep