Disable an Invoice
PATCH https://api.chartmogul.com/v1/invoices/{INVOICE_UUID}/disabled_status
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
}'
{
"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 Stripe, Chargebee, Recurly or Braintree (the latest version of the integration), 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.
Path parameters
invoice_uuid
string required- The ChartMogul UUID of the invoice to be updated.
Body parameters
disabled
boolean required- Specifies whether an invoice should be disabled or enabled. Set this to
true
to disable an invoice. Set this tofalse
to 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
automatic
ormanual
. status
- Specifies the status of the invoice, with possible values
open
,paid
,refunded
,voided
orwritten_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 (
null
for non-disabled records). disabled_by
- The email address of the user who disabled the invoice (
null
for non-disabled records). user_created
- A boolean stating whether or not the invoice was created by the user for sources like Stripe, Chargebee, Recurly and Braintree (the latest version of the integration).
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.