Delete an Invoice
In order to delete an invoice, you need to send a POST request to the following endpoint:
DELETE https://www.mimbla.com/api/v1/merchant/invoice/{invoice_id}
This endpoint doesn't require any parameters, you just need to provide the invoice ID in the URL.
Example Request
DELETE https://www.mimbla.com/api/v1/merchant/invoice/Xu9FO0ZF62PA
Content-Type: application/json
Example Successful Response
If your request is successful, you will receive a response with the http status code 200 Ok
and the following body:
{
"message": "Invoice deleted"
}
Example Error Response
You can't delete an invoice that has a pending payment or has already been paid., if you try to delete an invoice that has a pending payment, you will receive an error response.
If your request is unsuccessful, you will receive a response with the http status code 400 Bad Request
and the following body:
{
"error": "Invoice has a pending payment, cannot be deleted at this time"
}
If you try to delete an invoice that doesn't exist, you will receive a response with the http status code 404 Not Found
and the following body:
{
"error": "Invoice not found"
}