The Stripe integration puts billing context where support happens. A teammate opening a ticket sees what the customer pays for, their invoices and any failed payment, without switching to Stripe. Kai can answer billing questions from the same data and make the changes you allow. Only project admins can connect it, and it needs the Team plan or higher. Each project takes one Stripe account.
Go to Settings → Apps and click Add app.
Pick Stripe. Under What should Stripe do?, keep the jobs you want ticked and click Continue with Stripe.
If the dialog offers Connect with Stripe, sign in to Stripe, pick the account and approve Gleap's permissions there. No key is stored that way.
Otherwise, paste a restricted key into Stripe restricted key and click Connect. Under the key field, the switch Match contacts by company domain when no Stripe customer has their exact email. is on by default. More on it below.


Gleap checks a key with Stripe before saving it. A publishable key, or a key that may not read customers, is refused with a message saying what to fix. Once it's connected, click Done. The Stripe card then shows in the sidebar of every ticket whose contact matches a Stripe customer.
Access | Stripe resources |
|---|---|
Write | Customers, Subscriptions, Invoices, Charges and Refunds, Customer portal |
Read | Payment Intents, Payment Methods, Products, Prices, Coupons |
For the card in the inbox, three steps, in order:
If the contact carries stripeCustomerId (a claim of the signed identity token, or custom data), that customer is used.
Otherwise Gleap searches Stripe for a customer with exactly the same email address.
If that finds nothing and the email is on a company domain, not a free provider like gmail.com, it searches for customers at that domain.
The domain step helps in B2B, where the person writing in is often not the one who pays. It's on by default. To turn it off, switch off Match contacts by company domain when no Stripe customer has their exact email. in the connect dialog or later in the Stripe settings.
Sending the customer id is still the reliable route. Put it in the signed identity token your backend creates for the logged-in user, as the stripeCustomerId 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]", stripeCustomerId: "cus_ABC123" },
process.env.GLEAP_IDENTITY_SECRET,
{ algorithm: "HS256", keyid: process.env.GLEAP_IDENTITY_KEY_ID, expiresIn: "1h" }
);
// In your app
await Gleap.setUserJwt(token);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 with status and renewal date, and their latest invoices. Open in Stripe jumps to the customer in Stripe, and keys from test mode show a Test badge.
The card also offers the billing actions you allow, such as Portal link, Retry payment, Cancel at period end or Refund. Each change goes through a confirm dialog and is logged on the ticket.
Go to Settings → Apps and open Stripe.
Under Billing actions, click Open Apps and set each action to Allow, Ask first or Never.
Optionally, add a coupon id under Retention discount. It's the only discount Kai may offer, to customers about to cancel.
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 Stripe customer. Everyone else gets the billing portal link by email, sent to the billing email on file. Kai never uses the company-domain match, and 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 Stripe customer by the signed stripeCustomerId, by the signed user id in the User id in Stripe metadata field (the metadata key on your Stripe customers that holds your user id), 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 stripeCustomerId claim or the User id in Stripe metadata field. 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.
Usually the contact has no email address, or their email in Gleap isn't the one on the Stripe account. A work address in your product and a personal one in billing is enough to break the match. Putting stripeCustomerId in the identity token removes the guesswork.