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
A unique identifier to identify the export.
string, max chars=50
operation_type
Describes the type of export.
string, max chars=100
mime_type
Describes the mime type of download file.
enumerated string, default=zip
Possible values are
pdfPDF.zipZIP.
status
Current status of the export operation.
enumerated string, default=in_process
Possible values are
in_processIn Process.completedCompleted.failedFailed.
created_at
Export created time.
timestamp(UTC) in seconds
Returns the download_url for the export. The download URL is valid upto a specific date.
optional, download
Download attributes
download_url
Download url for the requested content.
string, max chars=3500
valid_till
The download_url will be valid until the time specified.
timestamp(UTC) in seconds

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 will expire in 7 days. 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}
Resource object representing export.
always returned

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
Determines the scope of the report. Returns the report based on the value specified.
required, enumerated string
Possible values are
customerCustomer.invoiceInvoice.productProduct (Includes Plan, Addon and Adhoc).subscriptionSubscription.
currency_code
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.
optional, string, max chars=3
report_from_month
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.
required, integer
report_from_year
Obtains report data from the specified year, combined with the value specified for report_from_month.
required, integer
report_to_month
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.
required, integer
report_to_year
Obtains report data until the specified year, combined with the value specified for report_to_month.
required, integer
include_discounts
Returns amount with discount in the report. If value specified is false, it returns amount without discount.
optional, boolean, default=true
payment_owner[<operator>]
Payment owner of an invoice.
Supported operators : is, is_not, starts_with, in, not_in

Example payment_owner[is] = "payment_customer"
optional, string filter
cancel_reason_code[<operator>]
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"
optional, string filter
+
invoice
Parameters for invoice
pass parameters as invoice[<param name>][<operator>]
invoice[id][operator]
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"
optional, string filter
invoice[recurring][operator]
Boolean indicating whether this invoice belongs to a subscription. Possible values are : true, false
Supported operators : is

Example invoice[recurring][is] = "true"
optional, boolean filter
invoice[status][operator]
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"
optional, enumerated string filter
invoice[price_type][operator]
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"
optional, enumerated string filter
invoice[date][operator]
Date indicated on the invoice. The date is based on your billing configuration - normal billing or metered billing. Takes the value of invoice generation date,
  • if metered billing is not enabled.
  • if metered billing is enabled and “Invoice generation date” option is selected.
Takes the value of invoice closing date, if metered billing is enabled and “Invoice closing date” option is selected.
Supported operators : after, before, on, between

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

Example invoice[paid_at][on] = "1394532759"
optional, timestamp(UTC) in seconds filter
invoice[total][operator]
Invoiced amount in cents.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example invoice[total][gte] = "1000"
optional, in cents filter
invoice[amount_paid][operator]
Total payments received for this invoice.
Supported operators : is, is_not, lt, lte, gt, gte, between

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

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

Example invoice[credits_applied][is_not] = "100"
optional, in cents filter
invoice[amount_due][operator]
Total amount to be collected. This includes invoice's payments in progress.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example invoice[amount_due][lt] = "200"
optional, in cents filter
invoice[dunning_status][operator]
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"
optional, enumerated string filter
invoice[updated_at][operator]
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"
optional, timestamp(UTC) in seconds filter
+
subscription
Parameters for subscription
pass parameters as subscription[<param name>][<operator>]
subscription[id][operator]
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"
optional, string filter
subscription[customer_id][operator]
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"
optional, string filter
subscription[plan_id][operator]
Identifier of the plan for this subscription.
Supported operators : is, is_not, starts_with, in, not_in

Example subscription[plan_id][is_not] = "basic"
optional, string filter
subscription[status][operator]
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"
optional, enumerated string filter
subscription[cancel_reason][operator]
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"
optional, enumerated string filter
subscription[remaining_billing_cycles][operator]
  • 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][lt] = "3"
optional, integer filter
subscription[created_at][operator]
The time at which the subscription was created.
Supported operators : after, before, on, between

