Chargebee

App · Payments & Billing · 8 actions

Subscription billing and revenue management with Chargebee. Create and look up customers, list, cancel and delete subscriptions, and list invoices and get their PDFs, straight from your workflows.

Actions

ActionWhat it does
Cancel subscriptionCancel a customer's subscription in Chargebee: straight away, at the end of the current term, at the end of the billing term or on a date you choose.
Create a customerCreate a new customer record in Chargebee with optional contact details (email, first and last name, company, and phone).
Delete subscriptionDelete a subscription from Chargebee for good, with every invoice, credit note, payment record and usage that belongs to it, which also changes your revenue and sign-up reports.
Get a customerLook up a single Chargebee customer by their customer ID and return the full customer record: contact details, billing preferences, account credits, and card status.
Get invoice PDF linkGet a link to download a Chargebee invoice as a PDF, to send to a customer or save.
List customersList customers in your Chargebee site, one page at a time, optionally filtered by an exact email address.
List invoicesList invoices in your Chargebee site, one page at a time, optionally filtered by customer ID and/or status.
List subscriptionsList subscriptions in your Chargebee site, one page at a time, optionally filtered by customer ID and/or status.

Cancel subscription

Cancel a customer's subscription in Chargebee: straight away, at the end of the current term, at the end of the billing term or on a date you choose. Cancelling at the end of the term stops it renewing and leaves it running until then. A subscription on a contract term needs the contract option instead. When it is cancelled straight away, Chargebee's site settings decide any credit for the unused time and what happens to charges not yet billed, unless you choose here.

Inputs

Subscription IDsubscription_idtextRequired
The ID of the subscription to cancel, such as the 'id' List subscriptions returns.
When to cancelcancel_optiontext
When the subscription ends: straight away, at the end of the current term, at the end of the billing term, or on the date in 'Cancel on'. Leave blank for a subscription on a contract term, and choose the contract option instead.One of: immediately (Straight away), end_of_term (End of the current term), specific_date (On a date), end_of_billing_term (End of the billing term).
Cancel oncancel_atdate and time
The date to cancel on, when 'When to cancel' (or the contract option) is 'On a date'. It can't be more than one billing period in the past.
Contract optioncontract_term_cancel_optiontext
Only for a subscription on a contract term, which needs it: end the contract straight away, at the end of the contract term, or on the date in 'Cancel on'. Ending at the end of the billing term needs Chargebee support to turn it on for your site.One of: terminate_immediately (Straight away), end_of_contract_term (End of the contract term), specific_date (On a date), end_of_subscription_billing_term (End of the billing term).
Reasoncancel_reason_codetext
Why it was cancelled, written exactly as one of the cancellation reasons set up in your Chargebee site (capitals count). Your site may require one.
Credit for unused timecredit_option_for_current_term_chargestext
When cancelling straight away: give the customer no credit, credit for the unused part of the term, or credit for the whole term. Leave blank to follow your site's setting.One of: none (No credit), prorate (The unused part), full (The whole term).
Charges not yet billedunbilled_charges_optiontext
When cancelling straight away: bill the charges not yet invoiced now, or drop them. Leave blank to follow your site's setting.One of: invoice (Bill them now), delete (Drop them).

Outputs

The cancelled subscription and its customer, as Chargebee returns them, plus the invoice Chargebee raised for it when there was one.

customerobject
The subscription's customer.
invoiceobject
The invoice raised on cancelling, when Chargebee raised one.
subscriptionobject
The subscription after cancelling.
Example output
{
  "customer": {
    "email": "jordan.ellis@acme.example",
    "id": "cust_acme_8f21",
    "object": "customer"
  },
  "invoice": {
    "id": "INV-00051",
    "object": "invoice",
    "total": 0
  },
  "subscription": {
    "cancel_reason_code": "Too expensive",
    "cancelled_at": 1795824000,
    "current_term_end": 1795824000,
    "customer_id": "cust_acme_8f21",
    "id": "sub_acme_pro_01",
    "object": "subscription",
    "status": "non_renewing"
  }
}

Create a customer

Create a new customer record in Chargebee with optional contact details (email, first and last name, company, and phone). The customer is the top-level account that subscriptions and invoices attach to. Useful for onboarding a new signup or syncing a CRM/e-commerce contact into billing. Provide at least one identifying field.

Inputs

Emailemailtext
Customer email address. Configured email notifications (invoices, receipts, dunning) are sent here.
First namefirst_nametext
Customer's first name.
Last namelast_nametext
Customer's last name.
Companycompanytext
Company name to associate with the customer.
Phonephonetext
Customer phone number.

