Delete an Invoice
DELETE https://api.chartmogul.com/v1/invoices/{INVOICE_UUID}
Deletes the specified invoice object and all its associated data.
curl -X DELETE "https://api.chartmogul.com/v1/invoices/inv_ee325d54-7ab4-421b-cdb2-eb6b9e546034" \
-u YOUR_API_KEY:
ChartMogul::Invoice.destroy!(uuid: "inv_ee325d54-7ab4-421b-cdb2-eb6b9e546034")
# Or if you have already created an instance (e.g., by searching for external_id):
invoice.destroy!
ChartMogul.Invoice.destroy(config, "inv_ee325d54-7ab4-421b-cdb2-eb6b9e546034");
(new ChartMogul\Invoice(["uuid" => "inv_ee325d54-7ab4-421b-cdb2-eb6b9e546034"]))->destroy();
# Or if you have already created an instance (e.g., by searching for external_id):
$invoice->destroy();
api.DeleteInvoice("inv_ee325d54-7ab4-421b-cdb2-eb6b9e546034")
chartmogul.Invoice.destroy(config, uuid="inv_ee325d54-7ab4-421b-cdb2-eb6b9e546034")
{}
true
{}
true
nil
None
Impact of this action. This request will delete the invoice and all associated data, including line items and transactions. If this is the only invoice for a subscription, deleting this invoice will also remove the subscription. Metrics for the customer will be recalculated based on the billing data remaining after this action.
For automatic sources (Stripe, Chargebee, Recurly, Braintree, Google Play, App Store Connect and SaaSync integrations), a deleted invoice may be restored during a resync. To permanently remove an invoice from an automatic source, you can disable it.
For other sources, deleting an invoice is permanent.
This endpoint supports identifying the invoice either by its invoice_uuid path parameter or by a combination of external_id and data_source_uuid query parameters.
Path parameters
invoice_uuidstring optional- The ChartMogul UUID of the invoice that needs to be deleted. If provided, this value is used to identify the invoice.
Query parameters
external_idstring optional- A unique external identifier of the invoice that you want to update. Required together with
data_source_uuidifinvoice_uuidis not provided. data_source_uuidstring optional- The ChartMogul UUID of the data source the invoice belongs to. Required together with
external_idifinvoice_uuidis not provided.