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
https://developer.infusionsoft.com/docs/rest/#!/E-Commerce/deleteOrderUsingDELETE

But I got this
Exception: Client error: DELETE https://api.infusionsoft.com/crm/rest/v1/orders/7812?access_token=xxxxx 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