Disable an Invoice
PATCH https://api.chartmogul.com/v1/invoices/{INVOICE_UUID}/disabled_state
Disables or enables an invoice (and corresponding line items and transactions) in sources that support disabling records.
curl -X PATCH "https://api.chartmogul.com/v1/invoices/inv_f466e33d-ff2b-4a11-8f85-417eb02157a7/disabled_state" \
-u YOUR_API_KEY: \
-H "Content-Type: application/json" \
-d '{
"disabled": true
}'
# Or using external_id and data_source_uuid
curl -X PATCH "https://api.chartmogul.com/v1/invoices/disabled_state?external_id=inv_0001&data_source_uuid=ds_a356e33d-ff2b-4b11-8f85-417eb02157b7" \
-u YOUR_API_KEY: \
-H "Content-Type: application/json" \
-d '{
"disabled": true
}'
{
"uuid": "inv_f466e33d-ff2b-4a11-8f85-417eb02157a7",
"external_id": "inv_0001",
"date": "2024-11-10T00:00:00.000Z",
"due_date": "2024-11-15T00:00:00.000Z",
"currency": "USD",
"customer_external_id": "cus_RBFK8utRj5BZIN",
"collection_method": null,
"status": "paid",
"errors":
{},
"disabled": true,
"disabled_at": "2025-08-04T10:27:24.316Z",
"disabled_by": "[email protected]",
"user_created": false,
"line_items":
[],
"transactions":
[]
}
Behavior with different types of sources. This endpoint is meant for use with automatic sources (Stripe, Chargebee, Recurly, Braintree, Google Play, App Store Connect and SaaSync integrations), which allow you to disable records.
Trying to disable an invoice in any other source will return an error. You can delete the invoice instead.
Scope of this action. Disabling an invoice disables all line items and transactions belonging to that invoice.
External ID requirement. It’s only possible to disable an invoice that has an external ID, and where all of its line items and transactions also have external IDs. ChartMogul needs this information to associate your edits with the edited record.
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 to be updated. 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.
Body parameters
disabledboolean required- Specifies whether an invoice should be disabled or enabled. Set this to
trueto disable an invoice. Set this tofalseto enable a previously disabled invoice.
Response
The response contains the following data:
uuid- The UUID of the invoice object generated by ChartMogul.
customer_uuid- The UUID of the customer that the invoice belongs to.
external_id- The unique external identifier for this invoice, as specified by you.
date- The date on which this invoice was raised, as specified by you.
due_date- The date by which this invoice must be paid, as specified by you.
currency- The three-letter code of the currency of this invoice, as specified by you.
customer_external_id- The unique identifier for the customer associated with this invoice. Typically an identifier from your internal system.
collection_method- Specifies how the payment for the invoice is collected, with possible values
automaticormanual. status- Specifies the status of the invoice, with possible values
open,paid,refunded,voidedorwritten_off. errors- Specifies if there are any validation errors.
disabled- A boolean stating whether or not the invoice was disabled.
disabled_at- The date and time when the invoice was disabled (
nullfor non-disabled records). disabled_by- The email address of the user who disabled the invoice (
nullfor non-disabled records). user_created- A boolean stating whether or not the invoice was created by the user for one of the automatic sources (Stripe, Chargebee, Recurly, Braintree, Google Play, App Store Connect and SaaSync integrations).
line_items- An empty array of line item objects since line items are also disabled.
transactions- An empty array of transaction objects since transactions are also disabled.