Outputs

Chargebee wraps the created record under a 'customer' key. IDs are strings; 'created_at'/'updated_at' are Unix epoch seconds.

customerobject
The created customer resource.
Example output
{
  "customer": {
    "auto_collection": "on",
    "card_status": "no_card",
    "company": "Acme Robotics",
    "created_at": 1769385600,
    "email": "jordan.ellis@acme.example",
    "first_name": "Jordan",
    "id": "cust_acme_8f21",
    "last_name": "Ellis",
    "net_term_days": 0,
    "object": "customer",
    "phone": "+1-415-555-0148",
    "preferred_currency_code": "USD",
    "resource_version": 1769385600000,
    "updated_at": 1769385600
  }
}

Delete subscription

Delete a subscription from Chargebee for good, with every invoice, credit note, payment record and usage that belongs to it, which also changes your revenue and sign-up reports. It can't be undone: to stop a subscription and keep its history, use Cancel subscription instead. Chargebee refuses when its invoices are part of a combined invoice.

Inputs

Subscription IDsubscription_idtextRequired
The ID of the subscription to delete.

Outputs

The subscription as it was, and its customer. Chargebee removes it a few minutes later.

customerobject
The subscription's customer.
subscriptionobject
The deleted subscription.
Example output
{
  "customer": {
    "id": "cust_acme_8f21",
    "object": "customer"
  },
  "subscription": {
    "customer_id": "cust_acme_8f21",
    "id": "sub_acme_pro_01",
    "object": "subscription",
    "status": "cancelled"
  }
}

Get a customer

Look up a single Chargebee customer by their customer ID and return the full customer record: contact details, billing preferences, account credits, and card status. Useful for confirming a customer exists or reading their current details before creating a subscription or sending a message.

Inputs

Customer IDcustomer_idtextRequired
The Chargebee customer ID (for example the 'id' returned by Create customer or List customers).

Outputs

The customer resource wrapped under a 'customer' key (same shape as Create customer).

customerobject
Example output
{
  "customer": {
    "auto_collection": "on",
    "card_status": "valid",
    "company": "Acme Robotics",
    "created_at": 1769385600,
    "email": "jordan.ellis@acme.example",
    "first_name": "Jordan",
    "id": "cust_acme_8f21",
    "last_name": "Ellis",
    "net_term_days": 0,
    "object": "customer",
    "phone": "+1-415-555-0148",
    "preferred_currency_code": "USD",
    "resource_version": 1769472000000,
    "updated_at": 1769472000
  }
}

Get a link to download a Chargebee invoice as a PDF, to send to a customer or save. The link works for one hour.

Inputs

Invoice IDinvoice_idtextRequired
The invoice's number, such as the 'id' List invoices returns.
Open asdisposition_typetext
Whether the link downloads the PDF as a file or opens it in the browser. Defaults to downloading it.One of: attachment (Download the file), inline (Open in the browser). Default: attachment.

Outputs

A link to the invoice's PDF and when it stops working.

downloadobject
The download as Chargebee returns it.
download_urltext
The same link, ready to use in a message.
valid_till_displaytext
When the link stops working, such as Nov 30, 2026 15:00 UTC.
Example output
{
  "download": {
    "download_url": "https://cb-downloads.s3.amazonaws.com/acme/invoice_INV-00042.pdf",
    "mime_type": "application/pdf",
    "valid_till": 1796050800
  },
  "download_url": "https://cb-downloads.s3.amazonaws.com/acme/invoice_INV-00042.pdf",
  "valid_till_display": "Nov 30, 2026 15:00 UTC"
}

List customers

List customers in your Chargebee site, one page at a time, optionally filtered by an exact email address. Returns a 'list' of customer records plus a 'next_offset' cursor when more pages are available. Useful for finding a customer's ID by email or exporting the customer base.

Inputs

Emailemailtext
Filter to customers with this exact email address. Leave blank to list all customers.
Limitlimitnumber
How many records to return in one page, from 1 to 100. Defaults to 10.From 1 to 100.
Continue fromoffsettext
To get the next page, paste the 'next_offset' value returned by the previous call. Leave blank for the first page.

Outputs

Paginated list. Each entry in 'list' wraps a customer under a 'customer' key. 'next_offset' is present only when more pages remain; pass it back as 'offset' to continue.