Example subscription[created_at][after] = "1435054328"
optional, timestamp(UTC) in seconds filter
subscription[activated_at][operator]
Time at which the subscription moved from in_trial state to active. Same as started_at for subscriptions that had no trial.
Supported operators : after, before, on, between, is_present

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

Example subscription[cancelled_at][after] = "1435054328"
optional, timestamp(UTC) in seconds filter
subscription[has_scheduled_changes][operator]
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"
optional, boolean filter
subscription[updated_at][operator]
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"
optional, timestamp(UTC) in seconds filter
subscription[offline_payment_method][operator]
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"
optional, enumerated string filter
+
customer
Parameters for customer
pass parameters as customer[<param name>][<operator>]
customer[id][operator]
Identifier of the customer.
Supported operators : is, is_not, starts_with, in, not_in

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

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

Example customer[last_name][is] = "Clint"
optional, string filter
customer[email][operator]
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"
optional, string filter
customer[company][operator]
Company name of the customer.
Supported operators : is, is_not, starts_with, is_present

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

Example customer[phone][is] = "(541) 754-3010"
optional, string filter
customer[auto_collection][operator]
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"
optional, enumerated string filter
customer[taxability][operator]
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"
optional, enumerated string filter
customer[created_at][operator]
Timestamp indicating when this customer resource is created.
Supported operators : after, before, on, between

Example customer[created_at][before] = "1435054328"
optional, timestamp(UTC) in seconds filter
customer[updated_at][operator]
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][on] = "1243545465"
optional, timestamp(UTC) in seconds filter
customer[offline_payment_method][operator]
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"
optional, enumerated string filter
+
relationship
Parameters for relationship
pass parameters as relationship[<param name>][<operator>]
relationship[parent_id][operator]
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"
optional, string filter
relationship[payment_owner_id][operator]
Parent who is going to pay.
Supported operators : is, is_not, starts_with

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

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

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
Determines the scope of the report. Returns the report based on the value specified.
required, enumerated string
Possible values are
customerCustomer.invoiceInvoice.productProduct (Includes Plan, Addon and Adhoc).subscriptionSubscription.
currency_code
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.
default=null, string, max chars=3
report_from_month
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.
required, integer
report_from_year
Obtains report data from the specified year, combined with the value specified for report_from_month.
required, integer
report_to_month
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.
required, integer
report_to_year
Obtains report data until the specified year, combined with the value specified for report_to_month.
required, integer
include_discounts
Returns amount with discount in the report. If value specified is false, it returns amount without discount.
optional, boolean, default=true
payment_owner[<operator>]
Payment owner of an invoice.
Supported operators : is, is_not, starts_with, in, not_in

Example payment_owner[is] = "payment_customer"
optional, string filter
cancel_reason_code[<operator>]
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] = "Not Paid"
optional, string filter
+
invoice
Parameters for invoice
pass parameters as invoice[<param name>][<operator>]
invoice[id][operator]
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"
optional, string filter
invoice[recurring][operator]
Boolean indicating whether this invoice belongs to a subscription. Possible values are : true, false
Supported operators : is

Example invoice[recurring][is] = "true"
optional, boolean filter
invoice[status][operator]
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"
optional, enumerated string filter
invoice[price_type][operator]
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"
optional, enumerated string filter
invoice[date][operator]
Date indicated on the invoice. The date is based on your billing configuration - normal billing or metered billing. Takes the value of invoice generation date,
  • if metered billing is not enabled.
  • if metered billing is enabled and “Invoice generation date” option is selected.
Takes the value of invoice closing date, if metered billing is enabled and “Invoice closing date” option is selected.
Supported operators : after, before, on, between

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

Example invoice[paid_at][before] = "1394532759"
optional, timestamp(UTC) in seconds filter
invoice[total][operator]
Invoiced amount in cents.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example invoice[total][gte] = "1000"
optional, in cents filter
invoice[amount_paid][operator]
Total payments received for this invoice.
Supported operators : is, is_not, lt, lte, gt, gte, between

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

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

