Delete All Customer’s Invoices
DELETE https://api.chartmogul.com/v1/data_sources/{DATA_SOURCE_UUID}/customers/{CUSTOMER_UUID}/invoices
Deletes all invoices for a given customer and data source.
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",
)
{}
true
{}
true
nil
None
Path parameters
data_source_uuid
string required- The ChartMogul UUID of the data source for which invoices need to be deleted.
customer_uuid
string required- The ChartMogul UUID of the customer for which invoices need to be deleted.
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.