Disable a Line Item

PATCH https://api.chartmogul.com/v1/line_items/{LINE_ITEM_UUID}

Disables or enables an invoice line item in sources that support disabling records.

curl -X PATCH "https://api.chartmogul.com/v1/line_items/li_b86028e7-c28c-4a0f-9518-fbbdbc259824/disabled_state" \
     -u YOUR_API_KEY: \
     -H "Content-Type: application/json" \
     -d '{
              "disabled": true
         }'
{
  "uuid": "li_b86028e7-c28c-4a0f-9518-fbbdbc259824",
  "external_id": "li_ext_id_00762",
  "type": "subscription",
  "amount_in_cents": 10000,
  "quantity": 1,
  "discount_code": "",
  "discount_amount_in_cents": 0,
  "tax_amount_in_cents": 0,
  "transaction_fees_in_cents": 0,
  "account_code": "",
  "plan_uuid": "pl_5a86bf58-1934-4ccf-9de1-537efa6dd166",
  "plan_external_id": "gold_plan",
  "transaction_fees_currency": null,
  "discount_description": null,
  "event_order": 3,
  "balance_transfer": false,
  "subscription_uuid": "sub_a918d070-3bad-4ddb-8bff-eb8804481d9c",
  "subscription_external_id": "sub_ext_id_00081",
  "prorated": false,
  "proration_type": "full",
  "service_period_start": "2025-06-14T21:39:06.000Z",
  "service_period_end": "2025-07-14T21:39:06.000Z",
  "subscription_set_external_id": "set_ext_id_00012",
  "disabled": true,
  "disabled_at": "2025-08-04T12:56:45.173Z",
  "disabled_by": "[email protected]",
  "user_created": false
}

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 a line item in any other source will return an error. You can delete the line item instead.

External ID requirement. It’s only possible to disable a line item with an external ID. ChartMogul needs this information to associate your edits with the edited record.

Path parameters

line_item_uuid string required
The ChartMogul UUID of the line item to be disabled.

Body parameters

disabled boolean required
Specifies whether a line item should be disabled or enabled. Set this to true to disable a line item. Set this to false to enable a previously disabled line item.

Response

The response contains the updated line item object:

uuid
The UUID of the line_item object generated by ChartMogul.
external_id
The unique external identifier for this line item, as specified by you.
type
The type of line item, either subscription or one_time, as specified by you.
amount_in_cents
The amount in cents charged toward this line item for the specified service period, after discounts and taxes have been applied, as specified by you.
quantity
The quantity of this line item being billed.
discount_code
A reference code for any discount applied to this line item, as specified by you.
discount_amount_in_cents
The discount amount in cents for this line item, as specified by you.
tax_amount_in_cents
The tax amount in cents for this line item, as specified by you.
transaction_fees_in_cents
The transaction fees in cents for this line item, as specified by you.
account_code
The accounting code for the line item, as specified by you.
plan_uuid
The UUID of the plan object associated with the above subscription object, generated by ChartMogul.
plan_external_id
The unique identifier for the plan associated with this invoice. Typically an identifier from your internal system.
transaction_fees_currency
The transaction fees currency for this line item, as specified by you.
discount_description
The discount amount in cents description for this line item, as specified by you.
event_order
A numeric value that determines the sequence in which events are processed when multiple events occur at the same timestamp, as specified by you.
balance_transfer
A boolean stating whether or not this represents a value returned to customer balance.
subscription_uuid
The UUID of the subscription object generated by ChartMogul.
subscription_set_external_id
An optional unique external identifier for the subscription set to which this subscription belongs, as specified by you.
subscription_external_id
The unique external identifier for this subscription, as specified by you.
prorated
A boolean stating whether or not this is a prorated charge for the subscription object, as specified by you.
proration_type
A string defining the type of proration, with possible values differential, full or differential_mrr.
service_period_start
The start of the service period for which the subscription is being charged, as specified by you.
service_period_end
The end of the service period for which the subscription is being charged, as specified by you.
description
A short description of the one_time line item being charged to the customer, as specified by you.
disabled
A boolean stating whether or not the line item was disabled.
disabled_at
The date and time when the line item was disabled (null for non-disabled records).
disabled_by
The email address of the user who disabled the line item (null for non-disabled records).
user_created
A boolean stating whether or not the line item was created by the user for sources like Stripe, Chargebee, Recurly and Braintree (the latest version of the integration).