Introducing the Better Auth Chargebee plugin: Use it to handle subscriptions, billing, and auth seamlessly.
Chargebeechargebee API

List transactions

Lists all the transactions.

Sample Request

Sample Result[JSON]

URL Format

GET https://[site].chargebee.com/api/v2/transactions

Input Parameters

limit
optional, integer, default=10, min=1, max=100

The number of resources to be returned.

offset
optional, string, max chars=1000

Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set offset to the value of next_offset obtained in the previous iteration of the API call.

include_deleted
optional, boolean, default=false

If set to true, includes the deleted resources in the response. For the deleted resources in the response, the 'deleted ' attribute will be 'true '.

sort_by[<sort-order>]
optional, object

optional, string filter

Sorts based on the specified attribute. Supported attributes : date, updated_at

Supported sort-orders : asc, desc

Example → sort_by[asc] = "date"

This will sort the result based on the 'date' attribute in ascending(earliest first) order.

Filter Params

For operator usages, see the Pagination and Filtering section.
id[<operator>]

optional, string filter

Uniquely identifies the transaction. Supported operators : is, is_not, starts_with, in, not_in

Example → id[is] = "txn_88ybdbsnvf2"

Supported operators: is, is_not, starts_with, in, not_in
Example → txn_88ybdbsnvf2
customer_id[<operator>]

optional, string filter

Identifier of the customer for which this transaction is made. Supported operators : is, is_not, starts_with, is_present, in, not_in

Example → customer_id[is] = "5hjdk8nOpd"

Supported operators: is, is_not, starts_with, is_present, in, not_in
Example → 5hjdk8nOpd
subscription_id[<operator>]

optional, string filter

Identifier of the subscription for which this transaction is made. Supported operators : is, is_not, starts_with, is_present, in, not_in

Example → subscription_id[is] = "5hjdk8nOpd"

Supported operators: is, is_not, starts_with, is_present, in, not_in
Example → 5hjdk8nOpd
payment_source_id[<operator>]

optional, string filter

To filter based on Transaction payment source id. Supported operators : is, is_not, starts_with, is_present, in, not_in

Example → payment_source_id[is] = "pm_3Nl8XXUQUXDVFa2"

Supported operators: is, is_not, starts_with, is_present, in, not_in
Example → pm_3Nl8XXUQUXDVFa2
payment_method[<operator>]

optional, enumerated string filter

The payment method of this transaction. Possible values are : card, cash, check, chargeback, bank_transfer, amazon_payments, paypal_express_checkout, direct_debit, alipay, unionpay, apple_pay, wechat_pay, ach_credit, sepa_credit, ideal, google_pay, sofort, bancontact, giropay, dotpay, other, upi, netbanking_emandates.

Supported operators : is, is_not, in, not_in

Example → payment_method[is_not] = "card"

Supported operators: is, is_not, in, not_in
Example → card
gateway[<operator>]

optional, enumerated string filter

Gateway through which this transaction was done. Applicable only for 'Card' Payment Method. Possible values are : chargebee, chargebee_payments, stripe, wepay, braintree, authorize_net, paypal_pro, pin, eway, eway_rapid, worldpay, balanced_payments, beanstream, bluepay, elavon, first_data_global, hdfc, migs, nmi, ogone, paymill, paypal_payflow_pro, sage_pay, tco, wirecard, amazon_payments, paypal_express_checkout, gocardless, adyen, orbital, moneris_us, moneris, bluesnap, cybersource, vantiv, checkout_com, paypal, ingenico_direct, exact, mollie, quickbooks, razorpay, not_applicable.

Supported operators : is, is_not, in, not_in

Example → gateway[is] = "stripe"

Supported operators: is, is_not, in, not_in
Example → stripe
gateway_account_id[<operator>]

optional, string filter

The gateway account used for this transaction. Supported operators : is, is_not, starts_with, in, not_in

Example → gateway_account_id[is] = "gw_3Nl9BNeQ7438Ks1"

Supported operators: is, is_not, starts_with, in, not_in
Example → gw_3Nl9BNeQ7438Ks1
id_at_gateway[<operator>]

optional, string filter

The id with which this transaction is referred in gateway. Supported operators : is, is_not, starts_with

Example → id_at_gateway[is_not] = "txn_5678HJS89900"

Supported operators: is, is_not, starts_with
Example → txn_5678HJS89900
reference_number[<operator>]

optional, string filter

The reference number for this transaction. For example, the check number when payment_method = check . Supported operators : is, is_not, starts_with, is_present

Example → reference_number[is] = "cus_u239732"

Supported operators: is, is_not, starts_with, is_present
Example → cus_u239732
type[<operator>]

optional, enumerated string filter

Type of the transaction. Possible values are : authorization, payment, refund, payment_reversal.

Supported operators : is, is_not, in, not_in

Example → type[is_not] = "payment"

Supported operators: is, is_not, in, not_in
Example → payment
date[<operator>]

optional, timestamp(UTC) in seconds filter

Indicates when this transaction occurred. Supported operators : after, before, on, between

Example → date[before] = "1435054328"

Supported operators: after, before, on, between
Example → 1435054328
amount[<operator>]

optional, in cents filter

Amount for this transaction. Supported operators : is, is_not, lt, lte, gt, gte, between

Example → amount[gt] = "1200"

Supported operators: is, is_not, lt, lte, gt, gte, between
Example → 1200
amount_capturable[<operator>]

optional, in cents filter

To filter based on transaction's unused authorized/blocked amount. Supported operators : is, is_not, lt, lte, gt, gte, between

Example → amount_capturable[lt] = "1200"

Supported operators: is, is_not, lt, lte, gt, gte, between
Example → 1200
status[<operator>]

optional, enumerated string filter

The status of this transaction. Possible values are : in_progress, success, voided, failure, timeout, needs_attention.

Supported operators : is, is_not, in, not_in

Example → status[is] = "success"

Supported operators: is, is_not, in, not_in
Example → success
updated_at[<operator>]

optional, timestamp(UTC) in seconds filter

To filter based on updated_at. This attribute will be present only if the resource has been updated after 2016-09-28. It is advisable when using this filter, to pass the sort_by input parameter as updated_at for a faster response. Supported operators : after, before, on, between

Example → updated_at[after] = "1243545465"

Supported operators: after, before, on, between
Example → 1243545465

Returns

next_offset
optional, string, max chars=1000

This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.

Transaction object
Resource object representing transaction