Skip to main content

Chargebee

Chargebee is a comprehensive subscription billing and revenue management platform that helps businesses automate recurring billing, manage subscriptions, handle payments, and optimize revenue operations for subscription-based business models.

Chargebee icon

Power end-to-end data operations for your Chargebee API with Nexla. Our bi-directional Chargebee connector is purpose-built for Chargebee, making it simple to ingest data, sync it across systems, and deliver it anywhere — all with no coding required. Nexla turns API-sourced data into ready-to-use, reusable data products and makes it easy to send data to Chargebee or any other destination. With comprehensive monitoring, lineage tracking, and access controls, Nexla keeps your Chargebee workflows fast, secure, and fully governed.

Features

Type: API

SourceDestination

  • Seamless API Integration: Connect to any endpoint as source or destination without coding, with automatic data product creation
  • Visual Composition & Chaining: Build complex integrations using visual templates, chain API calls, and compose workflows with data validation and filtering
  • API Proxy: Expose curated slices of your data securely with a secure and customizable API proxy that validates and transforms data on the fly
  • Request optimization with intelligent batching, retry, and caching to minimize API calls and costs

Prerequisites

Before creating a Chargebee credential, you need to obtain an API key from your Chargebee account. Chargebee uses Basic Authentication with the API key as the username and an empty password to authenticate API requests.

To use Chargebee with Nexla, you need:

  • Access to your Chargebee account
  • A Chargebee account with appropriate permissions to access the resources you want to work with
  • Your API key for Basic Authentication
  • Your Chargebee site identifier

