Disable a Transaction

PATCH https://api.chartmogul.com/v1/transactions/{TRANSACTION_UUID}/disabled_state

Disables or enables a transaction in sources that support disabling records.

curl -X PATCH "https://api.chartmogul.com/v1/transactions/tr_c9e3f5ff-a091-4232-a7b9-234632fb1754/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/transactions/disabled_state?external_id=trans_00241&data_source_uuid=ds_fef05d54-47b4-431b-aed2-eb6b9e545430" \
     -u YOUR_API_KEY: \
     -H "Content-Type: application/json" \
     -d '{
            "disabled": true
        }'
{
  "uuid": "tr_c9e3f5ff-a091-4232-a7b9-234632fb1754",
  "external_id": "trans_00241",
  "type": "refund",
  "date": "2024-12-25T18:10:00.000Z",
  "result": "successful",
  "amount_in_cents": 1600,
  "transaction_fees_in_cents": 350,
  "transaction_fees_currency": "EUR",
  "disabled": true,
  "disabled_at": "2025-08-04T13:59:09.486Z",
  "disabled_by": "[email protected]",
  "user_created": false
}

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

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

This endpoint supports identifying the transaction either by its transaction_uuid path parameter or by a combination of external_id and data_source_uuid query parameters.

Path parameters

transaction_uuid string optional
The ChartMogul UUID of the transaction to be disabled. If provided, this value is used to identify the transaction.

Query parameters

external_id string optional
A unique external identifier of the transaction that you want to disable. Required together with data_source_uuid if transaction_uuid is not provided.
data_source_uuid string optional
The ChartMogul UUID of the data source the transaction belongs to. Required together with external_id if transaction_uuid is not provided.

Body parameters

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

Response

The response contains the transaction object:

uuid
The UUID of the transaction object generated by ChartMogul.
external_id
The unique external identifier for this transaction, as specified by you.
type
One of payment or refund, as specified by you.
date
The timestamp of when the transaction was attempted, as specified by you.
result
The result of the transaction attempt. One of successful or failed, as specified by you.
amount_in_cents
The amount partially paid/refunded for this transaction.
transaction_fees_in_cents
The final total transaction fees paid to a billing provider and/or payment processor for this line item. Expressed in cents (or pence for GBP, etc.).
transaction_fees_currency
The three-letter currency code for transaction_fees_in_cents. Refer to the full list of supported currencies.
disabled
A boolean stating whether or not the transaction was disabled.
disabled_by
The email address of the user who disabled the transaction (null for non-disabled records).
disabled_at
The date and time when the transaction was disabled (null for non-disabled records).
user_created
A boolean stating whether or not the transaction was created by the user for one of the automatic sources (Stripe, Chargebee, Recurly, Braintree, Google Play, App Store Connect and SaaSync integrations).