Example invoice[credits_applied][lte] = "100"
optional, in cents filter
invoice[amount_due][operator]
Total amount to be collected. This includes invoice's payments in progress.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example invoice[amount_due][gte] = "200"
optional, in cents filter
invoice[dunning_status][operator]
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"
optional, enumerated string filter
invoice[updated_at][operator]
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"
optional, timestamp(UTC) in seconds filter
+
subscription
Parameters for subscription
pass parameters as subscription[<param name>][<operator>]
subscription[id][operator]
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"
optional, string filter
subscription[customer_id][operator]
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"
optional, string filter
subscription[plan_id][operator]
Identifier of the plan for this subscription.
Supported operators : is, is_not, starts_with, in, not_in

Example subscription[plan_id][is] = "basic"
optional, string filter
subscription[status][operator]
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"
optional, enumerated string filter
subscription[cancel_reason][operator]
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"
optional, enumerated string filter
subscription[remaining_billing_cycles][operator]
  • 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][lt] = "3"
optional, integer filter
subscription[created_at][operator]
The time at which the subscription was created.
Supported operators : after, before, on, between

Example subscription[created_at][before] = "1435054328"
optional, timestamp(UTC) in seconds filter
subscription[activated_at][operator]
Time at which the subscription moved from in_trial state to active. Same as started_at for subscriptions that had no trial.
Supported operators : after, before, on, between, is_present

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

Example subscription[cancelled_at][on] = "1435054328"
optional, timestamp(UTC) in seconds filter
subscription[has_scheduled_changes][operator]
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"
optional, boolean filter
subscription[updated_at][operator]
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"
optional, timestamp(UTC) in seconds filter
subscription[offline_payment_method][operator]
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"
optional, enumerated string filter
+
customer
Parameters for customer
pass parameters as customer[<param name>][<operator>]
customer[id][operator]
Identifier of the customer.
Supported operators : is, is_not, starts_with, in, not_in

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

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

Example customer[last_name][is] = "Clint"
optional, string filter
customer[email][operator]
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"
optional, string filter
customer[company][operator]
Company name of the customer.
Supported operators : is, is_not, starts_with, is_present

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

Example customer[phone][is_not] = "(541) 754-3010"
optional, string filter
customer[auto_collection][operator]
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"
optional, enumerated string filter
customer[taxability][operator]
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"
optional, enumerated string filter
customer[created_at][operator]
Timestamp indicating when this customer resource is created.
Supported operators : after, before, on, between

Example customer[created_at][on] = "1435054328"
optional, timestamp(UTC) in seconds filter
customer[updated_at][operator]
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"
optional, timestamp(UTC) in seconds filter
customer[offline_payment_method][operator]
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_not] = "cash"
optional, enumerated string filter
+
relationship
Parameters for relationship
pass parameters as relationship[<param name>][<operator>]
relationship[parent_id][operator]
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"
optional, string filter
relationship[payment_owner_id][operator]
Parent who is going to pay.
Supported operators : is, is_not, starts_with

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

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

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>]
The currency code (ISO 4217 format) of the plan.
Supported operators : is, is_not, starts_with, in, not_in

Example currency_code[is] = "USD"
optional, string filter
+
plan
Parameters for plan
pass parameters as plan[<param name>][<operator>]
plan[id][operator]
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"
optional, string filter
plan[name][operator]
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] = "plan_enterprise"
optional, string filter
plan[price][operator]
The price of the plan.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example plan[price][gt] = "1200"
optional, in cents filter
plan[period][operator]
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"
optional, integer filter
plan[period_unit][operator]
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"
optional, enumerated string filter
plan[trial_period][operator]
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][gt] = "14"
optional, integer filter
plan[trial_period_unit][operator]
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_not] = "day"
optional, enumerated string filter
plan[addon_applicability][operator]
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"
optional, enumerated string filter
plan[giftable][operator]
Specifies if the plan should be gifted or not. Possible values are : true, false
Supported operators : is

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

