InTouch Hub · Blue Isle Software

Chargebee

Read and create Chargebee data — customers, subscriptions, invoices — for recurring billing via the Chargebee REST API.

Provided free and as is, without warranty of any kind — including merchantability, fitness for a particular purpose, and the accuracy or completeness of any result. See the licence. You are responsible for checking what this produces before relying on it.

billingcrm-salesemailinvoiceinvoiceslogstatussubscriptions

Chargebee

Read and create core Chargebee data — customers, subscriptions, and invoices — for recurring/subscription billing via the Chargebee REST API.

Standard library only (urllib, json, base64). No third-party packages, no credential object required — the API key and site name are passed as inputs.

What it does

Branches on operation and calls the Chargebee v2 REST API for your site:

Operation Method Endpoint
list_customers GET /api/v2/customers?limit=N
get_customer GET /api/v2/customers/{customerId}
create_customer POST /api/v2/customers (form-encoded: email, first_name, last_name, company)
list_subscriptions GET /api/v2/subscriptions?limit=N
get_subscription GET /api/v2/subscriptions/{subscriptionId}
list_invoices GET /api/v2/invoices?limit=N
get_invoice GET /api/v2/invoices/{invoiceId}

It returns:

Non-2xx responses from Chargebee (e.g. 401 invalid key, 404 not found) are returned with their status and body rather than failing the step, so the caller can react. Only transport-level failures (DNS, connection refused, timeout) fail the step.

Response bodies are capped at ~5 MB.

Base URL & authentication

apiKey setup

  1. Sign in to your Chargebee admin console.
  2. Go to Settings → Configure Chargebee → API Keys.
  3. Create or copy an API key (use a test-site key while developing).
  4. Note your site name — it's the subdomain in your Chargebee URL (https://{site}.chargebee.com).

Pass the key as apiKey and the subdomain as site. The site input accepts either a bare name (acme-test) or a full host (acme-test.chargebee.com) — it is normalized to the subdomain.

Inputs

Input Required Default Description
apiKey yes — Chargebee API key (HTTP Basic username)
operation yes — One of the operations above
site yes* "" Chargebee site name / subdomain
customerId for get_customer "" Customer id
subscriptionId for get_subscription "" Subscription id
invoiceId for get_invoice "" Invoice id
email for create_customer "" Customer email
firstName for create_customer "" Customer first name
lastName for create_customer "" Customer last name
company for create_customer "" Customer company
limit no 10 Page size for list operations (1–100)

* site is declared with a default of "" per tool convention but is required at runtime for every operation.

Examples

List the 10 most recent customers:

operation = list_customers
apiKey    = <your_api_key>
site      = acme-test

Retrieve one subscription:

operation      = get_subscription
apiKey         = <your_api_key>
site           = acme-test
subscriptionId = __test__8asukSOXdvdpAQ

Create a customer:

operation = create_customer
apiKey    = <your_api_key>
site      = acme-test
email     = [email protected]
firstName = Jane
lastName  = Doe
company   = Acme Inc

List the latest invoices:

operation = list_invoices
apiKey    = <your_api_key>
site      = acme-test
limit     = 25

Publishes

The keys a later task may reference as {{taskName.key}}. Referencing anything not listed here resolves to nothing at run time.

Input Properties

Every property this tool accepts, from its own tool.iml.

Property Type Required Default Description
apiKey string yes — DEPRECATED — bind an API Key credential to the task with credentialName instead. A key pasted here is stored in the workflow definition in clear and appears in every export of it. Still honoured for workflows built before the change.
operation string yes — One of: list_customers, get_customer, create_customer, list_subscriptions, get_subscription, list_invoices, get_invoice
site string no — Chargebee site name (the subdomain in https://{site}.chargebee.com). Required for every operation.
customerId string no — Customer id — required for get_customer.
subscriptionId string no — Subscription id — required for get_subscription.
invoiceId string no — Invoice id — required for get_invoice.
email string no — Customer email — used by create_customer.
firstName string no — Customer first name — used by create_customer.
lastName string no — Customer last name — used by create_customer.
company string no — Customer company — used by create_customer.
limit string no 10 Page size for list operations (1-100, Chargebee default 10).