listlist
Array of { customer: {...} } entries.
next_offsettext
Cursor for the next page; absent on the last page.
Example output
{
  "list": [
    {
      "customer": {
        "auto_collection": "on",
        "company": "Acme Robotics",
        "created_at": 1769385600,
        "email": "jordan.ellis@acme.example",
        "first_name": "Jordan",
        "id": "cust_acme_8f21",
        "last_name": "Ellis",
        "object": "customer"
      }
    },
    {
      "customer": {
        "auto_collection": "off",
        "company": "Globex",
        "created_at": 1769299200,
        "email": "priya@globex.example",
        "first_name": "Priya",
        "id": "cust_globex_3b90",
        "last_name": "Nair",
        "object": "customer"
      }
    }
  ],
  "next_offset": "[\"1769299200000\",\"cust_globex_3b90\"]"
}

List invoices

List invoices in your Chargebee site, one page at a time, optionally filtered by customer ID and/or status. Returns a 'list' of invoice records with a 'next_offset' cursor. Amounts are in the currency's minor units (e.g. cents). Useful for accounts-receivable checks, chasing unpaid invoices, or revenue reporting. Beta: choose the 'Unpaid' status or set 'days_overdue_at_least' to get every unpaid or overdue invoice in one step, and read 'invoices', 'customers' and 'total_due_display' for a report of who owes what, already in dollars, with customer names and due dates in plain words.

Inputs

Customer IDcustomer_idtext
Filter to invoices for this customer ID. Leave blank for all customers.
Statusstatustext
Filter by invoice status. One of: paid, posted, payment_due, not_paid, voided, pending. Leave blank for all statuses. Beta: 'unpaid' asks for every invoice still owing money (payment due or not paid) in one call, reading every page, so there is no need to loop over the two statuses or walk pages.One of: unpaid (Unpaid (beta)), paid, posted, payment_due (Payment Due), not_paid (Not Paid), voided, pending.
Overdue by at least (days)days_overdue_at_leastnumber
Beta. Keep only invoices still owing money whose due date was at least this many days ago: 31 for invoices more than 30 days past due. Every page is read (up to 5,000 invoices) and 'limit' is ignored, so a collections report needs no date filter or page loop. Leave status blank, or choose 'unpaid'. Leave blank for no due-date filter.At least 0.
Limitlimitnumber
How many records to return in one page, from 1 to 100. Defaults to 10.From 1 to 100.
Continue fromoffsettext
To get the next page, paste the 'next_offset' value returned by the previous call. Leave blank for the first page.

Outputs

Paginated list. Each entry wraps an 'invoice'. 'total', 'amount_paid', and 'amount_due' are integers in the currency's minor units (e.g. cents). Dates are Unix epoch seconds.