Example plan[status][is] = "active"
optional, enumerated string filter
plan[updated_at][operator]
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"
optional, timestamp(UTC) in seconds filter
Resource object representing export.
always returned

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>]
The currency code (ISO 4217 format) of the addon.
Supported operators : is, is_not, starts_with, in, not_in

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

Example addon[id][is_not] = "support_charge"
optional, string filter
addon[name][operator]
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"
optional, string filter
addon[charge_type][operator]
Type of charge. Possible values are : recurring, non_recurring.
Supported operators : is, is_not, in, not_in

Example addon[charge_type][is] = "recurring"
optional, enumerated string filter
addon[price][operator]
Addon price is calculated based on the addon type and charge type. Learn more.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example addon[price][is] = "1300"
optional, in cents filter
addon[period][operator]
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][lt] = "3"
optional, integer filter
addon[period_unit][operator]
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"
optional, enumerated string filter
addon[status][operator]
Status of the addon. Possible values are : active, archived.
Supported operators : is, is_not, in, not_in

Example addon[status][is_not] = "active"
optional, enumerated string filter
addon[updated_at][operator]
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][after] = "1243545465"
optional, timestamp(UTC) in seconds filter
Resource object representing export.
always returned

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>]
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] = "USD"
optional, string filter
+
coupon
Parameters for coupon
pass parameters as coupon[<param name>][<operator>]
coupon[id][operator]
Used to uniquely identify the coupon in your website/application and to integrate with Chargebee.
Supported operators : is, is_not, starts_with, in, not_in

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

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

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

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

Example coupon[status][is_not] = "active"
optional, enumerated string filter
coupon[apply_on][operator]
The invoice items for which this discounts need to be applied. Possible values are : invoice_amount, each_specified_item.
Supported operators : is, is_not, in, not_in

Example coupon[apply_on][is] = "invoice_amount"
optional, enumerated string filter
coupon[created_at][operator]
Timestamp indicating when this coupon is created.
Supported operators : after, before, on, between

Example coupon[created_at][on] = "145222875"
optional, timestamp(UTC) in seconds filter
coupon[updated_at][operator]
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"
optional, timestamp(UTC) in seconds filter
Resource object representing export.
always returned

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]
Identifier of the customer.
Supported operators : is, is_not, starts_with, in, not_in

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

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

Example customer[last_name][is] = "Clint"
optional, string filter
customer[email][operator]
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"
optional, string filter
customer[company][operator]
Company name of the customer.
Supported operators : is, is_not, starts_with, is_present

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

Example customer[phone][is] = "(541) 754-3010"
optional, string filter
customer[auto_collection][operator]
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"
optional, enumerated string filter
customer[taxability][operator]
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"
optional, enumerated string filter
customer[created_at][operator]
Timestamp indicating when this customer resource is created.
Supported operators : after, before, on, between

Example customer[created_at][after] = "1435054328"
optional, timestamp(UTC) in seconds filter
customer[updated_at][operator]
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"
optional, timestamp(UTC) in seconds filter
customer[offline_payment_method][operator]
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_not] = "cash"
optional, enumerated string filter
+
relationship
Parameters for relationship
pass parameters as relationship[<param name>][<operator>]
relationship[parent_id][operator]
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"
optional, string filter
relationship[payment_owner_id][operator]
Parent who is going to pay.
Supported operators : is, is_not, starts_with

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

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

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>]
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"
optional, string filter
+
subscription
Parameters for subscription
pass parameters as subscription[<param name>][<operator>]
subscription[id][operator]
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"
optional, string filter
subscription[customer_id][operator]
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"
optional, string filter
subscription[plan_id][operator]
Identifier of the plan for this subscription.
Supported operators : is, is_not, starts_with, in, not_in

Example subscription[plan_id][is] = "basic"
optional, string filter
subscription[status][operator]
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"
optional, enumerated string filter
subscription[cancel_reason][operator]
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"
optional, enumerated string filter
subscription[remaining_billing_cycles][operator]
  • 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"
