#eunoia90 - Invoice Payment Timing

1 messages · Page 1 of 1 (latest)

leaden charm
#

Hello! Let me create a thread and then type out an answer...

prime imp
#

thank you!

leaden charm
#

First, you certainly don't want to create a Payment Intent to hold the funds, then create a separate Invoice. That will tie up double the funds for the customer for a while. For example, if the Payment Intent is $100 and the Invoice is $100 then the customer will have $200 inaccessible (the $100 on hold for the Payment Intent plus the $100 which was charged by the Invoice). Canceling the Payment Intent will release the hold, but depending on the card issuer that can take a lot of time (days).

#

After that you can check the status of the Invoice or the status of the Payment Intent associated with the Invoice to confirm the payment succeeded.

prime imp
#

or, so after I finalize the invoice, if I call this API it will short circuit that 1hr wait period?

leaden charm
#

Yep, it should. You can test it in test mode to make sure it behaves as you expect.

prime imp
#

to clarify, if the status returns anything but paid then we can assume the payment failed and end the checkout?

leaden charm
#

Yeah, you can examine the associated Payment Intent for details about what went wrong, or if another step is required (like 3D Secure authentication, for example).

prime imp
#

is the order to first finalize the invoice, then pay, or does "paying" the invoice implicitly finalize it?

leaden charm
#

I think paying it implicitly finalizes, but let me test to make sure...

#

Yep, no need to finalize separately, you can create an Invoice and then /pay it.