#saurabh_best-practices
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1288779968771264533
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hello! I'm sorry, I don't understand what you're asking.
in stripe for subscriptions, we create subscription then a invoice object is associated with that subscription
in similar way, a payment object is associated with that invoice, and there is a client secret in payment object
we use that client_secret to go to the payment page from frontend
but now i want to apply coupons on that payment page
??
you apply coupons by passing them when creating the Subscription https://docs.stripe.com/api/subscriptions/create#create_subscription-discounts . You can't do it after that while working with the invoice.payment_intent, that's not something we support right now.
if I pass the 100%off coupon while creating subscription then a 0$ invoice is generated but no payment object is associated with that invoice and also that invoice is already paid.
correct, yes.
in that case i can't pass any client_secret to my frontend team to go to payment page
it will break my flow