#umethi

1 messages · Page 1 of 1 (latest)

vestal beaconBOT
wraith karma
#

Good question. Do you have the ID of any example invoices (in_123) that failed that way?

sonic storm
#

Alternatively, if I received a finalization failed event, will this work to fix any type of error?

  • Update the affected invoice so automatic_tax[enabled]=false.
  • Update the affected subscription so automatic_tax[enabled]=false.
  • Finalize the affected invoice.
sonic storm
#

We're moreso just trying to understand if finalization fails, in which cases can we automatically retry the finalization and when we need additional information from the customer

wraith karma
#

Thanks for the info. As a quick heads up, the server is getting a bit too busy for me to look in to this properly. I'm pulling in a colleague who should be able to help in a minute

vernal plover
#

Hi looking into this. Give me a min to catch up

sonic storm
#

The last_finalization_error hash right?

#

Or specifically the error code

#

So it seems like most of these error cases are tied to address issues

#

If we do this instead, will it successfully finalize the invoice?

  • Update the affected invoice so automatic_tax[enabled]=false.
  • Update the affected subscription so automatic_tax[enabled]=false.
  • Finalize the affected invoice.
vernal plover
#

If automatic tax was the issue, then yeah that is how to handle that specific case

sonic storm
#

So to make sure I'm understanding correctly, in most cases, we can't just retry finalization, correct?

vernal plover
#

It's hard to say because finalization can fail for so many different reasons, but yeah there are plenty of cases where you can't just retry

sonic storm
#

Even if the last_finalization_error.type is one of api_error, card_error, idempotency_error, or invalid_request_error

#

So then last question, once we investigate the last_finalization_error and find out the error code and have it fixed (manually or by the customer)

#

Will the invoice automatically be finalized or we need to finalize it ourselves via the API endpoint?

vernal plover
#

You'll need to manually finalize after

sonic storm
#

Awesome, thank you

#

Appreciate the help!

vernal plover
#

No problem. I will say invoice finalization errors are frequently due to automatic tax, so you may find that to be the usual culprit if you're facing invoice finalization errors

#

But depends on your integration

sonic storm
#

And if automatic tax is the issue

#

This is a potential fix:

#
  • Update the affected invoice so automatic_tax[enabled]=false.
  • Update the affected subscription so automatic_tax[enabled]=false.
  • Finalize the affected invoice.
vernal plover
#

Disabling it is one way to handle it, yeah

#

But also check out the above link

sonic storm
#

This is very helpful, thank you!