#sahil_api
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/1258131103072522281
đ Have more to share? Add details, code, screenshots, videos, etc. below.
Invoices can cancel for a number of reasons. Most often it's because the payment failed
Do you have an Invoice ID I can look at that shows this?
Hello, let me grab that
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
This looks like a paid invoice. It hasn't been canceled
ok, my bad - what I meant is the subscription for this invoice is cancelled
So the finalization period is 1 hour for normal subscription invoices, is it different for cancelled subscription invoice?
You set auto advance to false on creation: https://dashboard.stripe.com/logs/req_2WEZoaH5TeUsH5
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Yeah but then updated the invoice to set it to true
1 month later though
as far as i know that hour only applies if invoice is being created with auto advance
Yes, 1 month later
So what's the way to create an invoice and keep them in draft for more than year
that's why I create with autoadvance=false
that's the right way
Are you saying I should create with autoadvance=true and then set it to autoadvance=false
ok, I have to set autoadvance to true to finalize an invoice right?
You do not
You just need to call https://docs.stripe.com/api/invoices/finalize
And you can set auto_advance to true while calling the above to automatically attempt payment: https://docs.stripe.com/api/invoices/finalize#finalize_invoice-auto_advance
otherwise, you'd need a separate api call to attempt payment
What our current flow is - we set autoadvance=true to buy some time while we can update the invoice, and then after an hour the invoice finalizes
This works for normal subscription but fails for cancelled subscriptions
Your suggestion to call the finalize API doesn't give us time to update the draft invoice
if autoadvance is false, then invoice never leaves draft state
You have as much time as you want
Yeah sure
Let's just say we want to start finalization and then do some stuff
That is what auto_advance is for