Retrieve a Transaction

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

Retrieves the details of a transaction.

curl -X GET "https://api.chartmogul.com/v1/transactions/tr_c9e3f5ff-a091-4232-a7b9-234632fb1754?include_edit_histories=true"" \
     -u YOUR_API_KEY:
{
  "uuid": "tr_c9e3f5ff-a091-4232-a7b9-234632fb1754",
  "external_id": "trans_00241",
  "type": "refund",
  "date": "2024-12-25T18:10:00.000Z",
  "result": "successful",
  "transaction_fees_in_cents": null,
  "transaction_fees_currency": null,
  "disabled": false,
  "disabled_at": null,
  "disabled_by": null,
  "user_created": true,
  "edit_history_summary":
  {}
}

Behavior with different types of sources. For automatic sources like Stripe, Chargebee, Recurly and Braintree (the latest version of the integration), we now permanently store all records added, edited or disabled using the API. Such edits are preserved after customer re-syncs and automatic updates.

For these sources, use the include_edit_histories query parameter when retrieving transactions to fetch both the original values imported from the billing system and the edited values. The with_disabled query parameter allows you to include disabled records in the response.

For other automatic sources, edits done via the API may be overwritten during customer re-syncs or automatic updates.

For custom sources, edits are not stored separately from the original data.

Path parameters

transaction_uuid string required
The ChartMogul UUID of the transaction to retrieve.

Query parameters

include_edit_historiesboolean optional default: "false"
Specifies whether the response should contain the edit_history_summary object with a summary of edits. This object is empty for transactions in sources not supporting data editing.
with_disabledboolean optional default: false
Specifies whether the response should contain disabled transaction.

Response

The response object contains the following data:

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 sources like Stripe, Chargebee, Recurly and Braintree (the latest version of the integration).

edit_history_summary

A summary of edits made to the transaction, available when you set the include_edit_histories query parameter to true. The object is empty if the invoice and transaction belong to a source not supporting data edits.

The summary contains the following properties:

values_changed
The object with the list of edited or added peroperties. Each property that has been edited or added is represented as an object with its original_value and edited_value.
latest_edit_author
The email address of the user who made the most recent edit to the transaction.
latest_edit_performed_at
The timestamp when the most recent edit was made, in ISO 8601 format.