optional, integer filter
subscription[created_at][operator]
The time at which the subscription was created.
Supported operators : after, before, on, between

Example subscription[created_at][before] = "1435054328"
optional, timestamp(UTC) in seconds filter
subscription[activated_at][operator]
Time at which the subscription moved from in_trial state to active. Same as started_at for subscriptions that had no trial.
Supported operators : after, before, on, between, is_present

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

Example subscription[cancelled_at][after] = "1435054328"
optional, timestamp(UTC) in seconds filter
subscription[has_scheduled_changes][operator]
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"
optional, boolean filter
subscription[updated_at][operator]
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"
optional, timestamp(UTC) in seconds filter
subscription[offline_payment_method][operator]
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"
optional, enumerated string filter
Resource object representing export.
always returned

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>]
Payment owner of an invoice.
Supported operators : is, is_not, starts_with, in, not_in

Example payment_owner[is] = "payment_customer"
optional, string filter
+
invoice
Parameters for invoice
pass parameters as invoice[<param name>][<operator>]
invoice[id][operator]
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"
optional, string filter
invoice[subscription_id][operator]
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"
optional, string filter
invoice[customer_id][operator]
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"
optional, string filter
invoice[recurring][operator]
Boolean indicating whether this invoice belongs to a subscription. Possible values are : true, false
Supported operators : is

Example invoice[recurring][is] = "true"
optional, boolean filter
invoice[status][operator]
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"
optional, enumerated string filter
invoice[price_type][operator]
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"
optional, enumerated string filter
invoice[date][operator]
Date indicated on the invoice. The date is based on your billing configuration - normal billing or metered billing. Takes the value of invoice generation date,
  • if metered billing is not enabled.
  • if metered billing is enabled and “Invoice generation date” option is selected.
Takes the value of invoice closing date, if metered billing is enabled and “Invoice closing date” option is selected.
Supported operators : after, before, on, between

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

Example invoice[paid_at][after] = "1394532759"
optional, timestamp(UTC) in seconds filter
invoice[total][operator]
Invoiced amount in cents.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example invoice[total][is_not] = "1000"
optional, in cents filter
invoice[amount_paid][operator]
Total payments received for this invoice.
Supported operators : is, is_not, lt, lte, gt, gte, between

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

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

Example invoice[credits_applied][gte] = "100"
optional, in cents filter
invoice[amount_due][operator]
Total amount to be collected. This includes invoice's payments in progress.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example invoice[amount_due][lte] = "200"
optional, in cents filter
invoice[dunning_status][operator]
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"
optional, enumerated string filter
invoice[updated_at][operator]
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"
optional, timestamp(UTC) in seconds filter
Resource object representing export.
always returned

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]
Credit-note id.
Supported operators : is, is_not, starts_with, in, not_in

Example credit_note[id][is] = "CN_123"
optional, string filter
credit_note[customer_id][operator]
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"
optional, string filter
credit_note[subscription_id][operator]
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"
optional, string filter
credit_note[reference_invoice_id][operator]
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"
optional, string filter
credit_note[type][operator]
The credit note type. Possible values are : adjustment, refundable.
Supported operators : is, is_not, in, not_in

Example credit_note[type][is_not] = "adjustment"
optional, enumerated string filter
credit_note[reason_code][operator]
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"
optional, enumerated string filter
credit_note[create_reason_code][operator]
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"
optional, string filter
credit_note[status][operator]
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] = "adjusted"
optional, enumerated string filter
credit_note[date][operator]
The date the Credit Note is issued.
Supported operators : after, before, on, between

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

Example credit_note[total][lt] = "1200"
optional, in cents filter
credit_note[price_type][operator]
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_not] = "tax_exclusive"
optional, enumerated string filter
credit_note[amount_allocated][operator]
The amount allocated to the invoices.
Supported operators : is, is_not, lt, lte, gt, gte, between

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

