Search all guides

Reference · Tools

Chargebee integration

Manage customers, invoices, and subscriptions in the Chargebee subscription billing platform.

Action Finance v1

The Chargebee node connects your workflows to the Chargebee subscription billing API, letting you create customers, filter and retrieve invoices, fetch PDF download URLs, and cancel or delete subscriptions. Use it to automate something like emailing a PDF invoice to a customer the moment it's generated in Chargebee. It authenticates with your Chargebee API key over HTTP Basic Auth.

Works as
Action
Tool name
chargebee
Parameters
13
Outputs
Output, Error
Credentials
Chargebee API
Official docs
Chargebee docs apidocs.chargebee.com

What you can build with Chargebee

  • Create a new Chargebee customer with email and name.
  • List all invoices sorted by date.
  • Get the PDF download URL for a specific invoice.
  • Cancel a subscription at end of term.
  • Delete a subscription permanently.

Overview

Chargebee is a subscription billing and revenue management platform. This tool provides access to the Chargebee API v2 for creating customers, listing invoices with date/amount filters, retrieving invoice PDF download URLs, and cancelling or deleting subscriptions. Uses HTTP Basic Auth with the Chargebee API key. All POST parameters are form-urlencoded per Chargebee API conventions.

Node Type

Action — processes input items and produces output

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires Chargebee API credentials. See the Credentials Guide for setup instructions.

Resources

ResourceValue
Customercustomer
Invoiceinvoice
Subscriptionsubscription

Operations

Each resource has its own Operation list. Pick the resource first, then the operation.

ResourceOperationValueDescription
CustomerCreatecreateCreate a new customer
InvoiceListlistList invoices with optional filters
InvoicePDF Invoice URLpdfUrlGet the PDF download URL for a specific invoice
SubscriptionCancelcancelCancel a subscription
SubscriptionDeletedeleteDelete a subscription permanently

Parameters

Customer: Create

ParameterTypeRequiredDefaultDescription
PropertiescollectionNo{}Properties to set on the new customer.
— User IDstringNo—ID for the new customer. If not given, this will be auto-generated.
— First NamestringNo—The first name of the customer.
— Last NamestringNo—The last name of the customer.
— EmailstringNo—The email address of the customer.
— PhonestringNo—The phone number of the customer.
— CompanystringNo—The company of the customer.
— Custom PropertiesfixedCollectionNo{}Adds custom properties as key-value pairs. Each pair is sent as a separate form-encoded parameter.
— — Property NamestringNo—Name of the property to set.
— — Property ValuestringNo—Value of the property to set.

Invoice: List

ParameterTypeRequiredDefaultDescription
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo10Max number of results to return. (shown when Return All is false)
FiltersfixedCollectionNo{}Filter invoices by date or amount.
Options: is
— OperationoptionsNoafterThe comparison operation for the date filter.
Options: is, is_not, after, before
— DatestringNo—Query date in ISO 8601 format (e.g. 2024-01-15T00:00:00Z). Converted to Unix timestamp internally.
— OperationoptionsNogtThe comparison operation for the amount filter.
Options: is, is_not, gt, gte, lt, lte
— AmountnumberNo0Query amount (in cents for most currencies).

Invoice: PDF Invoice URL

ParameterTypeRequiredDefaultDescription
Invoice IDstringYes—The ID of the invoice to get the PDF URL for.

Subscription: Cancel

ParameterTypeRequiredDefaultDescription
Subscription IDstringYes—The ID of the subscription to cancel.
Schedule End of TermbooleanNofalseWhether to schedule the cancellation for the end of the current billing term instead of cancelling immediately.

Subscription: Delete

ParameterTypeRequiredDefaultDescription
Subscription IDstringYes—The ID of the subscription to delete permanently.

All Operations

ParameterTypeRequiredDefaultDescription
Max ConcurrencynumberNo10Maximum number of items to process concurrently.

Output Data

What lands on the output item depends on the operation, but in every case binary data on the input item is forwarded unchanged.

OperationOutput
Customer Create, Subscription Cancel, Subscription DeleteOne output item per input item. The Chargebee response is merged onto the input item’s JSON at the top level, so the fields the item already carried are still there and a response key with the same name overwrites the item’s value.
Invoice PDF Invoice URLOne output item per input item. Only pdfUrl is added — the rest of the input item JSON passes through untouched. pdfUrl is null when the response carries no download URL.
Invoice ListFans out: one output item per invoice returned. Each invoice object replaces the item JSON entirely — nothing from the input item survives, so carry forward any value you still need before this node. A request that matches no invoices produces no output items at all for that input item, which quietly ends that branch.

