You are viewing the documentation for Chargebee API V2. If you're using the older version (V1), click here.

Export resource represents an export job and contains the status of the job and the download URL, if the job is successfully completed.

Export operations are asynchronous and will return “Export” resource in response . The export resource will contain the status of the export job (like in-process, completed…) . If the status is completed, it will contain the download url pointing to the zip/pdf containing the exported data.

Note: At any given point, only 5 export jobs can be processed. Beyond that, an error stating that the API request limit has been reached will be returned.

Sample export [ JSON ]

{ "created_at": 1527791400, "id": "__test__KyVnHhSBWTF7H8v", "mime_type": "zip", "object": "export", "operation_type": "Deferred Revenue Report", "status": "failed" }

API Index URL GET

https://{site}.chargebee.com/api/v2/exports
id
string, max chars=50
A unique identifier to identify the export.
operation_type
string, max chars=100
Describes the type of export.
mime_type
enumerated string, default=zip
Describes the mime type of download file.
Possible values are
pdfPDF.zipZIP.
status
enumerated string, default=in_process
Current status of the export operation.
Possible values are
in_processIn Process.completedCompleted.failedFailed.
created_at
timestamp(UTC) in seconds
Export created time.
optional, download
Returns the download_url for the export. The download URL is valid upto a specific date.
Download attributes
download_url
string, max chars=3500
The URL at which the file is available for download.
valid_till
timestamp(UTC) in seconds
The time until which the download_url is valid.
mime_type
optional, string, max chars=100
The media type of the file.

This API gets the status of the export job initiated by the Exports API. If the export job is completed, the downloads resource will also be obtained in the API response. The returned URL in the downloads resource is secure and can be downloaded. The URL expires after 4 hours. Please note that this is a public URL, and can be downloaded by anyone with whom it’s shared.

Note: In case the export is in Failed or In-process state, then the downloads resource will not be available.

Sample Request
curl  https://{site}.chargebee.com/api/v2/exports/__test__KyVnHhSBWTF7H8v \
     -u {site_api_key}:
copy
curl  https://{site}.chargebee.com/api/v2/exports/__test__KyVnHhSBWTF7H8v \
     -u {site_api_key}:

Sample Response [ JSON ]

Show more...
{"export": { "created_at": 1527791400, "id": "__test__KyVnHhSBWTF7H8v", "mime_type": "zip", "object": "export", "operation_type": "Deferred Revenue Report", "status": "failed" }}

URL Format GET

https://{site}.chargebee.com/api/v2/exports/{export_id}
always returned
Resource object representing export.

This API triggers export for the revenue recognition report.

Note: This API call is asynchronous. You need to check if this operation has completed by checking if the export status is completed. You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. In case you are using any of the client libraries, use the wait for export completion function provided as an instance method in the library. You need to check if this operation has completed by checking if the export status is completed. You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method waitForExportCompletion() on the returned Export resource which will wait until the export status changes. You need to check if this operation has completed by checking if the export status is completed. You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method waitForExportCompletion() on the returned Export resource which will wait until the export status changes. You need to check if this operation has completed by checking if the export status is completed. You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method wait_for_export_completion on the returned export resource which will wait until the export status changes. You need to check if this operation has completed by checking if the export status is completed. You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method wait_for_export_completion on the returned export resource which will wait until the export status changes. You need to check if this operation has completed by checking if the export status is completed. You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method WaitForExportCompletion on the returned Export resource which will wait until the export status changes. You need to check if this operation has completed by checking if the export status is completed. You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method wait_for_export_completion on the returned export resource which wait until the export status changes. You need to check if this operation has completed by checking if the export status is completed. You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method wait_for_export_completion on the returned export resource which wait until the export status changes.

Sample Request
curl  https://{site}.chargebee.com/api/v2/exports/revenue_recognition \
     -u {site_api_key}:\
     -d report_by="invoice" \
     -d report_from_month=1 \
     -d report_from_year=2018 \
     -d report_to_month=7 \
     -d report_to_year=2018 \
     -d invoice[status][is_not]="paid" \
     -d invoice[total][lt]=1000 \
     -d subscription[plan_id][is]="basic" \
     -d subscription[status][is]="active" \
     -d customer[first_name][is]="John" \
     -d customer[last_name][is]="Doe" \
     -d customer[email][is]="john@test.com"
copy
curl  https://{site}.chargebee.com/api/v2/exports/revenue_recognition \
     -u {site_api_key}:\
     -d report_by="invoice" \
     -d report_from_month=1 \
     -d report_from_year=2018 \
     -d report_to_month=7 \
     -d report_to_year=2018 \
     -d invoice[status][is_not]="paid" \
     -d invoice[total][lt]=1000 \
     -d subscription[plan_id][is]="basic" \
     -d subscription[status][is]="active" \
     -d customer[first_name][is]="John" \
     -d customer[last_name][is]="Doe" \
     -d customer[email][is]="john@test.com"

Sample Response [ JSON ]

Show more...
{"export": { "created_at": 1527791400, "id": "__test__KyVnHhSBWTI4X8w", "mime_type": "zip", "object": "export", "operation_type": "Revenue Recognition Report", "status": "in_process" }}

URL Format POST

https://{site}.chargebee.com/api/v2/exports/revenue_recognition
report_by
required, enumerated string
Determines the scope of the report. Returns the report based on the value specified.
Possible values are
customerCustomer.invoiceInvoice.productProduct (Includes Plan, Addon and Adhoc).subscriptionSubscription.
currency_code
optional, string, max chars=3
Value must be in ISO 4217 format. Generates the report based on the value specified. If no currency_code value is specified, then consolidated report based on base currency is returned.
report_from_month
required, integer
Obtains report data from the specified month, combined with the value specified for report_from_year. Values must be between 1 and 12, where 1 is January and 12 is December.
report_from_year
required, integer
Obtains report data from the specified year, combined with the value specified for report_from_month.
report_to_month
required, integer
Obtains report data from the specified month, combined with the value specified for report_to_year. Values must be between 1 and 12, where 1 is January and 12 is December.
report_to_year
required, integer
Obtains report data until the specified year, combined with the value specified for report_to_month.
include_discounts
optional, boolean, default=true
Returns amount with discount in the report. If value specified is false, it returns amount without discount.
payment_owner[<operator>]
optional, string filter
Payment owner of an invoice.
Supported operators : is, is_not, starts_with, in, not_in

Example payment_owner[is] = "payment_customer"
cancel_reason_code[<operator>]
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_in

Example cancel_reason_code[is] = "Not Paid"
+
invoice
Parameters for invoice
pass parameters as invoice[<param name>][<operator>]
invoice[id][operator]
optional, string filter
The invoice number. Acts as a identifier for invoice and typically generated sequentially.
Supported operators : is, is_not, starts_with, in, not_in

Example invoice[id][is] = "INVOICE_654"
invoice[recurring][operator]
optional, boolean filter
Boolean indicating whether this invoice belongs to a subscription. Possible values are : true, false
Supported operators : is

Example invoice[recurring][is] = "true"
invoice[status][operator]
optional, enumerated string filter
Current status of this invoice. Possible values are : paid, posted, payment_due, not_paid, voided, pending.
Supported operators : is, is_not, in, not_in

Example invoice[status][is] = "paid"
invoice[price_type][operator]
optional, enumerated string filter
The price type of the invoice. Possible values are : tax_exclusive, tax_inclusive.
Supported operators : is, is_not, in, not_in

Example invoice[price_type][is] = "tax_exclusive"
invoice[date][operator]
optional, timestamp(UTC) in seconds filter
The document date displayed on the invoice PDF.
Supported operators : after, before, on, between

