GET /subscriptions

Returns a list of subscriptions meeting all the conditions specified in the filter parameters below.

Servers

Request headers

Name Type Required Description
chargebee-request-origin-device String No

The device from which the customer has made the request

chargebee-business-entity-id String No

If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.

chargebee-request-origin-user String No

The email address of your customer/user. Use this when the email address has only ASCII characters.

chargebee-request-origin-ip String No

The IP address of the customer where the request originated

chargebee-request-origin-user-encoded String No

The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.

Query parameters

Name Type Required Description
cancel_reason_code Object No

optional, string filter Reason code for canceling the subscription. Must be one from a list of reason codes set in the Chargebee app in Settings > Configure Chargebee > Reason Codes > Subscriptions > Subscription Cancellation . Must be passed if set as mandatory in the app. The codes are case-sensitive.Supported operators : is, is_not, starts_with, in, not_inExample → cancel_reason_code[is] = "Not Paid"

cancel_reason Object No

optional, enumerated string filterThe reason for canceling the subscription. Set by Chargebee automatically. Possible values are : not_paid, no_card, fraud_review_failed, non_compliant_eu_customer, tax_calculation_failed, currency_incompatible_with_gateway, non_compliant_customer.Supported operators : is, is_not, in, not_in, is_presentExample → cancel_reason[is] = "not_paid"

activated_at Object No

optional, timestamp(UTC) in seconds filterTime at which the subscription status last changed to  active. For example, this value is updated when an in_trial or  cancelled subscription activates.Supported operators : after, before, on, between, is_presentExample → activated_at[after] = "1435054328"

item_price_id Object No

optional, string filterThe plan item price code.Supported operators : is, is_not, starts_with, in, not_inExample → item_price_id[is] = "silver-USD-monthly"

has_scheduled_changes Object No

optional, boolean filterIf true, there are subscription changes scheduled on next renewal. Possible values are : true, falseSupported operators : isExample → has_scheduled_changes[is] = "true"

business_entity_id Object No

optional, string filterThe unique ID of the business entity of this subscription. This is always the same as the business entity of the customer. Supported operators : is, is_not, starts_withExample → business_entity_id[is_not] = "business_entity_id"

status Object No

optional, enumerated string filterCurrent state of the subscription. Possible values are : future, in_trial, active, non_renewing, paused, cancelled.Supported operators : is, is_not, in, not_inExample → status[is_not] = "active"

auto_close_invoices Object No

optional, boolean filterSet to false to override for this subscription, the site-level setting for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute has a higher precedence than the same attribute at the customer level. Possible values are : true, falseSupported operators : isExample → auto_close_invoices[is] = "true"

override_relationship Object No

optional, boolean filterIf true, ignores the hierarchy relationship and uses customer as payment and invoice owner. Possible values are : true, falseSupported operators : isExample → override_relationship[is] = "false"

include_deleted Boolean No

Indicates whether to include deleted objects in the list. The deleted objects have the attribute deleted as true.

Default value: false

updated_at Object No

optional, timestamp(UTC) in seconds filterTo 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, betweenExample → updated_at[after] = "1243545465"

id Object No

optional, string filterA unique and immutable identifier for the subscription. If not provided, it is autogenerated.Supported operators : is, is_not, starts_with, in, not_inExample → id[is_not] = "8gsnbYfsMLds"

customer_id Object No

optional, string filterIdentifier of the customer with whom this subscription is associated.Supported operators : is, is_not, starts_with, in, not_inExample → customer_id[is] = "8gsnbYfsMLds"

offline_payment_method Object No

optional, enumerated string filterThe preferred offline payment method for the subscription. Possible values are : no_preference, cash, check, bank_transfer, ach_credit, sepa_credit.Supported operators : is, is_not, in, not_inExample → offline_payment_method[is_not] = "cash"

next_billing_at Object No

optional, timestamp(UTC) in seconds filterThe date/time at which the next billing for the subscription happens. This is usually right after current_term_end unless multiple subscription terms were invoiced in advance using the terms_to_charge parameter.Supported operators : after, before, on, betweenExample → next_billing_at[after] = "1435054328"

limit Integer No

The number of resources to be returned.

Default value: 10

channel Object No

optional, enumerated string filterThe subscription channel this object originated from and is maintained in. Possible values are : web, app_store, play_store.Supported operators : is, is_not, in, not_inExample → channel[is_not] = "APP STORE"

remaining_billing_cycles Object No

optional, integer filter

  • When the subscription is not on a contract term: this value is the number of billing cycles remaining after the current cycle, at the end of which, the subscription cancels.
  • When the subscription is on a contract term: this value is the number of billing cycles remaining in the contract term after the current billing cycle.

.Supported operators : is, is_not, lt, lte, gt, gte, between, is_presentExample → remaining_billing_cycles[is_not] = "3"

cancelled_at Object No

optional, timestamp(UTC) in seconds filterTime at which subscription was cancelled or is set to be cancelled.Supported operators : after, before, on, betweenExample → cancelled_at[after] = "1435054328"

created_at Object No

optional, timestamp(UTC) in seconds filterThe time at which the subscription was created.Supported operators : after, before, on, betweenExample → created_at[before] = "1435054328"

item_id Object No

optional, string filterThe plan item code.Supported operators : is, is_not, starts_with, in, not_inExample → item_id[is_not] = "silver"

sort_by Object No

optional, string filterSorts based on the specified attribute. Supported attributes : created_at, updated_atSupported sort-orders : asc, descExample → *sort_by[asc] = "created_at"*This will sort the result based on the 'created_at' attribute in ascending(earliest first) order.

offset String No

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.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.