How can I remove an order with a refused payment?

Hi, is there a way to remove an order with a failed payment?

I tried to make it with!/E-Commerce/deleteOrderUsingDELETE

But I got this
Exception: Client error: DELETE resulted in a 400 Bad Request response: {“message”:“There was a problem deleting the order. It has valid payments.”}

but the payment was refused
“Your card was declined. Your request was in live mode, but used a known test card.”

So I tried to delete the Invoice with
$infusionsoft->data()->delete(“Invoice”, $orderId);

But I cannot delete records of that table.

Exception: [NoTableAccess]You cannot delete from Invoice through the API

So, any idea how can I remove the order??

Thanks in advance!!

1 Like