countnumber
Beta. How many invoices are in 'list'.
customerslist
Beta. What each customer owes across these invoices, biggest first: customer (name), customer_id, invoices (how many), owed (in dollars), owed_display, currency and invoice_list (that customer's invoices in one line, such as INV-42 ($249.00, due Oct 9, 2026)). A report of who owes what, grouped by customer, is one table of these with no grouping or totaling step.
invoiceslist
Beta. The same invoices in plain words, one record each, ready for a table or a line per invoice with no conversion or lookup step: number, customer (the customer's name, else company, email or ID), customer_id, status, due_display (such as Oct 9, 2026), days_overdue, amount_due (in dollars, not cents), amount_due_display (such as $1,234.50) and currency. Sorted by customer, then the longest overdue first, so a table of them is already grouped by customer.
listlist
next_offsettext
Cursor for the next page; absent on the last page.
total_due_displaytext
Beta. The total still owed on these invoices, written the way a person reads it, such as $4,200.50 (each currency's total, joined with +, when there are several), ready for a message.
Example output
{
  "count": 2,
  "customers": [
    {
      "currency": "USD",
      "customer": "Globex",
      "customer_id": "cust_globex_3b90",
      "invoice_list": "INV-00043 ($249.00, due Feb 25, 2026)",
      "invoices": 1,
      "owed": 249.0,
      "owed_display": "$249.00"
    },
    {
      "currency": "USD",
      "customer": "Acme Corp",
      "customer_id": "cust_acme_8f21",
      "invoice_list": "INV-00042 ($0.00, due Jan 26, 2026)",
      "invoices": 1,
      "owed": 0.0,
      "owed_display": "$0.00"
    }
  ],
  "invoices": [
    {
      "amount_due": 0.0,
      "amount_due_display": "$0.00",
      "currency": "USD",
      "customer": "Acme Corp",
      "customer_id": "cust_acme_8f21",
      "days_overdue": 0,
      "due_display": "Jan 26, 2026",
      "number": "INV-00042",
      "status": "paid"
    },
    {
      "amount_due": 249.0,
      "amount_due_display": "$249.00",
      "currency": "USD",
      "customer": "Globex",
      "customer_id": "cust_globex_3b90",
      "days_overdue": 259,
      "due_display": "Feb 25, 2026",
      "number": "INV-00043",
      "status": "payment_due"
    }
  ],
  "list": [
    {
      "invoice": {
        "amount_due": 0,
        "amount_paid": 9900,
        "currency_code": "USD",
        "customer_id": "cust_acme_8f21",
        "date": 1769385600,
        "due_date": 1769385600,
        "id": "INV-00042",
        "object": "invoice",
        "status": "paid",
        "subscription_id": "sub_acme_pro_01",
        "total": 9900
      }
    },
    {
      "invoice": {
        "amount_due": 24900,
        "amount_paid": 0,
        "currency_code": "USD",
        "customer_id": "cust_globex_3b90",
        "date": 1769385600,
        "due_date": 1771977600,
        "id": "INV-00043",
        "object": "invoice",
        "status": "payment_due",
        "subscription_id": "sub_globex_team_02",
        "total": 24900
      }
    }
  ],
  "next_offset": null,
  "total_due_display": "$249.00"
}

List subscriptions

List subscriptions in your Chargebee site, one page at a time, optionally filtered by customer ID and/or status. Returns a 'list' of subscription records with a 'next_offset' cursor for paging. Useful for monitoring active subscriptions, spotting cancellations, or auditing a customer's plans. Beta: 'Cancels within days' lists only subscriptions due to cancel soon, soonest first; 'Get every page' reads all pages in one step; and each entry has ready-to-read customer_name, customer_email, plan, mrr_display and cancel_date_display for a table or email.

Inputs

Customer IDcustomer_idtext
Filter to subscriptions belonging to this customer ID. Leave blank for all customers.
Statusstatustext
Filter by subscription status. One of: future, in_trial, active, non_renewing, paused, cancelled. Leave blank for all statuses.One of: future, in_trial (In Trial), active, non_renewing (Non Renewing), paused, cancelled.
Cancels within dayscancels_within_daysnumber
Beta. Only subscriptions scheduled to cancel within this many days from the day the step runs, soonest first, for example 30 for 'canceling in the next month'. Subscriptions already canceled are left out. Use it instead of working out dates and filtering and sorting in later steps. Leave blank to list subscriptions whatever their cancel date.From 1 to 3650.
Get every pageall_pagestrue/false
Beta. Get every matching subscription at once, up to 2,000, instead of one page, so no loop over 'next_offset' is needed. 'truncated' says when it stopped early. How many per page is then ignored.Default: false.
Limitlimitnumber
How many records to return in one page, from 1 to 100. Defaults to 10.From 1 to 100.
Continue fromoffsettext
To get the next page, paste the 'next_offset' value returned by the previous call. Leave blank for the first page.

Outputs

Paginated list. Each entry wraps a 'subscription' (and often the related 'customer' and 'card'). Money fields such as 'mrr' are in the currency's minor units (e.g. cents). Term timestamps are Unix epoch seconds.

countnumber
Beta. How many subscriptions are in 'list', for an If such as 'none are canceling'.
listlist
next_offsettext
Cursor for the next page; absent on the last page.
truncatedtrue/false
Beta. True when 'Get every page' stopped at its limit before the last page.
Example output
{
  "count": 1,
  "list": [
    {
      "cancel_date_display": "Nov 28, 2026",
      "customer": {
        "company": "Acme Robotics",
        "email": "jordan.ellis@acme.example",
        "first_name": "Jordan",
        "id": "cust_acme_8f21",
        "last_name": "Ellis",
        "object": "customer"
      },
      "customer_email": "jordan.ellis@acme.example",
      "customer_name": "Acme Robotics",
      "mrr_display": "$99.00",
      "plan": "pro-USD-monthly",
      "subscription": {
        "billing_period": 1,
        "billing_period_unit": "month",
        "cancelled_at": 1795824000,
        "created_at": 1769385600,
        "currency_code": "USD",
        "current_term_end": 1795824000,
        "current_term_start": 1793232000,
        "customer_id": "cust_acme_8f21",
        "id": "sub_acme_pro_01",
        "mrr": 9900,
        "object": "subscription",
        "status": "non_renewing",
        "subscription_items": [
          {
            "amount": 9900,
            "item_price_id": "pro-USD-monthly",
            "item_type": "plan",
            "quantity": 1
          }
        ]
      }
    }
  ],
  "next_offset": null,
  "truncated": false
}

On this page