Example credit_note[amount_refunded][lte] = "130"
optional, in cents filter
credit_note[amount_available][operator]
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][lt] = "1400"
optional, in cents filter
credit_note[voided_at][operator]
Timestamp indicating the date & time this credit note got voided.
Supported operators : after, before, on, between

Example credit_note[voided_at][on] = "1435054328"
optional, timestamp(UTC) in seconds filter
credit_note[updated_at][operator]
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][on] = "1243545465"
optional, timestamp(UTC) in seconds filter
Resource object representing export.
always returned

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]
Uniquely identifies the transaction.
Supported operators : is, is_not, starts_with, in, not_in

Example transaction[id][is] = "txn_88ybdbsnvf2"
optional, string filter
transaction[customer_id][operator]
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"
optional, string filter
transaction[subscription_id][operator]
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"
optional, string filter
transaction[payment_source_id][operator]
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"
optional, string filter
transaction[payment_method][operator]
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.
Supported operators : is, is_not, in, not_in

Example transaction[payment_method][is_not] = "card"
optional, enumerated string filter
transaction[gateway][operator]
Gateway through which this transaction was done. Applicable only for 'Card' Payment Method. Possible values are : chargebee, 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, not_applicable.
Supported operators : is, is_not, in, not_in

Example transaction[gateway][is_not] = "stripe"
optional, enumerated string filter
transaction[gateway_account_id][operator]
The gateway account used for this transaction.
Supported operators : is, is_not, starts_with, in, not_in

Example transaction[gateway_account_id][is] = "gw_3Nl9BNeQ7438Ks1"
optional, string filter
transaction[id_at_gateway][operator]
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"
optional, string filter
transaction[reference_number][operator]
The reference number for this transaction. e.g check number in case of 'check' payments.
Supported operators : is, is_not, starts_with, is_present

Example transaction[reference_number][is_not] = "cus_u239732"
optional, string filter
transaction[type][operator]
Type of the transaction. Possible values are : authorization, payment, refund, payment_reversal.
Supported operators : is, is_not, in, not_in

Example transaction[type][is] = "payment"
optional, enumerated string filter
transaction[date][operator]
Indicates when this transaction occurred.
Supported operators : after, before, on, between

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

Example transaction[amount][is] = "1200"
optional, in cents filter
transaction[amount_capturable][operator]
To filter based on transaction’s unused authorized/blocked amount.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example transaction[amount_capturable][is] = "1200"
optional, in cents filter
transaction[status][operator]
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"
optional, enumerated string filter
transaction[updated_at][operator]
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][before] = "1243545465"
optional, timestamp(UTC) in seconds filter
Resource object representing export.
always returned
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>]
Total amount charged for the order.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example total[gte] = "1394532759"
optional, in cents filter
+
order
Parameters for order
pass parameters as order[<param name>][<operator>]
order[id][operator]
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] = "3"
optional, string filter
order[subscription_id][operator]
To filter based on subscription_id.
.
Supported operators : is, is_not, starts_with, is_present, in, not_in

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

Example order[customer_id][is] = "3bdjnDnsdQn"
optional, string filter
order[status][operator]
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"
optional, enumerated string filter
order[price_type][operator]
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_not] = "tax_exclusive"
optional, enumerated string filter
order[order_date][operator]
The date on which the order will start getting processed.
Supported operators : after, before, on, between

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

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

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

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

Example order[cancelled_at][on] = "1394532759"
optional, timestamp(UTC) in seconds filter
order[amount_paid][operator]
Total amount paid for the order.
Supported operators : is, is_not, lt, lte, gt, gte, between

Example order[amount_paid][lt] = "1000"
optional, in cents filter
order[refundable_credits][operator]
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][lte] = "1000"
optional, in cents filter
order[refundable_credits_issued][operator]
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"
optional, in cents filter
order[updated_at][operator]
To filter based on updated at.
Supported operators : after, before, on, between

Example order[updated_at][before] = "1243545465"
optional, timestamp(UTC) in seconds filter
Resource object representing export.
always returned