List results are unwrapped, so invoice fields sit at the top level of the output item ({{ $json.id }}, {{ $json.total }}). Invoices are returned newest first by invoice date. With Return All on, the node pages through results for you.

Example Configuration

Create a customer from an upstream signup record, including custom properties:

{
  "type": "chargebee",
  "parameters": {
    "resource": "customer",
    "operation": "create",
    "properties": {
      "id": "customer_001",
      "first_name": "{{ $json.firstName }}",
      "last_name": "{{ $json.lastName }}",
      "email": "{{ $json.email }}",
      "phone": "+1-555-0123",
      "company": "Acme Corp",
      "customProperties": {
        "property": [
          { "name": "department", "value": "engineering" },
          { "name": "tier", "value": "premium" }
        ]
      }
    }
  }
}

List every invoice raised after a date and above an amount:

{
  "type": "chargebee",
  "parameters": {
    "resource": "invoice",
    "operation": "list",
    "returnAll": true,
    "filters": {
      "date": [
        { "operation": "after", "value": "2026-01-01T00:00:00Z" }
      ],
      "total": [
        { "operation": "gt", "value": 100 }
      ]
    }
  }
}

List a single page of invoices:

{
  "type": "chargebee",
  "parameters": {
    "resource": "invoice",
    "operation": "list",
    "returnAll": false,
    "limit": 50
  }
}

Get the PDF download URL for the invoice an upstream node produced:

{
  "type": "chargebee",
  "parameters": {
    "resource": "invoice",
    "operation": "pdfUrl",
    "invoiceId": "{{ $json.id }}"
  }
}

Cancel a subscription at the end of the current billing term:

{
  "type": "chargebee",
  "parameters": {
    "resource": "subscription",
    "operation": "cancel",
    "subscriptionId": "{{ $json.subscription_id }}",
    "endOfTerm": true
  }
}

Delete a subscription permanently:

{
  "type": "chargebee",
  "parameters": {
    "resource": "subscription",
    "operation": "delete",
    "subscriptionId": "sub_xyz789"
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

This tool uses Chargebee to manage customers, invoices, and subscriptions. It is the right tool for handling subscription billing and revenue management tasks rather than general accounting or payment gateways. It produces new customer records, lists of invoices, invoice PDF download links, and cancelled or deleted subscriptions.

  • Repeated runs are safe. Create, Cancel and Delete calls are sent with an idempotency key that is stable for the same item within the same execution, so a retry inside that execution does not create a second customer or cancel twice. A fresh execution is a fresh operation.
  • Amounts are in the currency’s smallest unit. The invoice amount filter compares cents for most currencies.
  • Max Concurrency controls the API call rate. The default of 10 suits most runs; lower it when a large batch of items starts drawing rate-limit errors.

Frequently asked questions

What credential do I need and how does authentication work?

You need a Chargebee API credential (type: chargebeeApi) configured in BusyBot. The node authenticates using HTTP Basic Auth, sending your Chargebee API key as the username with a blank password — exactly how Chargebee's API v2 expects it. You set this credential once and reuse it across all Chargebee nodes in your workspace.

If my workflow retries, will I end up with duplicate customers or double-cancelled subscriptions?

No. Create, Cancel, and Delete calls are sent with an idempotency key that stays stable for the same item within the same execution. A retry inside that run won't create a second customer or cancel the same subscription twice. Starting a completely new execution, however, is treated as a fresh operation, so you'd need to guard against that at the workflow level if it matters.

Invoice amounts look wrong — why are they so large?

Chargebee returns and filters amounts in the currency's smallest unit. For USD and most currencies, that means cents, so an invoice for $49.00 appears as 4900. When you set an amount filter on the list-invoices action, make sure you're comparing against cents, not dollars.

I'm getting rate-limit errors when processing a large batch. What should I adjust?

Lower the Max Concurrency setting on the node. The default of 10 concurrent API calls works well for typical runs, but a large batch hitting Chargebee in parallel can trigger rate limiting. Reducing concurrency slows the throughput slightly but keeps requests within Chargebee's API limits and avoids failed calls.

What happens when an action fails — does the whole workflow stop?

The node has two separate outputs: Output and Error. A failed API call routes to the Error output rather than stopping the workflow, so you can wire up a separate branch to log the failure, send an alert, or retry with different parameters without losing the rest of your run.

Build with Chargebee

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Chargebee API credentials first.

Open BusyBot

Last reviewed . Spotted something wrong? Tell us.