Example invoice[date][before] = "1394532759"
invoice[paid_at][operator]
optional, timestamp(UTC) in seconds filter
Timestamp indicating the date & time this invoice got paid.
Supported operators : after, before, on, between

Example invoice[paid_at][on] = "1394532759"
invoice[total][operator]
optional, in cents filter
Invoiced amount displayed in cents; that is, a decimal point is not present between the whole number and the decimal part. For example, $499.99 is displayed as 49999, and so on.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example invoice[total][gte] = "1000"
invoice[amount_paid][operator]
optional, in cents filter
Payments collected successfully for the invoice. This is the sum of linked_payments[].txn_amount for all linked_payments[] that have txn_status as success.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example invoice[amount_paid][lt] = "800"
invoice[amount_adjusted][operator]
optional, in cents filter
Total adjustments made against this invoice.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example invoice[amount_adjusted][gt] = "100"
invoice[credits_applied][operator]
optional, in cents filter
Total credits applied against this invoice.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example invoice[credits_applied][gt] = "100"
invoice[amount_due][operator]
optional, in cents filter
The unpaid amount that is due on the invoice. This is calculated as: total - amount_paid - sum of applied_credits.applied_amount - sum of adjustment_credit_notes.cn_total - sum of linked_taxes_withheld.amount.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example invoice[amount_due][gte] = "200"
invoice[dunning_status][operator]
optional, enumerated string filter
Current dunning status of the invoice. Possible values are : in_progress, exhausted, stopped, success.
Supported operators : is, is_not, in, not_in, is_present

