Chargebee works like the other billing integrations: the customer's subscriptions and invoices appear next to the ticket you're answering, and Kai can answer billing questions from the same data. Only project admins can connect it, and it needs the Team plan or higher. Each project takes one Chargebee site.
Go to Settings → Apps and click Add app.
Pick Chargebee. Under What should Chargebee do?, keep Inbox panel and Kai answers billing questions ticked and click Continue with Chargebee.
Paste your Chargebee API key.
Enter your Site: the name in your Chargebee address, the acme in acme.chargebee.com.
Click Connect.
Gleap checks the key against that site before saving, so a site that doesn't exist, or a key from another site, is refused with a message. If you run a test site alongside a live one, take the key from the site you named. Once it's connected, click Done.


If the contact carries chargebeeCustomerId (a claim of the signed identity token, or custom data), that customer is used. Otherwise Gleap searches Chargebee for a customer with exactly the contact's email address.
The reliable route is to put the customer id in the signed identity token your backend creates for the logged-in user, as the chargebeeCustomerId claim. Kai then finds the customer directly, and the browser can't change it.
// On your server, after the user logged in
const token = jwt.sign(
{ userId: String(user.id), email: "[email protected]", chargebeeCustomerId: "16BdBpSAaFTZ4dc" },
process.env.GLEAP_IDENTITY_SECRET,
{ algorithm: "HS256", keyid: process.env.GLEAP_IDENTITY_KEY_ID, expiresIn: "1h" }
);
// In your app
await Gleap.setUserJwt(token);There's no domain-level fallback here, so without the id the email has to match. In B2B, where the person writing in often isn't the billing contact, sending the customer id is what makes the card work. How to create the key and sign the token is in Identify users and send attributes and events.
The customer, a failed payment if there is one, their subscriptions and their latest invoices. That's enough to answer "what am I paying for" and "did my last invoice go through" without leaving the ticket. Open in Chargebee jumps to the customer there.
The card also offers the billing actions you allow, such as Portal link, Retry payment or Cancel at period end. Each change goes through a confirm dialog and is logged on the ticket.
Go to Settings → Apps and open Chargebee.
Under Billing actions, click Open Apps and set each action to Allow, Ask first or Never.
If your Chargebee customer ids are the user ids you pass to Gleap, turn on Customer ids are user ids.
Every action that changes something starts as Ask first: the customer confirms on a card in the chat, or a teammate approves. Refunds can also take an up to limit. With Allow and a limit, Kai refunds on its own up to that amount and never more.
Kai shows billing details in the chat only to a verified customer who is tied to their Chargebee customer. Everyone else gets the billing portal link by email, sent to the billing email on file. Kai never matches on details the customer typed.
With signed sessions on, you choose what verifies a customer under Settings → Security → Customer identity → Customer authentication. Each channel has one rule for identified users and one for leads and visitors. A channel set to Default follows the default rule:
Messenger, identified users: by default a signed login (the identity token your app sends) counts, and anyone without one can confirm an email code. You can require the signed login only.
Leads and visitors, and every other channel: they carry no signature, so the default rule applies, which is the email code unless you change it.
A verified customer is tied to their Chargebee customer by the signed chargebeeCustomerId, by the signed user id when Customer ids are user ids is on, or by the exact email they confirmed with the code.
Without signed sessions, only signed-in users whose user id Gleap verifies count, through the chargebeeCustomerId claim or Customer ids are user ids. The email code doesn't unlock billing details there.
When the rule allows the code, Kai asks for it in the conversation and Gleap sends 6 digits to the email on the contact. With no email on file, Kai can't verify the customer. The code is valid for 10 minutes, allows 3 attempts, and a new one can be sent every 30 seconds. How the customer enters it depends on the channel:
Messenger: a Verify email card in the chat.
Email, WhatsApp, Instagram, Facebook, Slack and Telegram: the customer replies in the thread with the 6 digits.
Phone and Discord: not supported yet.
Once confirmed, the customer stays verified for 30 minutes, as long as the contact's email doesn't change.
Check that the contact has an email address and that the same address is on a Chargebee customer. If your customers use a different address in your product than in billing, put chargebeeCustomerId in the identity token.
Data is read from Chargebee when the card loads and kept for up to five minutes per contact; the reload button on the card fetches it again.