#nizar-naasani_best-practices
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1247547880600768542
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
Hi there ๐ can you share the code you're using to create the Subscription with a Promo Code?
Hi Toby, okay one sec
I'm actaully adding the promo code after creating the subscription, which is why I used update subscription
and all is working great except that the subscription status stays incomplete and i would like it to be active, i tried cancelling the payment intent and vioding the invocie
so what do you suggest for me to do?
I would suggest providing the Promotion Code in the Subscription creation request:
https://docs.stripe.com/api/subscriptions/create#create_subscription-discounts-promotion_code
that's the only way to have the promotion code impact the first Invoice that is created.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
unfortunately that's not possible for the usecase i have
there is no other Way to make it active
??
The first Invoice needs to be paid, and the first Invoice for a Subscription is immediately finalized so you don't have a chance to update it after creation. You could mark the invoice as being paid_out_of_band, in which case we treat it as paid without receiving funds from it. That feature is meant to be used for when you take payment for an Invoice outside of Stripe though, so if you use our prebuilt reports or prebuilt customer surfaces like the Customer Portal then things may not appear the way you're expecting.
https://docs.stripe.com/api/invoices/pay#pay_invoice-paid_out_of_band
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I'm sure that the invoice doesn't get finalized after creating the subscription because I checked the dashboard and it wasn't finalized. so in that case, if the invoice is not finalized, what can I do to the invoice? can I void it in order to make the subscription active?
Can you share the ID of a Subscription from your testing?
sorry I'm out of office, could you please answer my question
I want to take a look at your flow, because the Invoice should be automatically finalized when the Subscription is created. If that's not what you're seeing, I need to take a closer look at why.