Delete All Customer’s Invoices

Deletes all invoices for a given customer and data source.

Examples
curl -X DELETE "https://api.chartmogul.com/v1/data_sources/ds_fef05d54-47b4-431b-aed2-eb6b9e545430/customers/cus_f466e33d-ff2b-4a11-8f85-417eb02157a7/invoices" \
     -u YOUR_API_KEY: \
     -H "Content-Type: application/json"
ChartMogul::CustomerInvoices.destroy_all!(
  "ds_fef05d54-47b4-431b-aed2-eb6b9e545430",
  "cus_f466e33d-ff2b-4a11-8f85-417eb02157a"
)
Invoice.destroy_all(
  "ds_fef05d54-47b4-431b-aed2-eb6b9e545430",
  "cus_f466e33d-ff2b-4a11-8f85-417eb02157a"
);
ChartMogul\CustomerInvoices::destroyAll(
  "ds_fef05d54-47b4-431b-aed2-eb6b9e545430",
  "cus_f466e33d-ff2b-4a11-8f85-417eb02157a"
);
api.DeleteCustomerInvoices(
  "ds_fef05d54-47b4-431b-aed2-eb6b9e545430",
  "cus_f466e33d-ff2b-4a11-8f85-417eb02157a",
)
chartmogul.Invoice.destroy_all(
  config,
  data_source_uuid="ds_fef05d54-47b4-431b-aed2-eb6b9e545430",
  customer_uuid="cus_f466e33d-ff2b-4a11-8f85-417eb02157a",
)
Result Format
{}
true
{}
true
nil
None

🚧

Impact of this action

This request will permanently delete all customer's invoices and all associated data. Deleted data includes line items & transactions. If there is an invoice where this is the only invoice for a subscription, then deleting this invoice will also remove the subscription. Metrics for the customer will be recalculated based on the remaining billing data after this action. This action cannot be undone.

Language
Credentials
Basic
base64
: