#thomasst

1 messages · Page 1 of 1 (latest)

teal forumBOT
stable vortex
#

Hi! Let me help you with this.

#

You can look at status, if the invoice is in state draft, or paid.

storm mango
#

But the invoice is open and I'm not able to issue a credit note.

#

It says "You can only create a credit note for an invoice that is either open with no payment pending or paid"

#

How can I programmatically insure it is "open with no payment pending"?

#

*ensure

#

Example invoice in_0MbVSg4rOYBvHyzsW7XAgAZF

stable vortex
#

Let me take a closer look

storm mango
#

It literally says you can issue credit notes for paid invoices.

#

sorry, open invoices

#

The error message specifically says "You can only create a credit note for an invoice that is either open with no payment pending or paid". Therefore again, my question is how do you programmatically check that an invoice is open with no payment pending?

#

Or is there a way I can cancel the pending payment on an open invoice?

#

(I tried cancelling the payment intent with no success: "You cannot cancel PaymentIntents created by invoices. Try voiding the invoice instead.")

#

I just want to keep the invoice open with a credit note.

stable vortex
#

I understand, sorry for confusion. Let me check again

#

I see there's multiple failed attempts to pay the invoice, and currently the PaymentIntent is in requires_action state. It might be the reason why you can't issue the Credit Note

storm mango
#

Yeah it's in requires_action

#

Is there any way to handle this scenario and still issue a note to decrease the due amount?

stable vortex
#

It's best to create a new Invoice in this case, because the current Invoice is, let's say, in the middle of being paid.

storm mango
#

ok, thanks

stable vortex
#

Sure. Please, let me know if you have any other questions.