#mrredline-invoicepay-api

1 messages · Page 1 of 1 (latest)

cedar stratusBOT
#

Hello! We'll be with you shortly. 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.

brave ridge
#

My thoughts are - for more immediate feedback for the user, if stripe.Invoice.pay returns true I will consider that successful. If it returns false, I would then lookup the invoice, then the paymentintent to return to them the reason of the decline

#

let me know if there's a better pattern

rotund swan
#

If it is paid then the invoice is paid successfully

#

if it is open you will want to also check the status of the invoice's payment intent as it may be processing if you are using a payment method like ACH

brave ridge
#

ok thank you will do

rotund swan
cedar stratusBOT
brave ridge
#

thats awesome! thank you

#

last question - i notice when the payment fails, the invoice.pay call throws an exception so I'm not able to capture the invoice. i have to make a manual call to the invoice.

#

is there a way to make it not exception and just return the invoice?

near fiber
#

HI 👋

I'm stepping in as my colleague had to go. There isn't a way to change how the API responds (200 vs 4xx) so you would need to catch that exception and perform the handling in your code.

brave ridge
#

ok thank you