#thomasst
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
You can look at status, if the invoice is in state draft, or paid.
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
Let me take a closer look
The status must be draft or paid and not open: https://stripe.com/docs/api/invoices/object#invoice_object-status
https://stripe.com/docs/invoicing/dashboard/credit-notes says "You can issue a credit note for open, paid and uncollectible invoices."
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.
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
Yeah it's in requires_action
Is there any way to handle this scenario and still issue a note to decrease the due amount?
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.
ok, thanks
Sure. Please, let me know if you have any other questions.