#sahil_api

1 messages ¡ Page 1 of 1 (latest)

stiff hollyBOT
#

👋 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.

foggy gulch
#

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?

odd flume
#

Hello, let me grab that

foggy gulch
#

This looks like a paid invoice. It hasn't been canceled

odd flume
#

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?

trail lotus
odd flume
#

Yeah but then updated the invoice to set it to true

trail lotus
#

1 month later though

#

as far as i know that hour only applies if invoice is being created with auto advance

odd flume
#

Yes, 1 month later

#

So what's the way to create an invoice and keep them in draft for more than year

trail lotus
#

disable autoadvance

#

then finalize manually when you're ready

odd flume
#

that's why I create with autoadvance=false

trail lotus
#

that's the right way

odd flume
#

Are you saying I should create with autoadvance=true and then set it to autoadvance=false

trail lotus
#

nope how you're doing it now is good

#

just leave it as autoadvance=false

odd flume
#

ok, I have to set autoadvance to true to finalize an invoice right?

trail lotus
#

You do not

#

otherwise, you'd need a separate api call to attempt payment

odd flume
#

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

trail lotus
#

You have as much time as you want

odd flume
#

Yeah sure
Let's just say we want to start finalization and then do some stuff
That is what auto_advance is for

trail lotus
#

Auto advance just advances the invoice automatically once you've completed a step

#

I don't understand the issue here

#

If you leave auto advance disabled, invoice is in draft as long as you want it to be

#

You can make as many changes as you want for as long as you want