The Chargebee API requires your site identifier, which is the {your-site} part of your Chargebee URL (e.g., if your Chargebee URL is https://mycompany.chargebee.com, your site identifier is mycompany). For detailed information about Chargebee authentication, API key setup, and available resources, refer to the Chargebee API documentation.

Authenticate

Credentials required

FieldRequiredSecretDescription
SiteYesNoPlease enter your Chargebee site. This is the your-site part of the url https://{your-site}.chargebee.com
API KeyYesYesPlease enter your API Key

Create a credential in Nexla

  1. After selecting the data source/destination type, click the Add Credential tile to open the Add New Credential overlay.

New Credential Overlay – Chargebee

ChargebeeCred.png
  1. Enter a name for the credential in the Credential Name field and a short, meaningful description in the Credential Description field.

  2. Enter your Chargebee site identifier in the Site field. This is the {your-site} part of your Chargebee URL (e.g., if your Chargebee URL is https://mycompany.chargebee.com, enter mycompany). The site identifier is used to construct the API endpoint URLs.

  3. Enter your Chargebee API key in the API Key field. This is the API key you obtained from your Chargebee account settings. The API key is used as the username for Basic Authentication, with an empty password.

    Keep your API key secure and do not share it publicly. The API key provides access to your Chargebee account and should be treated as sensitive information. Chargebee uses Basic Authentication with the API key as the username and an empty password. The API key is sent in the Authorization header for all API requests to the Chargebee API. For detailed information about obtaining and managing API keys, see the Chargebee API authentication documentation.

  4. Click the Save button at the bottom of the overlay. The newly added credential will now appear in a tile on the Authenticate screen during data source/destination creation.

Use as a data source

To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Select the Chargebee connector tile, then select the credential that will be used to connect to the Chargebee instance, and click Next; or, create a new Chargebee credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Chargebee endpoints. Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below.

List all

This endpoint fetches a list of all records of a selected resource. Use this endpoint when you need to retrieve all customers, subscriptions, invoices, quotes, orders, events, or transactions from your Chargebee account.

  • Select the resource type you want to retrieve from the Resource Name dropdown menu. Available options include:

    • customers: Retrieves a list of customers added to your Chargebee site
    • subscriptions: Retrieves a list of subscriptions
    • invoices: Lists all the invoices
    • quotes: Lists all quotes
    • orders: Retrieves a list of all the available orders
    • events: Retrieves a list of events
    • transactions: Lists all the transactions

    You can also add custom resource types if needed. The default value is customers if not specified.

  • The endpoint uses GET requests to https://{site}.chargebee.com/api/v2/{resource_name}?limit=100 where {site} is your Chargebee site identifier from the credential configuration and {resource_name} is the selected resource type. The endpoint URL is automatically constructed based on your credential's site configuration and the selected resource type.
  • The endpoint uses token-based pagination, automatically fetching additional pages as needed using the offset query parameter. When a response includes a next_offset value, Nexla automatically uses it as the offset parameter in the subsequent request to fetch the next page of results.
  • The endpoint will return all records of the selected resource type. The response data is extracted from the list array in the API response ($.list[*]), with each record processed individually.

This endpoint supports pagination through the offset token mechanism. When a response includes a next_offset value, Nexla automatically uses it as the offset parameter in the subsequent request to fetch the next page of results. The endpoint uses token-based pagination (iteration.type: paging.next.token) through the offset mechanism. The response data path is $.list[*], which extracts all items from the list array in the API response. The endpoint limits results to 100 items per request. You can add custom resource types if needed. For detailed information about listing resources, see the Chargebee API documentation.

Retrieve resource details

This endpoint retrieves the details of a specific resource by its ID. Use this endpoint when you need to retrieve detailed information about a specific customer, subscription, invoice, order, event, transaction, or quote.

  • Select the resource type you want to retrieve from the Resource Name dropdown menu. Available options include:

    • customers: Retrieves the details of a specific customer
    • subscriptions: Retrieves the details of a specific subscription
    • invoices: Retrieves the details of a specific invoice
    • orders: Retrieves the details of a specific order
    • events: Retrieves the details of a specific event
    • transactions: Retrieves the details of a specific transaction
    • quotes: Retrieves the details of a specific quote

    You can also add custom resource types if needed. The default value is customers if not specified.

  • Enter the unique identifier for the resource you want to retrieve in the Resource ID field. This is the ID of the specific resource (e.g., customer ID, subscription ID, invoice ID) for which you want to retrieve details.

  • The endpoint uses GET requests to https://{site}.chargebee.com/api/v2/{resource_name}/{resource_id} where {site} is your Chargebee site identifier, {resource_name} is the selected resource type, and {resource_id} is the resource ID you provide. The endpoint URL is automatically constructed based on your credential's site configuration and the provided parameters.
  • The endpoint does not use pagination and returns the complete resource details in a single request.
  • The endpoint will return detailed information for the specified resource. The response data is extracted from the root-level object in the API response ($), and Nexla will process the entire response structure.

Resource IDs can be obtained from the "List all" data source endpoint by selecting the appropriate resource type, which returns all resources with their corresponding IDs. The endpoint uses a static URL (iteration.type: static.url) and does not require pagination. The response data path is $, which extracts the entire root-level object from the API response. You can add custom resource types if needed. For detailed information about retrieving resource details, see the Chargebee API documentation.

List all - Incremental Sync of resources

This endpoint fetches updated or modified records of a selected resource for incremental synchronization. Use this endpoint when you need to retrieve only the resources that have been updated within a specific time range, which is useful for incremental data synchronization.

  • Select the resource type you want to retrieve from the Resource Name dropdown menu. Available options include:

    • customers: Retrieves updated customers
    • subscriptions: Retrieves updated subscriptions
    • invoices: Retrieves updated invoices
    • quotes: Retrieves updated quotes
    • orders: Retrieves updated orders
    • events: Retrieves updated events
    • transactions: Retrieves updated transactions

    You can also add custom resource types if needed.

  • Enter the start date for the update range in the Updated Date [After] field. This should be a date in Unix timestamp format (seconds since epoch). Only resources updated after this date will be retrieved.

  • Enter the end date for the update range in the Updated Date [Before] field. This should be a date in Unix timestamp format (seconds since epoch). Only resources updated before this date will be retrieved.

  • Enter the sort order in the Sort By field. This determines how the results are sorted. Common values include updated_at[asc] or updated_at[desc].

  • The endpoint uses GET requests to https://{site}.chargebee.com/api/v2/{resource_name}?limit=100&updated_at[after]={updated_after}&updated_at[before]={updated_before}&{sort_by} where {site} is your Chargebee site identifier, {resource_name} is the selected resource type, and the date and sort parameters are provided. The endpoint URL is automatically constructed based on your credential's site configuration and the provided parameters.
  • The endpoint uses token-based pagination, automatically fetching additional pages as needed using the offset query parameter. When a response includes a next_offset value, Nexla automatically uses it as the offset parameter in the subsequent request to fetch the next page of results.
  • The endpoint will return all records of the selected resource type that were updated within the specified date range. The response data is extracted from the list array in the API response ($.list[*]), with each record processed individually.

This endpoint is designed for incremental synchronization, allowing you to retrieve only resources that have been updated within a specific time range. The date parameters should be in Unix timestamp format (seconds since epoch). This endpoint supports pagination through the offset token mechanism. When a response includes a next_offset value, Nexla automatically uses it as the offset parameter in the subsequent request to fetch the next page of results. The endpoint uses token-based pagination (iteration.type: paging.next.token) through the offset mechanism. The response data path is $.list[*], which extracts all items from the list array in the API response. The endpoint limits results to 100 items per request. You can add custom resource types if needed. For detailed information about incremental synchronization, see the Chargebee API documentation.

Once the selected endpoint template has been configured, click the Test button to the right of the endpoint selection menu to retrieve a sample of the data that will be fetched. Sample data will be displayed in the Endpoint Test Result panel on the right, allowing you to verify that the source is configured correctly before saving.

Manual configuration

Chargebee data sources can also be manually configured to ingest data from any valid Chargebee API v2 endpoint, including endpoints not covered by the pre-built templates, chained API calls, or custom authentication headers or request parameters. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, endpoint URL, date/time and lookup macros, path to data, metadata, and request headers.

Chargebee API endpoints follow the pattern https://{site}.chargebee.com/api/v2/{endpoint_path}, where {'{site}'} is your Chargebee site identifier. List endpoints return records under the list array (path $.list[*]), while single-resource endpoints return the full object at the root (path $).

Once all configuration steps have been completed, click the Save button to save your data source configuration. Nexla will now begin ingesting data from the configured endpoint according to the schedule and endpoint settings you defined.

Use as a destination

Click the + icon on the Nexset that will be sent to the Chargebee destination, and select the Send to Destination option from the menu. Select the Chargebee connector from the list of available destination connectors, then select the credential that will be used to connect to the Chargebee organization, and click Next; or, create a new Chargebee credential for use in this flow.

Endpoint templates

Nexla provides pre-built templates that can be used to rapidly configure destinations to send data to common Chargebee endpoints. Select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.

Create a Customer

This endpoint creates a new customer in your Chargebee account. Use this endpoint when you need to create customer records from your data sources, such as importing customer information or creating new customer accounts.

  • The endpoint uses POST requests to https://{site}.chargebee.com/api/v2/customers where {site} is your Chargebee site identifier from the credential configuration. The endpoint URL is automatically constructed based on your credential's site configuration.
  • The endpoint sends data from your Nexset as the request body in JSON format. Each record in your Nexset will be sent as a JSON object containing the customer data to create. The request body should follow the Chargebee API v2 specification for creating customers, including required fields and field names.
  • Batch mode is disabled by default for this endpoint. Each record in your Nexset will be sent as a separate API request to create a customer. If you need to create multiple customers, you can send multiple records, but each will be processed as a separate request.

The request body must be properly formatted JSON that matches the Chargebee API v2 specification for creating customers. The endpoint requires Basic Authentication with your API key as the username, which is handled automatically by your credential configuration. The Content-Type: application/json header is automatically included in requests. Batch mode is disabled by default (batch.mode: false), so each record will be sent as a separate request. For detailed information about creating customers, including required fields, field names, and request formats, see the Chargebee API documentation.

Create an order

This endpoint creates a new order in your Chargebee account. Use this endpoint when you need to create order records from your data sources, such as importing order information or creating new orders.

  • The endpoint uses POST requests to https://{site}.chargebee.com/api/v2/orders where {site} is your Chargebee site identifier from the credential configuration. The endpoint URL is automatically constructed based on your credential's site configuration.
  • The endpoint sends data from your Nexset as the request body in JSON format. Each record in your Nexset will be sent as a JSON object containing the order data to create. The request body should follow the Chargebee API v2 specification for creating orders, including required fields and field names.
  • Batch mode is disabled by default for this endpoint. Each record in your Nexset will be sent as a separate API request to create an order. If you need to create multiple orders, you can send multiple records, but each will be processed as a separate request.

The request body must be properly formatted JSON that matches the Chargebee API v2 specification for creating orders. The endpoint requires Basic Authentication with your API key as the username, which is handled automatically by your credential configuration. The Content-Type: application/json header is automatically included in requests. Batch mode is disabled by default (batch.mode: false), so each record will be sent as a separate request. For detailed information about creating orders, including required fields, field names, and request formats, see the Chargebee API documentation.

Manual configuration

Chargebee destinations can also be manually configured to send data to any valid Chargebee API v2 endpoint, including endpoints not covered by the pre-built templates or when custom API configurations are needed. Using manual configuration, you can also configure Nexla to automatically send the response received from the Chargebee API after each call to a new Nexla webhook data source. Select the Advanced tab at the top of the configuration screen, and follow the instructions in Connect to Any API to configure the API method, data format, endpoint URL, request headers, and request body.

Chargebee API endpoints follow the pattern https://{site}.chargebee.com/api/v2/{endpoint_path}, where {'{site}'} is your Chargebee site identifier. The API v2 primarily uses POST requests for data-writing operations and typically expects a JSON request body; Basic Authentication and the Content-Type: application/json header are applied automatically from your credential.

Save & activate

Once all endpoint settings have been configured, click the Save button to save your destination configuration. To send data to the configured Chargebee endpoint, open the destination resource menu, and select Activate.

The Nexset data will not be sent to the Chargebee endpoint until the destination is activated. Destinations can be activated immediately or at a later time, providing full control over data movement.