Skip to Content
Connections · Billing platforms

Chargebee

Connect Chargebee to Altruon with an API token, your site URL and a webhook, so subscriptions, invoices and credit notes stay in sync.

Connect Chargebee so that Altruon creates subscriptions there, collects every invoice through the acquirers you route to, and keeps subscriptions, invoices and credit notes in sync.

At a glance
Chargebee
What syncs
Subscriptions, invoices (first and recurring) and credit notes
What you need
A full-access API key (the API token) and your Chargebee site URL
Webhook
Manual. You add a webhook in Chargebee with seven invoice, credit note and subscription events.
Good to know
Your sandbox site and your production site have different URLs. Altruon records each payment on the Chargebee invoice.

Before you start

  • Altruon backoffice accessYou can sign in to the environment you are connecting. See Sandbox and environments.
  • A Chargebee siteYou can open Settings > Configure Chargebee in the Chargebee backoffice, with its API Keys and Webhooks pages.
  • An acquirer to collect withAltruon collects Chargebee invoices through an acquirer you connect. See Acquirers.

Get your Chargebee credentials

  1. In the Chargebee backoffice, go to Settings > Configure Chargebee > API Keys.
  2. Copy a full-access API key. This is the API token.
  3. Note your Chargebee site URL. Replace {your-site} with the name of your site.
EnvironmentSite URL
Sandboxhttps://{your-site}-test.chargebee.com
Productionhttps://{your-site}.chargebee.com

Connect Chargebee in Altruon

  1. Sign in to Altruon and go to Settings > Billing Platforms.
  2. Click + Add Integration and select Chargebee.
  3. Enter the API token in Token and the site URL in URL.
  4. Click Add Integration.

Once connected, the Chargebee integration is marked Active.

The Add Billing Platform dialog in Altruon with Chargebee selected, empty Token and URL fields and the Add Integration button
Altruon: Add Billing Platform for Chargebee

Set up the webhook

Altruon needs a webhook from Chargebee to stay in sync with your billing events.

  1. In Altruon, go to Settings > Billing Platforms and click View Integration on Chargebee.

  2. Copy the Webhook Endpoint URL.

    The Integration Details dialog for Chargebee in Altruon, with status Active, the site URL, a masked token and the Webhook Endpoint field
    Altruon: Integration Details for Chargebee
  3. In the Chargebee backoffice, go to Settings > Configure Chargebee > Webhooks.

  4. Click + Add Webhook.

  5. Paste the URL into the Webhook URL field.

  6. Under Events to Send, select:

    • Invoice Generated
    • Credit Note Created
    • Subscription Created
    • Subscription Cancelled
    • Subscription Reactivated
    • Subscription Deleted
    • Subscription Paused
  7. Click Create.

The Create a Webhook form in Chargebee, with the webhook name Altruon webhook, the Altruon URL in the Webhook URL field, the Events to Send selector and the Create button
Chargebee: Create a Webhook

Test the connection

  1. Open Settings > Billing Platforms. Chargebee is listed as Active.
  2. With an acquirer connected and a routing entry in place, take a test payment in sandbox for a Chargebee plan. See Testing.
  3. Check the result in Chargebee: the subscription exists, and the payment is recorded on its first invoice with a reference made of the acquirer, the payment method and the acquirer's transaction ID.

Notes and limits

  • Subscriptions. Altruon creates the subscription in Chargebee after the first successful payment or trial setup, with any supported acquirer and payment method.
  • Invoices. First and recurring invoices are synchronized and collected automatically.
  • Credit notes. Credit notes are synchronized, and the refund is made automatically on any supported acquirer and payment method.
  • Site URLs. The sandbox site ends in -test.chargebee.com. Connect it in the Altruon sandbox, and the production site in production.
  • Trials. The trial length comes from your catalog, for example the trial on the Chargebee item. See Trials.

Next steps