#salidux-invoice
1 messages ยท Page 1 of 1 (latest)
@neat apex you probably have pending invoice.created webhooks
https://stripe.com/docs/billing/subscriptions/webhooks#understand that can delay things by 72 hours
Is there any API call I can try to force the invoices finalization?
https://stripe.com/docs/api/invoices/finalize would do it!
Regarding the webhook, we noticed yesterday that it was an old integration that was failing. We removed it and new invoices are being processed normally.
However, invoices created in since 12/20 are still stuck... I'll try with the finalize enpoint.
After manually finalizing the invoice, should I manually call the pay method too or it will auto-advance?
if if they have auto-advance:true then after finalising them they'll be charged automatically shortly afterwards so you don't have to call the Pay endpoint
great, thanks for your help. I'll try it right now
I tried it and after finalized, the invoice transitioned to the "open" status and a payment intent was created. However, after a few minutes, the invoice is still open and the payment is incomplete. I'm not sure why, but the payment intent has status: requires_payment_method. This is weird because the user has a credit card as the default payment method.
sounds like a normal finalised invoice
it will get picked up for being charged by the recurring logic soon enough(not sure on the timeframe but give it an hour or so)
do you have the in_xxx ID so I can look?
yep that seems normal to me
invoices in that state get picked up a sweeper and paid after a while, so if you give it a little time that will happen
ok... I'll wait and see what happens... it seems I'm a little bit anxious ๐
thanks again
After two hours, it is still pending ๐ฌ
Hi there ๐ definitely understand the anxiety, we're still looking into it
Sorry that it took so long, but we've worked with some of our colleagues and believe we've found the cause of why the invoice isn't advancing. It looks like currently the auto advancing of the invoice, and it's related objects, has been paused due to us not being able to deliver the invoice.created event to one of the webhook endpoints.
@neat apex can you please try using the pay method confirm if that results in the invoice being paid?
my bad there, I knew that the webhook problem delays the finalisation but I thought if you finalised it manually, then it would get automatically paid, but that's not actually the case(the webhook needs to be delivered before we'll pay the finalised invoice as well)
๐ so there is no way to process those payments before the 72 hours? We already removed the webhook, so it won't fail again. I see that some webhooks will be retried in 8 hours, 16 hours, etc... Based on the documentation, if at the moment of the retry the webhook doesn't exist, it won't fail, but I don't know if it will still be blocked for 72 hours.
stepping in here and catching up, give me a min
so there is no way to process those payments before the 72 hours?
there is, you manually finalize and pay the Invoices
do you mean via API? I've already finalized one invoice via API, but it is still open. Should I call the pay invoice endpoint too? It is configured to auto-advance, but I can try
yes that is what karllekko and toby meant above, calling pay endpoint manually via the API
It worked! ๐ฅณ
So I'll run a script to list the draft invoices created more than 12 hours ago, finalize them, and pay them.
Do you see any issues with my plan?
Hey @neat apex
yeah that should be fine! if you run into any issues, you know where to find us ๐
Great! thanks for your help guys... I'll keep you posted on the results
Just as a heads up though, you may wanna try it out on a few invoices before writing a script for all of them just for correctness