#veesh_api

1 messages ¡ Page 1 of 1 (latest)

warm haloBOT
#

👋 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/1328371966142582807

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

vocal iron
#
cobalt sonnet
#

Yes indeed

#

Really I would wanna express this as a tiered price, but we have arbitrary amounts

vocal iron
#

Yeah I think invoice application is limited to Dashboard only currently

cobalt sonnet
#

ah, but it can be done manually? i wasn't able to see how to do so

vocal iron
cobalt sonnet
#

it says there that it's automatic

vocal iron
#

Oh wait, maybe the application is doen at the customer level and then it passes down to open invoices

warm haloBOT
vocal iron
#

So yeah I don't think you can do the credit application to a specific invoice it's just handled automatically via the customer application

cobalt sonnet
#

mmhmmm

vocal iron
#

(sorry this is new to me too)

cobalt sonnet
#

is there a webhook that's fired when a usage based subscription is about to be billed?

#

or only after the invoice goes out

ruby light
#

There will be an invoice.created event when the invoice is initially created in a draft state. That lasts for an hour before the invoice is automatically finalized and sent off, but you can finalize yourself via the API before then.

cobalt sonnet
#

is it possible to make that time period longer? just worried that maybe somehow we'll miss the window

ruby light
#

Not as far as I am aware, double checking if there is a workaround

#

There is a way to control this! You can set auto_advance to false on the Invoice just after it is created. That will keep the invoice in a draft state indefinitely. There isn't a way to set this on the subscription, so the way to do it would be to listen to invoice.created events and make the invoice update call on each new invoice that you want to pause this on https://docs.stripe.com/api/invoices/update#update_invoice-auto_advance

cobalt sonnet
#

similar issue in terms of missing the window, tho

ruby light
#

I more meant having an automated system listen for the events and make that call. The events are sent out immediately when the invoice is created

cobalt sonnet
#

ya, got it

#

are credits applied to draft invoices, or only finalized?

#

ah, docs say only finalized

ruby light
#

Ah yep, so you would need to retrieve the credit for the customer if you aren't already tracking that to see what would apply.

cobalt sonnet
ruby light
#

Subscription invoices as well

cobalt sonnet
#

oh wonderful, so then i don't have concerns anymore; thanks a mil!