#salidux-invoice

1 messages ยท Page 1 of 1 (latest)

sick escarp
#

@neat apex you probably have pending invoice.created webhooks

neat apex
#

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?

sick escarp
#

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

neat apex
#

great, thanks for your help. I'll try it right now

neat apex
#

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.

sick escarp
#

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?

neat apex
#

in_1K9MhmGmy62tNiONaeaYELL1

#

Sorry, the PI status now is requires_confirmation

sick escarp
#

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

neat apex
#

ok... I'll wait and see what happens... it seems I'm a little bit anxious ๐Ÿ˜…

#

thanks again

neat apex
#

After two hours, it is still pending ๐Ÿ˜ฌ

sudden scroll
#

Hi there ๐Ÿ‘‹ definitely understand the anxiety, we're still looking into it

sudden scroll
#

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.

sudden scroll
#

@neat apex can you please try using the pay method confirm if that results in the invoice being paid?

sick escarp
#

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)

neat apex
#

๐Ÿ˜• 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.

errant edge
#

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

neat apex
#

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

errant edge
#

yes that is what karllekko and toby meant above, calling pay endpoint manually via the API

neat apex
#

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?

ionic knot
#

Hey @neat apex
yeah that should be fine! if you run into any issues, you know where to find us ๐Ÿ˜„

neat apex
#

Great! thanks for your help guys... I'll keep you posted on the results

ionic knot
#

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