#akashpatil7596_webhooks
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/1365276112338423831
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- akashpatil7596_api, 2 hours ago, 46 messages
Hello Soma
hi there!
that's normal, invoice are created in draft, and then get automatically finalized in 1 hour.
but if you don't want that, you can write some code to finalize the invoice immediately
Yes I want to get money deduct Immediate, how to do that?
setup a webhook endpoint that listen to the invoice.created event https://docs.stripe.com/webhooks
then make an API call to finalize that invoice https://docs.stripe.com/api/invoices/finalize
Do I have to compulsory use invoice.created endPoint?
invoice.created is not an endpoint. it's an event Stripe sends you to let you know an invoice was created
Yes I know that, do I have to listen to that event?
And in Listening that Event I call the
const invoice = await stripe.invoices.finalizeInvoice('in_1MtGmCLkdIwHu7ix6PgS6g8S');
Right?
correct
and no you don't have to listen to that event. you could just wait one hour for the invoice to finalize automatically.
No I want to deduct money Immediately
then yes you need to manually call the finalize endpoint. and if yuo want this to happen automatically for every new invoice, then listen to the invoice.created event
When Invoice get finalize the money deduct right away, Right?
wait, we have a new setting in the Dashbaord that can help with this: "Invoice finalization grace period"
https://dashboard.stripe.com/test/settings/billing/invoice
When Invoice get finalize the money deduct right away, Right?
if the customer/subscription has a default payment method set, then yes Stripe will try to charge the customer. but note that it can fail for many reasons.
Hello
Sure
Yes