Example invoice[dunning_status][is] = "in_progress"
invoice[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 invoice[updated_at][after] = "1243545465"
invoice[channel][operator]
optional, enumerated string filter
The 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_in

Example invoice[channel][is] = "APP STORE"
+
subscription
Parameters for subscription
pass parameters as subscription[<param name>][<operator>]
subscription[id][operator]
optional, string filter
A unique and immutable identifier for the subscription. If not provided, it is autogenerated.
Supported operators : is, is_not, starts_with, in, not_in

Example subscription[id][is] = "8gsnbYfsMLds"
subscription[customer_id][operator]
optional, string filter
Identifier of the customer with whom this subscription is associated.
Supported operators : is, is_not, starts_with, in, not_in

Example subscription[customer_id][is] = "8gsnbYfsMLds"
subscription[plan_id][operator]
optional, string filter
Identifier of the plan for this subscription.
Supported operators : is, is_not, starts_with, in, not_in

Example subscription[plan_id][is] = "basic"
subscription[status][operator]
optional, enumerated string filter
Current state of the subscription. Possible values are : future, in_trial, active, non_renewing, paused, cancelled.
Supported operators : is, is_not, in, not_in

Example subscription[status][is] = "active"
subscription[cancel_reason][operator]
optional, enumerated string filter
The 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_present

Example subscription[cancel_reason][is] = "not_paid"
subscription[remaining_billing_cycles][operator]
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_present

Example subscription[remaining_billing_cycles][is_not] = "3"
subscription[created_at][operator]
optional, timestamp(UTC) in seconds filter
The time at which the subscription was created.
Supported operators : after, before, on, between

Example subscription[created_at][after] = "1435054328"
subscription[activated_at][operator]
optional, timestamp(UTC) in seconds filter
Time 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_present

Example subscription[activated_at][after] = "1435054328"
subscription[next_billing_at][operator]
optional, timestamp(UTC) in seconds filter
The 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, between

Example subscription[next_billing_at][on] = "1435054328"
subscription[cancelled_at][operator]
optional, timestamp(UTC) in seconds filter
Time at which subscription was cancelled or is set to be cancelled.
Supported operators : after, before, on, between

Example subscription[cancelled_at][after] = "1435054328"
subscription[has_scheduled_changes][operator]
optional, boolean filter
If true, there are subscription changes scheduled on next renewal. Possible values are : true, false
Supported operators : is

Example subscription[has_scheduled_changes][is] = "true"
subscription[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 subscription[updated_at][before] = "1243545465"
subscription[offline_payment_method][operator]
optional, enumerated string filter
The 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_in

Example subscription[offline_payment_method][is] = "cash"
subscription[auto_close_invoices][operator]
optional, boolean filter
Set 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, false
Supported operators : is

Example subscription[auto_close_invoices][is] = "true"
subscription[channel][operator]
optional, enumerated string filter
The 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_in

Example subscription[channel][is] = "APP STORE"
+
customer
Parameters for customer
pass parameters as customer[<param name>][<operator>]
customer[id][operator]
optional, string filter
Identifier of the customer.
Supported operators : is, is_not, starts_with, in, not_in

Example customer[id][is] = "9bsvnHgsvmsI"
customer[first_name][operator]
optional, string filter
First name of the customer.
Supported operators : is, is_not, starts_with, is_present

Example customer[first_name][is] = "John"
customer[last_name][operator]
optional, string filter
Last name of the customer.
Supported operators : is, is_not, starts_with, is_present

Example customer[last_name][is] = "Clint"
customer[email][operator]
optional, string filter
Email of the customer. Configured email notifications will be sent to this email.
Supported operators : is, is_not, starts_with, is_present

Example customer[email][is] = "john@test.com"
customer[company][operator]
optional, string filter
Company name of the customer.
Supported operators : is, is_not, starts_with, is_present

Example customer[company][is] = "Globex Corp"
customer[phone][operator]
optional, string filter
Phone number of the customer.
Supported operators : is, is_not, starts_with, is_present

Example customer[phone][is_not] = "(541) 754-3010"
customer[auto_collection][operator]
optional, enumerated string filter
Whether payments needs to be collected automatically for this customer. Possible values are : on, off.
Supported operators : is, is_not, in, not_in

Example customer[auto_collection][is_not] = "on"
customer[taxability][operator]
optional, enumerated string filter
Specifies if the customer is liable for tax. Possible values are : taxable, exempt.
Supported operators : is, is_not, in, not_in

Example customer[taxability][is_not] = "taxable"
customer[created_at][operator]
optional, timestamp(UTC) in seconds filter
Timestamp indicating when this customer resource is created.
Supported operators : after, before, on, between

Example customer[created_at][before] = "1435054328"
customer[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 customer[updated_at][after] = "1243545465"
customer[offline_payment_method][operator]
optional, enumerated string filter
The preferred offline payment method for the customer. Possible values are : no_preference, cash, check, bank_transfer, ach_credit, sepa_credit.
Supported operators : is, is_not, in, not_in

Example customer[offline_payment_method][is] = "cash"
customer[auto_close_invoices][operator]
optional, boolean filter
Override for this customer, the site-level setting for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute is also available at the subscription level which takes precedence. Possible values are : true, false
Supported operators : is

Example customer[auto_close_invoices][is] = "true"
customer[channel][operator]
optional, enumerated string filter
The 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_in

Example customer[channel][is_not] = "APP STORE"
+
relationship
Parameters for relationship
pass parameters as relationship[<param name>][<operator>]
relationship[parent_id][operator]
optional, string filter
Immediate parent with whom we will link our new customer(child).
Supported operators : is, is_not, starts_with

Example relationship[parent_id][is_not] = "future_billing"
relationship[payment_owner_id][operator]
optional, string filter
Parent who is going to pay.
Supported operators : is, is_not, starts_with

Example relationship[payment_owner_id][is] = "active1"
relationship[invoice_owner_id][operator]
optional, string filter
Parent who is going to handle invoices.
Supported operators : is, is_not, starts_with

Example relationship[invoice_owner_id][is] = "future_billing"
always returned
Resource object representing export.

This API triggers export for the Deferred Revenue Report.

Note: This API call is asynchronous. You need to check if this operation has completed by checking if the export status is completed. You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. In case you are using any of the client libraries, use the wait for export completion function provided as an instance method in the library. You need to check if this operation has completed by checking if the export status is completed. You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method waitForExportCompletion() on the returned Export resource which will wait until the export status changes. You need to check if this operation has completed by checking if the export status is completed. You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method waitForExportCompletion() on the returned Export resource which will wait until the export status changes. You need to check if this operation has completed by checking if the export status is completed. You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method wait_for_export_completion on the returned export resource which will wait until the export status changes. You need to check if this operation has completed by checking if the export status is completed. You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method wait_for_export_completion on the returned export resource which will wait until the export status changes. You need to check if this operation has completed by checking if the export status is completed. You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method WaitForExportCompletion on the returned Export resource which will wait until the export status changes. You need to check if this operation has completed by checking if the export status is completed. You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method wait_for_export_completion on the returned export resource which wait until the export status changes. You need to check if this operation has completed by checking if the export status is completed. You can do this by retrieving the export in a loop with a minimum delay of 10 secs between two retrieve requests. Use the method wait_for_export_completion on the returned export resource which wait until the export status changes.

Sample Request
curl  https://{site}.chargebee.com/api/v2/exports/deferred_revenue \
     -u {site_api_key}:\
     -d report_by="invoice" \
     -d report_from_month=1 \
     -d report_from_year=2018 \
     -d report_to_month=7 \
     -d report_to_year=2018 \
     -d invoice[status][is_not]="paid" \
     -d invoice[total][lt]=1000 \
     -d subscription[plan_id][is]="basic" \
     -d subscription[status][is]="active" \
     -d customer[first_name][is]="John" \
     -d customer[last_name][is]="Doe" \
     -d customer[email][is]="john@test.com"
copy
curl  https://{site}.chargebee.com/api/v2/exports/deferred_revenue \
     -u {site_api_key}:\
     -d report_by="invoice" \
     -d report_from_month=1 \
     -d report_from_year=2018 \
     -d report_to_month=7 \
     -d report_to_year=2018 \
     -d invoice[status][is_not]="paid" \
     -d invoice[total][lt]=1000 \
     -d subscription[plan_id][is]="basic" \
     -d subscription[status][is]="active" \
     -d customer[first_name][is]="John" \
     -d customer[last_name][is]="Doe" \
     -d customer[email][is]="john@test.com"

Sample Response [ JSON ]

Show more...
{"export": { "created_at": 1527791401, "id": "__test__KyVnHhSBWTANf8l", "mime_type": "zip", "object": "export", "operation_type": "Deferred Revenue Report", "status": "in_process" }}

URL Format POST

https://{site}.chargebee.com/api/v2/exports/deferred_revenue
report_by
required, enumerated string
Determines the scope of the report. Returns the report based on the value specified.
Possible values are
customerCustomer.invoiceInvoice.productProduct (Includes Plan, Addon and Adhoc).subscriptionSubscription.
currency_code
default=null, string, max chars=3
Value must be in ISO 4217 format. Generates the report based on the value specified. If no currency_code value is specified, then consolidated report based on base currency is returned.
report_from_month
required, integer
Obtains report data from the specified month, combined with the value specified for report_from_year.Values must be between 1 and 12, where 1 is January and 12 is December.
report_from_year
required, integer
Obtains report data from the specified year, combined with the value specified for report_from_month.
report_to_month
required, integer
Obtains report data from the specified month, combined with the value specified for report_to_year.Values must be between 1 and 12, where 1 is January and 12 is December.
report_to_year
required, integer
Obtains report data until the specified year, combined with the value specified for report_to_month.
include_discounts
optional, boolean, default=true
Returns amount with discount in the report. If value specified is false, it returns amount without discount.
payment_owner[<operator>]
optional, string filter
Payment owner of an invoice.
Supported operators : is, is_not, starts_with, in, not_in

Example payment_owner[is] = "payment_customer"
cancel_reason_code[<operator>]
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_in

Example cancel_reason_code[is] = "Not Paid"
+
invoice
Parameters for invoice
pass parameters as invoice[<param name>][<operator>]
invoice[id][operator]
optional, string filter
The invoice number. Acts as a identifier for invoice and typically generated sequentially.
Supported operators : is, is_not, starts_with, in, not_in

Example invoice[id][is] = "INVOICE_654"
invoice[recurring][operator]
optional, boolean filter
Boolean indicating whether this invoice belongs to a subscription. Possible values are : true, false
Supported operators : is

Example invoice[recurring][is] = "true"
invoice[status][operator]
optional, enumerated string filter
Current status of this invoice. Possible values are : paid, posted, payment_due, not_paid, voided, pending.
Supported operators : is, is_not, in, not_in

Example invoice[status][is] = "paid"
invoice[price_type][operator]
optional, enumerated string filter
The price type of the invoice. Possible values are : tax_exclusive, tax_inclusive.
Supported operators : is, is_not, in, not_in

Example invoice[price_type][is] = "tax_exclusive"
invoice[date][operator]
optional, timestamp(UTC) in seconds filter
The document date displayed on the invoice PDF.
Supported operators : after, before, on, between

Example invoice[date][before] = "1394532759"
invoice[paid_at][operator]
optional, timestamp(UTC) in seconds filter
Timestamp indicating the date & time this invoice got paid.
Supported operators : after, before, on, between

Example invoice[paid_at][after] = "1394532759"
invoice[total][operator]
optional, in cents filter
Invoiced amount displayed in cents; that is, a decimal point is not present between the whole number and the decimal part. For example, $499.99 is displayed as 49999, and so on.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example invoice[total][gte] = "1000"
invoice[amount_paid][operator]
optional, in cents filter
Payments collected successfully for the invoice. This is the sum of linked_payments[].txn_amount for all linked_payments[] that have txn_status as success.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example invoice[amount_paid][is_not] = "800"
invoice[amount_adjusted][operator]
optional, in cents filter
Total adjustments made against this invoice.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example invoice[amount_adjusted][is] = "100"
invoice[credits_applied][operator]
optional, in cents filter
Total credits applied against this invoice.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example invoice[credits_applied][is] = "100"
invoice[amount_due][operator]
optional, in cents filter
The unpaid amount that is due on the invoice. This is calculated as: total - amount_paid - sum of applied_credits.applied_amount - sum of adjustment_credit_notes.cn_total - sum of linked_taxes_withheld.amount.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example invoice[amount_due][is] = "200"
invoice[dunning_status][operator]
optional, enumerated string filter
Current dunning status of the invoice. Possible values are : in_progress, exhausted, stopped, success.
Supported operators : is, is_not, in, not_in, is_present

Example invoice[dunning_status][is] = "in_progress"
invoice[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 invoice[updated_at][after] = "1243545465"
invoice[channel][operator]
optional, enumerated string filter
The 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_in

Example invoice[channel][is] = "APP STORE"
+
subscription
Parameters for subscription
pass parameters as subscription[<param name>][<operator>]
subscription[id][operator]
optional, string filter
A unique and immutable identifier for the subscription. If not provided, it is autogenerated.
Supported operators : is, is_not, starts_with, in, not_in

Example subscription[id][is] = "8gsnbYfsMLds"
subscription[customer_id][operator]
optional, string filter
Identifier of the customer with whom this subscription is associated.
Supported operators : is, is_not, starts_with, in, not_in

Example subscription[customer_id][is] = "8gsnbYfsMLds"
subscription[plan_id][operator]
optional, string filter
Identifier of the plan for this subscription.
Supported operators : is, is_not, starts_with, in, not_in

Example subscription[plan_id][is] = "basic"
subscription[status][operator]
optional, enumerated string filter
Current state of the subscription. Possible values are : future, in_trial, active, non_renewing, paused, cancelled.
Supported operators : is, is_not, in, not_in

Example subscription[status][is] = "active"
subscription[cancel_reason][operator]
optional, enumerated string filter
The 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_present

Example subscription[cancel_reason][is] = "not_paid"
subscription[remaining_billing_cycles][operator]
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_present

Example subscription[remaining_billing_cycles][lte] = "3"
subscription[created_at][operator]
optional, timestamp(UTC) in seconds filter
The time at which the subscription was created.
Supported operators : after, before, on, between

Example subscription[created_at][after] = "1435054328"
subscription[activated_at][operator]
optional, timestamp(UTC) in seconds filter
Time 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_present

Example subscription[activated_at][after] = "1435054328"
subscription[next_billing_at][operator]
optional, timestamp(UTC) in seconds filter
The 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, between

Example subscription[next_billing_at][after] = "1435054328"
subscription[cancelled_at][operator]
optional, timestamp(UTC) in seconds filter
Time at which subscription was cancelled or is set to be cancelled.
Supported operators : after, before, on, between

Example subscription[cancelled_at][after] = "1435054328"
subscription[has_scheduled_changes][operator]
optional, boolean filter
If true, there are subscription changes scheduled on next renewal. Possible values are : true, false
Supported operators : is

Example subscription[has_scheduled_changes][is] = "true"
subscription[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 subscription[updated_at][after] = "1243545465"
subscription[offline_payment_method][operator]
optional, enumerated string filter
The 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_in

Example subscription[offline_payment_method][is_not] = "cash"
subscription[auto_close_invoices][operator]
optional, boolean filter
Set 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, false
Supported operators : is

Example subscription[auto_close_invoices][is] = "true"
subscription[channel][operator]
optional, enumerated string filter
The 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_in

Example subscription[channel][is] = "APP STORE"
+
customer
Parameters for customer
pass parameters as customer[<param name>][<operator>]
customer[id][operator]
optional, string filter
Identifier of the customer.
Supported operators : is, is_not, starts_with, in, not_in

Example customer[id][is] = "9bsvnHgsvmsI"
customer[first_name][operator]
optional, string filter
First name of the customer.
Supported operators : is, is_not, starts_with, is_present

Example customer[first_name][is_not] = "John"
customer[last_name][operator]
optional, string filter
Last name of the customer.
Supported operators : is, is_not, starts_with, is_present

Example customer[last_name][is_not] = "Clint"
customer[email][operator]
optional, string filter
Email of the customer. Configured email notifications will be sent to this email.
Supported operators : is, is_not, starts_with, is_present

Example customer[email][is] = "john@test.com"
customer[company][operator]
optional, string filter
Company name of the customer.
Supported operators : is, is_not, starts_with, is_present

Example customer[company][is] = "Globex Corp"
customer[phone][operator]
optional, string filter
Phone number of the customer.
Supported operators : is, is_not, starts_with, is_present

Example customer[phone][is] = "(541) 754-3010"
customer[auto_collection][operator]
optional, enumerated string filter
Whether payments needs to be collected automatically for this customer. Possible values are : on, off.
Supported operators : is, is_not, in, not_in

Example customer[auto_collection][is] = "on"
customer[taxability][operator]
optional, enumerated string filter
Specifies if the customer is liable for tax. Possible values are : taxable, exempt.
Supported operators : is, is_not, in, not_in

Example customer[taxability][is] = "taxable"
customer[created_at][operator]
optional, timestamp(UTC) in seconds filter
Timestamp indicating when this customer resource is created.
Supported operators : after, before, on, between

Example customer[created_at][after] = "1435054328"
customer[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 customer[updated_at][before] = "1243545465"
customer[offline_payment_method][operator]
optional, enumerated string filter
The preferred offline payment method for the customer. Possible values are : no_preference, cash, check, bank_transfer, ach_credit, sepa_credit.
Supported operators : is, is_not, in, not_in

Example customer[offline_payment_method][is] = "cash"
customer[auto_close_invoices][operator]
optional, boolean filter
Override for this customer, the site-level setting for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute is also available at the subscription level which takes precedence. Possible values are : true, false
Supported operators : is

Example customer[auto_close_invoices][is] = "true"
customer[channel][operator]
optional, enumerated string filter
The 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_in

Example customer[channel][is] = "APP STORE"
+
relationship
Parameters for relationship
pass parameters as relationship[<param name>][<operator>]
relationship[parent_id][operator]
optional, string filter
Immediate parent with whom we will link our new customer(child).
Supported operators : is, is_not, starts_with

Example relationship[parent_id][is] = "future_billing"
relationship[payment_owner_id][operator]
optional, string filter
Parent who is going to pay.
Supported operators : is, is_not, starts_with

Example relationship[payment_owner_id][is] = "active1"
relationship[invoice_owner_id][operator]
optional, string filter
Parent who is going to handle invoices.
Supported operators : is, is_not, starts_with

Example relationship[invoice_owner_id][is] = "future_billing"
always returned
Resource object representing export.

This API triggers export of plan data. The exported zip file contains CSV files with plan-related data.

Sample Request
curl  https://{site}.chargebee.com/api/v2/exports/plans \
     -u {site_api_key}:\
     -d plan[trial_period][is_not]=14 \
     -d plan[trial_period_unit][is_not]="day" \
     -d plan[addon_applicability][is]="all" \
     -d plan[status][is]="active"
copy
curl  https://{site}.chargebee.com/api/v2/exports/plans \
     -u {site_api_key}:\
     -d plan[trial_period][is_not]=14 \
     -d plan[trial_period_unit][is_not]="day" \
     -d plan[addon_applicability][is]="all" \
     -d plan[status][is]="active"

Sample Response [ JSON ]

Show more...
{"export": { "created_at": 1527791400, "id": "__test__KyVnHhSBWTDoN8s", "mime_type": "zip", "object": "export", "operation_type": "Plans", "status": "in_process" }}

URL Format POST

https://{site}.chargebee.com/api/v2/exports/plans
currency_code[<operator>]
optional, string filter
The currency code (ISO 4217 format) of the plan.
Supported operators : is, is_not, starts_with, in, not_in

Example currency_code[is] = "USD"
+
plan
Parameters for plan
pass parameters as plan[<param name>][<operator>]
plan[id][operator]
optional, string filter
A unique ID for your system to identify the plan.
Supported operators : is, is_not, starts_with, in, not_in

Example plan[id][is] = "Enterprise"
plan[name][operator]
optional, string filter
The display name used in web interface for identifying the plan.
Supported operators : is, is_not, starts_with, in, not_in

Example plan[name][is_not] = "plan_enterprise"
plan[price][operator]
optional, in cents filter
The price of the plan. The unit depends on the type of currency.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example plan[price][gte] = "1200"
plan[period][operator]
optional, integer filter
Defines billing frequency. Example: to bill customer every 3 months, provide "3" here.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example plan[period][lt] = "3"
plan[period_unit][operator]
optional, enumerated string filter
Defines billing frequency in association with billing period. Possible values are : day, week, month, year.
Supported operators : is, is_not, in, not_in

Example plan[period_unit][is] = "month"
plan[trial_period][operator]
optional, integer filter
The free time window for your customer to try your product.
Supported operators : is, is_not, lt, lte, gt, gte, between, is_present

Example plan[trial_period][is] = "14"
plan[trial_period_unit][operator]
optional, enumerated string filter
Time unit for the trial period. Possible values are : day, month.
Supported operators : is, is_not, in, not_in

Example plan[trial_period_unit][is] = "day"
plan[addon_applicability][operator]
optional, enumerated string filter
Indicates if all or only some addons are applicable with the plan. Possible values are : all, restricted.
Supported operators : is, is_not, in, not_in

Example plan[addon_applicability][is] = "all"
plan[giftable][operator]
optional, boolean filter
Specifies if the plan should be gifted or not. Possible values are : true, false
Supported operators : is

Example plan[giftable][is] = "true"
plan[status][operator]
optional, enumerated string filter
The plan state. Possible values are : active, archived, deleted.
Supported operators : is, is_not, in, not_in

Example plan[status][is] = "active"
plan[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-11-09.
Supported operators : after, before, on, between

Example plan[updated_at][after] = "1243545465"
plan[channel][operator]
optional, enumerated string filter
The 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_in

Example plan[channel][is_not] = "APP STORE"
always returned
Resource object representing export.

This API triggers export of addon data. The exported zip file contains CSV files with addon-related data.

Sample Request
curl  https://{site}.chargebee.com/api/v2/exports/addons \
     -u {site_api_key}:\
     -d addon[status][is]="active"
copy
curl  https://{site}.chargebee.com/api/v2/exports/addons \
     -u {site_api_key}:\
     -d addon[status][is]="active"

Sample Response [ JSON ]

Show more...
{"export": { "created_at": 1527791400, "id": "__test__KyVnHhSBWTAsg8m", "mime_type": "zip", "object": "export", "operation_type": "Addons", "status": "in_process" }}

URL Format POST

https://{site}.chargebee.com/api/v2/exports/addons
currency_code[<operator>]
optional, string filter
The currency code (ISO 4217 format) of the addon.
Supported operators : is, is_not, starts_with, in, not_in

Example currency_code[is] = "USD"
+
addon
Parameters for addon
pass parameters as addon[<param name>][<operator>]
addon[id][operator]
optional, string filter
A unique ID for your system to identify the addon.
Supported operators : is, is_not, starts_with, in, not_in

Example addon[id][is] = "support_charge"
addon[name][operator]
optional, string filter
The display name used in web interface for identifying the addon.
Supported operators : is, is_not, starts_with, in, not_in

Example addon[name][is] = "Support Charge"
addon[charge_type][operator]
optional, enumerated string filter
Type of charge. Possible values are : recurring, non_recurring.
Supported operators : is, is_not, in, not_in

Example addon[charge_type][is_not] = "recurring"
addon[price][operator]
optional, in cents filter
Addon price is calculated based on the addon type and charge type. Learn more. The unit depends on the type of currency.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example addon[price][is] = "1300"
addon[period][operator]
optional, integer filter
Applicable only for recurring-addons. Along with 'period_unit' decides the term-price of this addon.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example addon[period][gt] = "3"
addon[period_unit][operator]
optional, enumerated string filter
Applicable only for recurring-addons. Along with 'period' decides the term-price of this addon. Possible values are : day, week, month, year, not_applicable.
Supported operators : is, is_not, in, not_in

Example addon[period_unit][is] = "month"
addon[status][operator]
optional, enumerated string filter
Status of the addon. Possible values are : active, archived, deleted.
Supported operators : is, is_not, in, not_in

Example addon[status][is] = "active"
addon[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-11-09.
Supported operators : after, before, on, between

Example addon[updated_at][on] = "1243545465"
addon[channel][operator]
optional, enumerated string filter
The 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_in

Example addon[channel][is_not] = "APP STORE"
always returned
Resource object representing export.

This API triggers export of coupon data. The exported zip file contains CSV files with coupon-related data.

Sample Request
curl  https://{site}.chargebee.com/api/v2/exports/coupons \
     -u {site_api_key}:\
     -d coupon[duration_type][is]="forever" \
     -d coupon[status][is_not]="active"
copy
curl  https://{site}.chargebee.com/api/v2/exports/coupons \
     -u {site_api_key}:\
     -d coupon[duration_type][is]="forever" \
     -d coupon[status][is_not]="active"

Sample Response [ JSON ]

Show more...
{"export": { "created_at": 1527791400, "id": "__test__KyVnHhSBWTBFx8n", "mime_type": "zip", "object": "export", "operation_type": "Coupons", "status": "in_process" }}

URL Format POST

https://{site}.chargebee.com/api/v2/exports/coupons
currency_code[<operator>]
optional, string filter
The currency code (ISO 4217 format) of the coupon. Applicable for fixed_amount coupons alone.
Supported operators : is, is_not, starts_with, in, not_in

Example currency_code[is_not] = "USD"
+
coupon
Parameters for coupon
pass parameters as coupon[<param name>][<operator>]
coupon[id][operator]
optional, string filter

Used to uniquely identify the coupon in your website/application and to integrate with Chargebee.

Note:

When the coupon ID contains a special character; for example: #, the API returns an error. Make sure that you encode the coupon ID in the path parameter before making an API call.

.
Supported operators : is, is_not, starts_with, in, not_in

Example coupon[id][is] = "OFF2008"
coupon[name][operator]
optional, string filter

The display name used in web interface for identifying the coupon.

Note:

When the name of the coupon set contains a special character; for example: #, the API returns an error. Make sure that you encode the name of the coupon set in the path parameter before making an API call.

.
Supported operators : is, is_not, starts_with, in, not_in

Example coupon[name][is] = "Offer 10"
coupon[discount_type][operator]
optional, enumerated string filter
The type of deduction. Possible values are : fixed_amount, percentage.
Supported operators : is, is_not, in, not_in

Example coupon[discount_type][is] = "fixed_amount"
coupon[duration_type][operator]
optional, enumerated string filter
Specifies the time duration for which this coupon is attached to the subscription. Possible values are : one_time, forever, limited_period.
Supported operators : is, is_not, in, not_in

Example coupon[duration_type][is] = "forever"
coupon[status][operator]
optional, enumerated string filter
Status of the coupon. Possible values are : active, expired, archived, deleted.
Supported operators : is, is_not, in, not_in

Example coupon[status][is] = "active"
coupon[apply_on][operator]
optional, enumerated string filter
The amount on the invoice to which the coupon is applied. Possible values are : invoice_amount, each_specified_item.
Supported operators : is, is_not, in, not_in

Example coupon[apply_on][is] = "invoice_amount"
coupon[created_at][operator]
optional, timestamp(UTC) in seconds filter
Timestamp indicating when this coupon is created.
Supported operators : after, before, on, between

Example coupon[created_at][after] = "145222875"
coupon[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-11-09.
Supported operators : after, before, on, between

Example coupon[updated_at][after] = "1243545465"
always returned
Resource object representing export.

This API triggers export of customer data. The exported zip file contains CSV files with customer-related data.

Sample Request
curl  https://{site}.chargebee.com/api/v2/exports/customers \
     -u {site_api_key}:\
     -d customer[first_name][is_not]="John" \
     -d customer[last_name][is_not]="Doe"
copy
curl  https://{site}.chargebee.com/api/v2/exports/customers \
     -u {site_api_key}:\
     -d customer[first_name][is_not]="John" \
     -d customer[last_name][is_not]="Doe"

Sample Response [ JSON ]

Show more...
{"export": { "created_at": 1527791400, "id": "__test__KyVnHhSBWTC8J8p", "mime_type": "zip", "object": "export", "operation_type": "Customers", "status": "in_process" }}

URL Format POST

https://{site}.chargebee.com/api/v2/exports/customers
+
customer
Parameters for customer
pass parameters as customer[<param name>][<operator>]
customer[id][operator]
optional, string filter
Identifier of the customer.
Supported operators : is, is_not, starts_with, in, not_in

Example customer[id][is_not] = "9bsvnHgsvmsI"
customer[first_name][operator]
optional, string filter
First name of the customer.
Supported operators : is, is_not, starts_with, is_present

Example customer[first_name][is] = "John"
customer[last_name][operator]
optional, string filter
Last name of the customer.
Supported operators : is, is_not, starts_with, is_present

Example customer[last_name][is] = "Clint"
customer[email][operator]
optional, string filter
Email of the customer. Configured email notifications will be sent to this email.
Supported operators : is, is_not, starts_with, is_present

Example customer[email][is_not] = "john@test.com"
customer[company][operator]
optional, string filter
Company name of the customer.
Supported operators : is, is_not, starts_with, is_present

Example customer[company][is] = "Globex Corp"
customer[phone][operator]
optional, string filter
Phone number of the customer.
Supported operators : is, is_not, starts_with, is_present

Example customer[phone][is_not] = "(541) 754-3010"
customer[auto_collection][operator]
optional, enumerated string filter
Whether payments needs to be collected automatically for this customer. Possible values are : on, off.
Supported operators : is, is_not, in, not_in

Example customer[auto_collection][is_not] = "on"
customer[taxability][operator]
optional, enumerated string filter
Specifies if the customer is liable for tax. Possible values are : taxable, exempt.
Supported operators : is, is_not, in, not_in

Example customer[taxability][is] = "taxable"
customer[created_at][operator]
optional, timestamp(UTC) in seconds filter
Timestamp indicating when this customer resource is created.
Supported operators : after, before, on, between

Example customer[created_at][after] = "1435054328"
customer[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 customer[updated_at][after] = "1243545465"
customer[offline_payment_method][operator]
optional, enumerated string filter
The preferred offline payment method for the customer. Possible values are : no_preference, cash, check, bank_transfer, ach_credit, sepa_credit.
Supported operators : is, is_not, in, not_in

Example customer[offline_payment_method][is] = "cash"
customer[auto_close_invoices][operator]
optional, boolean filter
Override for this customer, the site-level setting for auto-closing invoices. Only applicable when auto-closing invoices has been enabled for the site. This attribute is also available at the subscription level which takes precedence. Possible values are : true, false
Supported operators : is

Example customer[auto_close_invoices][is] = "true"
customer[channel][operator]
optional, enumerated string filter
The 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_in

Example customer[channel][is] = "APP STORE"
+
relationship
Parameters for relationship
pass parameters as relationship[<param name>][<operator>]
relationship[parent_id][operator]
optional, string filter
Immediate parent with whom we will link our new customer(child).
Supported operators : is, is_not, starts_with

Example relationship[parent_id][is_not] = "future_billing"
relationship[payment_owner_id][operator]
optional, string filter
Parent who is going to pay.
Supported operators : is, is_not, starts_with

Example relationship[payment_owner_id][is_not] = "active1"
relationship[invoice_owner_id][operator]
optional, string filter
Parent who is going to handle invoices.
Supported operators : is, is_not, starts_with

Example relationship[invoice_owner_id][is] = "future_billing"
always returned
Resource object representing export.

This API triggers export of subscription data. The exported zip file contains CSV files with subscription-related data.

Sample Request
curl  https://{site}.chargebee.com/api/v2/exports/subscriptions \
     -u {site_api_key}:\
     -d subscription[plan_id][is]="basic" \
     -d subscription[status][is]="active"
copy
curl  https://{site}.chargebee.com/api/v2/exports/subscriptions \
     -u {site_api_key}:\
     -d subscription[plan_id][is]="basic" \
     -d subscription[status][is]="active"

Sample Response [ JSON ]

Show more...
{"export": { "created_at": 1527791400, "id": "__test__KyVnHhSBWTEBP8t", "mime_type": "zip", "object": "export", "operation_type": "Subscriptions", "status": "in_process" }}

URL Format POST

https://{site}.chargebee.com/api/v2/exports/subscriptions
cancel_reason_code[<operator>]
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_in

Example cancel_reason_code[is] = "Not Paid"
+
subscription
Parameters for subscription
pass parameters as subscription[<param name>][<operator>]
subscription[id][operator]
optional, string filter
A unique and immutable identifier for the subscription. If not provided, it is autogenerated.
Supported operators : is, is_not, starts_with, in, not_in

Example subscription[id][is] = "8gsnbYfsMLds"
subscription[customer_id][operator]
optional, string filter
Identifier of the customer with whom this subscription is associated.
Supported operators : is, is_not, starts_with, in, not_in

Example subscription[customer_id][is_not] = "8gsnbYfsMLds"
subscription[plan_id][operator]
optional, string filter
Identifier of the plan for this subscription.
Supported operators : is, is_not, starts_with, in, not_in

Example subscription[plan_id][is] = "basic"
subscription[status][operator]
optional, enumerated string filter
Current state of the subscription. Possible values are : future, in_trial, active, non_renewing, paused, cancelled.
Supported operators : is, is_not, in, not_in

Example subscription[status][is] = "active"
subscription[cancel_reason][operator]
optional, enumerated string filter
The 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_present

Example subscription[cancel_reason][is] = "not_paid"
subscription[remaining_billing_cycles][operator]
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_present

Example subscription[remaining_billing_cycles][is] = "3"
subscription[created_at][operator]
optional, timestamp(UTC) in seconds filter
The time at which the subscription was created.
Supported operators : after, before, on, between

Example subscription[created_at][after] = "1435054328"
subscription[activated_at][operator]
optional, timestamp(UTC) in seconds filter
Time 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_present

Example subscription[activated_at][after] = "1435054328"
subscription[next_billing_at][operator]
optional, timestamp(UTC) in seconds filter
The 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, between

Example subscription[next_billing_at][after] = "1435054328"
subscription[cancelled_at][operator]
optional, timestamp(UTC) in seconds filter
Time at which subscription was cancelled or is set to be cancelled.
Supported operators : after, before, on, between

Example subscription[cancelled_at][after] = "1435054328"
subscription[has_scheduled_changes][operator]
optional, boolean filter
If true, there are subscription changes scheduled on next renewal. Possible values are : true, false
Supported operators : is

Example subscription[has_scheduled_changes][is] = "true"
subscription[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 subscription[updated_at][after] = "1243545465"
subscription[offline_payment_method][operator]
optional, enumerated string filter
The 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_in

Example subscription[offline_payment_method][is] = "cash"
subscription[auto_close_invoices][operator]
optional, boolean filter
Set 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, false
Supported operators : is

Example subscription[auto_close_invoices][is] = "true"
subscription[channel][operator]
optional, enumerated string filter
The 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_in

Example subscription[channel][is] = "APP STORE"
always returned
Resource object representing export.

This API triggers export of invoice data. The exported zip file contains CSV files with invoice-related data.

Sample Request
curl  https://{site}.chargebee.com/api/v2/exports/invoices \
     -u {site_api_key}:\
     -d invoice[status][is_not]="paid" \
     -d invoice[total][lte]=1000
copy
curl  https://{site}.chargebee.com/api/v2/exports/invoices \
     -u {site_api_key}:\
     -d invoice[status][is_not]="paid" \
     -d invoice[total][lte]=1000

Sample Response [ JSON ]

Show more...
{"export": { "created_at": 1527791400, "id": "__test__KyVnHhSBWTCX18q", "mime_type": "zip", "object": "export", "operation_type": "Invoices", "status": "in_process" }}

URL Format POST

https://{site}.chargebee.com/api/v2/exports/invoices
payment_owner[<operator>]
optional, string filter
Payment owner of an invoice.
Supported operators : is, is_not, starts_with, in, not_in

Example payment_owner[is] = "payment_customer"
+
invoice
Parameters for invoice
pass parameters as invoice[<param name>][<operator>]
invoice[id][operator]
optional, string filter
The invoice number. Acts as a identifier for invoice and typically generated sequentially.
Supported operators : is, is_not, starts_with, in, not_in

Example invoice[id][is] = "INVOICE_654"
invoice[subscription_id][operator]
optional, string filter
To filter based on subscription_id.
NOTE: Not to be used if consolidated invoicing is enabled.
Supported operators : is, is_not, starts_with, is_present, in, not_in

Example invoice[subscription_id][is] = "3bdjnDnsdQn"
invoice[customer_id][operator]
optional, string filter
The identifier of the customer this invoice belongs to.
Supported operators : is, is_not, starts_with, in, not_in

Example invoice[customer_id][is] = "3bdjnDnsdQn"
invoice[recurring][operator]
optional, boolean filter
Boolean indicating whether this invoice belongs to a subscription. Possible values are : true, false
Supported operators : is

Example invoice[recurring][is] = "true"
invoice[status][operator]
optional, enumerated string filter
Current status of this invoice. Possible values are : paid, posted, payment_due, not_paid, voided, pending.
Supported operators : is, is_not, in, not_in

Example invoice[status][is] = "paid"
invoice[price_type][operator]
optional, enumerated string filter
The price type of the invoice. Possible values are : tax_exclusive, tax_inclusive.
Supported operators : is, is_not, in, not_in

Example invoice[price_type][is] = "tax_exclusive"
invoice[date][operator]
optional, timestamp(UTC) in seconds filter
The document date displayed on the invoice PDF.
Supported operators : after, before, on, between

Example invoice[date][after] = "1394532759"
invoice[paid_at][operator]
optional, timestamp(UTC) in seconds filter
Timestamp indicating the date & time this invoice got paid.
Supported operators : after, before, on, between

Example invoice[paid_at][before] = "1394532759"
invoice[total][operator]
optional, in cents filter
Invoiced amount displayed in cents; that is, a decimal point is not present between the whole number and the decimal part. For example, $499.99 is displayed as 49999, and so on.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example invoice[total][lt] = "1000"
invoice[amount_paid][operator]
optional, in cents filter
Payments collected successfully for the invoice. This is the sum of linked_payments[].txn_amount for all linked_payments[] that have txn_status as success.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example invoice[amount_paid][is] = "800"
invoice[amount_adjusted][operator]
optional, in cents filter
Total adjustments made against this invoice.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example invoice[amount_adjusted][lte] = "100"
invoice[credits_applied][operator]
optional, in cents filter
Total credits applied against this invoice.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example invoice[credits_applied][lt] = "100"
invoice[amount_due][operator]
optional, in cents filter
The unpaid amount that is due on the invoice. This is calculated as: total - amount_paid - sum of applied_credits.applied_amount - sum of adjustment_credit_notes.cn_total - sum of linked_taxes_withheld.amount.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example invoice[amount_due][lte] = "200"
invoice[dunning_status][operator]
optional, enumerated string filter
Current dunning status of the invoice. Possible values are : in_progress, exhausted, stopped, success.
Supported operators : is, is_not, in, not_in, is_present

Example invoice[dunning_status][is] = "in_progress"
invoice[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 invoice[updated_at][after] = "1243545465"
invoice[channel][operator]
optional, enumerated string filter
The 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_in

Example invoice[channel][is_not] = "APP STORE"
always returned
Resource object representing export.

This API triggers export of credit note data. The exported zip file contains CSV files with credit note-related data.

Sample Request
curl  https://{site}.chargebee.com/api/v2/exports/credit_notes \
     -u {site_api_key}:\
     -d credit_note[type][is]="adjustment" \
     -d credit_note[total][lte]=1200
copy
curl  https://{site}.chargebee.com/api/v2/exports/credit_notes \
     -u {site_api_key}:\
     -d credit_note[type][is]="adjustment" \
     -d credit_note[total][lte]=1200

Sample Response [ JSON ]

Show more...
{"export": { "created_at": 1527791400, "id": "__test__KyVnHhSBWTBby8o", "mime_type": "zip", "object": "export", "operation_type": "Credit Notes", "status": "in_process" }}

URL Format POST

https://{site}.chargebee.com/api/v2/exports/credit_notes
+
credit_note
Parameters for credit_note
pass parameters as credit_note[<param name>][<operator>]
credit_note[id][operator]
optional, string filter
Credit-note id.
Supported operators : is, is_not, starts_with, in, not_in

Example credit_note[id][is_not] = "CN_123"
credit_note[customer_id][operator]
optional, string filter
The identifier of the customer this Credit Note belongs to.
Supported operators : is, is_not, starts_with, in, not_in

Example credit_note[customer_id][is] = "4gmiXbsjdm"
credit_note[subscription_id][operator]
optional, string filter
To filter based on subscription_id.
NOTE: Not to be used if consolidated invoicing feature is enabled.
Supported operators : is, is_not, starts_with, is_present, in, not_in

Example credit_note[subscription_id][is] = "4gmiXbsjdm"
credit_note[reference_invoice_id][operator]
optional, string filter
The identifier of the invoice against which this Credit Note is issued.
Supported operators : is, is_not, starts_with, in, not_in

Example credit_note[reference_invoice_id][is] = "INVOICE_876"
credit_note[type][operator]
optional, enumerated string filter
The credit note type. Possible values are : adjustment, refundable.
Supported operators : is, is_not, in, not_in

Example credit_note[type][is] = "adjustment"
credit_note[reason_code][operator]
optional, enumerated string filter
The reason for issuing this Credit Note. The following reason codes are supported now[Deprecated; use the create_reason_code parameter instead]. Possible values are : write_off, subscription_change, subscription_cancellation, subscription_pause, chargeback, product_unsatisfactory, service_unsatisfactory, order_change, order_cancellation, waiver, other, fraudulent.
Supported operators : is, is_not, in, not_in

Example credit_note[reason_code][is] = "waiver"
credit_note[create_reason_code][operator]
optional, string filter
Reason code for creating the credit note. Must be one from a list of reason codes set in the Chargebee app in Settings > Configure Chargebee > Reason Codes > Credit Notes > Create Credit Note. Must be passed if set as mandatory in the app. The codes are case-sensitive.
Supported operators : is, is_not, starts_with, in, not_in

Example credit_note[create_reason_code][is] = "Other"
credit_note[status][operator]
optional, enumerated string filter
The credit note status. Possible values are : adjusted, refunded, refund_due, voided.
Supported operators : is, is_not, in, not_in

Example credit_note[status][is_not] = "adjusted"
credit_note[date][operator]
optional, timestamp(UTC) in seconds filter
The date the Credit Note is issued.
Supported operators : after, before, on, between

Example credit_note[date][before] = "1435054328"
credit_note[total][operator]
optional, in cents filter
Credit Note amount in cents.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example credit_note[total][is] = "1200"
credit_note[price_type][operator]
optional, enumerated string filter
The price type of the Credit Note. Possible values are : tax_exclusive, tax_inclusive.
Supported operators : is, is_not, in, not_in

Example credit_note[price_type][is] = "tax_exclusive"
credit_note[amount_allocated][operator]
optional, in cents filter
The amount allocated to the invoices.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example credit_note[amount_allocated][gte] = "1200"
credit_note[amount_refunded][operator]
optional, in cents filter
The refunds issued from this Credit Note.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example credit_note[amount_refunded][is_not] = "130"
credit_note[amount_available][operator]
optional, in cents filter
The yet to be used credits of this Credit Note.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example credit_note[amount_available][is] = "1400"
credit_note[voided_at][operator]
optional, timestamp(UTC) in seconds filter
Timestamp indicating the date and time this Credit Note gets voided.
Supported operators : after, before, on, between

Example credit_note[voided_at][after] = "1435054328"
credit_note[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.
Supported operators : after, before, on, between

Example credit_note[updated_at][after] = "1243545465"
credit_note[channel][operator]
optional, enumerated string filter
The 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_in

Example credit_note[channel][is] = "APP STORE"
always returned
Resource object representing export.

This API triggers export of transaction data. The exported zip file contains CSV files with transaction-related data.

Sample Request
curl  https://{site}.chargebee.com/api/v2/exports/transactions \
     -u {site_api_key}:\
     -d transaction[payment_method][is_not]="card" \
     -d transaction[status][is]="success"
copy
curl  https://{site}.chargebee.com/api/v2/exports/transactions \
     -u {site_api_key}:\
     -d transaction[payment_method][is_not]="card" \
     -d transaction[status][is]="success"

Sample Response [ JSON ]

Show more...
{"export": { "created_at": 1527791400, "id": "__test__KyVnHhSBWTEge8u", "mime_type": "zip", "object": "export", "operation_type": "Transactions", "status": "in_process" }}

URL Format POST

https://{site}.chargebee.com/api/v2/exports/transactions
+
transaction
Parameters for transaction
pass parameters as transaction[<param name>][<operator>]
transaction[id][operator]
optional, string filter
Uniquely identifies the transaction.
Supported operators : is, is_not, starts_with, in, not_in

Example transaction[id][is] = "txn_88ybdbsnvf2"
transaction[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 transaction[customer_id][is] = "5hjdk8nOpd"
transaction[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 transaction[subscription_id][is] = "5hjdk8nOpd"
transaction[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 transaction[payment_source_id][is] = "pm_3Nl8XXUQUXDVFa2"
transaction[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 transaction[payment_method][is] = "card"
transaction[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 transaction[gateway][is] = "stripe"
transaction[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 transaction[gateway_account_id][is_not] = "gw_3Nl9BNeQ7438Ks1"
transaction[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 transaction[id_at_gateway][is] = "txn_5678HJS89900"
transaction[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 transaction[reference_number][is] = "cus_u239732"
transaction[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 transaction[type][is_not] = "payment"
transaction[date][operator]
optional, timestamp(UTC) in seconds filter
Indicates when this transaction occurred.
Supported operators : after, before, on, between

Example transaction[date][on] = "1435054328"
transaction[amount][operator]
optional, in cents filter
Amount for this transaction.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example transaction[amount][gte] = "1200"
transaction[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 transaction[amount_capturable][lt] = "1200"
transaction[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 transaction[status][is] = "success"
transaction[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 transaction[updated_at][after] = "1243545465"
always returned
Resource object representing export.

This API triggers export of order data. The exported zip file contains CSV files with order-related data.

Sample Request
curl  https://{site}.chargebee.com/api/v2/exports/orders \
     -u {site_api_key}:\
     -d order[status][is]="shipped" \
     -d order[amount_paid][is]=1000
copy
curl  https://{site}.chargebee.com/api/v2/exports/orders \
     -u {site_api_key}:\
     -d order[status][is]="shipped" \
     -d order[amount_paid][is]=1000

Sample Response [ JSON ]

Show more...
{"export": { "created_at": 1527791400, "id": "__test__KyVnHhSBWTDEb8r", "mime_type": "zip", "object": "export", "operation_type": "Orders", "status": "in_process" }}

URL Format POST

https://{site}.chargebee.com/api/v2/exports/orders
total[<operator>]
optional, in cents filter
Total amount charged for the order.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example total[gt] = "1394532759"
+
order
Parameters for order
pass parameters as order[<param name>][<operator>]
order[id][operator]
optional, string filter
Uniquely identifies the order. It is the api identifier for the order.
Supported operators : is, is_not, starts_with, in, not_in

Example order[id][is_not] = "3"
order[subscription_id][operator]
optional, string filter
To filter based on subscription_id.
.
Supported operators : is, is_not, starts_with, is_present, in, not_in

Example order[subscription_id][is] = "3bdjnDnsdQn"
order[customer_id][operator]
optional, string filter
The customer for which the order is created.
Supported operators : is, is_not, starts_with, in, not_in

Example order[customer_id][is] = "3bdjnDnsdQn"
order[status][operator]
optional, enumerated string filter
The status of this order. Possible values are : new, processing, complete, cancelled, voided, queued, awaiting_shipment, on_hold, delivered, shipped, partially_delivered, returned.
Supported operators : is, is_not, in, not_in

Example order[status][is] = "paid"
order[price_type][operator]
optional, enumerated string filter
The price type of the order. Possible values are : tax_exclusive, tax_inclusive.
Supported operators : is, is_not, in, not_in

Example order[price_type][is] = "tax_exclusive"
order[order_date][operator]
optional, timestamp(UTC) in seconds filter
The date on which the order will start getting processed.
Supported operators : after, before, on, between

Example order[order_date][after] = "1394532759"
order[shipping_date][operator]
optional, timestamp(UTC) in seconds filter
This is the date on which the order will be delivered to the customer.
Supported operators : after, before, on, between

Example order[shipping_date][before] = "1394532759"
order[shipped_at][operator]
optional, timestamp(UTC) in seconds filter
The time at which the order was shipped.
Supported operators : after, before, on, between

Example order[shipped_at][after] = "1394532759"
order[delivered_at][operator]
optional, timestamp(UTC) in seconds filter
The time at which the order was delivered.
Supported operators : after, before, on, between

Example order[delivered_at][after] = "1394532759"
order[cancelled_at][operator]
optional, timestamp(UTC) in seconds filter
The time at which the order was cancelled.
Supported operators : after, before, on, between

Example order[cancelled_at][before] = "1394532759"
order[amount_paid][operator]
optional, in cents filter
Total amount paid for the order.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example order[amount_paid][is_not] = "1000"
order[refundable_credits][operator]
optional, in cents filter
The total amount that can be issued as credits for this order.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example order[refundable_credits][is_not] = "1000"
order[refundable_credits_issued][operator]
optional, in cents filter
The total amount issued as credits on behalf of this order.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example order[refundable_credits_issued][is] = "1000"
order[updated_at][operator]
optional, timestamp(UTC) in seconds filter
Filter based on the time at which order has been updated.
Supported operators : after, before, on, between

Example order[updated_at][after] = "1243545465"
order[resent_status][operator]
optional, enumerated string filter
Resent order status. Possible values are : fully_resent, partially_resent.
Supported operators : is, is_not, in, not_in

Example order[resent_status][is] = "fully_resent"
order[is_resent][operator]
optional, boolean filter
Order is resent order or not. Possible values are : true, false
Supported operators : is

Example order[is_resent][is] = "false"
order[original_order_id][operator]
optional, string filter
If resent order what is the parent order id.
Supported operators : is, is_not, starts_with

Example order[original_order_id][is_not] = "1243545465"
always returned
Resource object representing export.