Connect Stripe for billing context
Bring subscriptions, MRR and invoices into the ticket sidebar by connecting Stripe with a restricted API key — a step-by-step, illustrated guide.
Bring subscriptions, MRR and invoices into the ticket sidebar by connecting Stripe with a restricted API key — a step-by-step, illustrated guide.
Connecting Stripe enriches every ticket with the customer's real billing context — their subscriptions, invoices and revenue — pulled in automatically. Agents stop tab-hopping, and your AI-drafted replies become billing-aware. This guide walks you through it end to end in about five minutes.
What you get
Once Stripe is connected, Lunadesk quietly attaches billing data to the customer on each ticket:
- ·A “Stripe billing” card in the ticket sidebar — lifetime value, MRR, subscription status, a “Payment overdue” flag when the customer is delinquent, and each subscription with its recent invoices.
- ·Billing-aware AI drafts — the assistant reads that same context, so suggested replies already know whether the customer is on the Pro plan or has an unpaid invoice.
- ·A full integration workspace — Overview, Customers, Subscriptions, Invoices and Catalog tabs, with a one-click Resync.
Read-only by default. Out of the box Lunadesk only reads your Stripe data to display context — it never changes anything in your account unless you deliberately turn on the actions mode described below.
Before you begin
- ✓You're a Lunadesk admin (Settings → Integrations is admin-only).
- ✓You have access to your company's Stripe Dashboard with permission to create API keys.
- ✓You'll create a restricted API key — a scoped, least-privilege key. Never paste a full secret key (
sk_live_…); a restricted key (rk_live_…) is safer and all Lunadesk needs.
Step 1 — Create a restricted key in Stripe
In your Stripe Dashboard, head to the API keys page and mint a new restricted key. Here's the exact path:
In the Stripe Dashboard, click Developers (bottom-left), then API keys.
Under Restricted keys, click Create restricted key.
Give it a descriptive name so you recognise it later.
Set each resource below to Read (or Write for the actions mode). Every other resource stays None.
Click Create key and complete Stripe's two-factor verification if asked.
Stripe shows the key (rk_live_…) only once. Copy it — you'll paste it into Lunadesk next.
Permissions to grant
Set these resources on the key. This is the exact set Lunadesk needs to read your billing context (plus permission to register its sync webhook):
Shortcut: when Stripe asks what the key is for, pick “Providing this key to a third-party application”. Stripe pre-fills a sensible preset — just confirm the rows above are set. Webhook Endpoints → Write lets Lunadesk register the webhook that keeps your data fresh in real time.
Step 2 — Connect it in Lunadesk
Back in Lunadesk, go to Settings → Integrations, click Add an integration, and choose Stripe. You'll land on the Connect Stripe screen.
Go to Settings → Integrations, click Add an integration, and choose Stripe.
Choose how much access Lunadesk has. Read-only is the default and right for most teams.
Paste the rk_live_… key you copied from Stripe and click Connect Stripe.
Pick a connection mode
Paste your key and connect
Live vs test is automatic. Lunadesk detects the mode from the key prefix: an rk_live_… key reads your real, live data; an rk_test_… key only ever touches sandbox data. The key must have at least Read on Customers or the connection is rejected.
What happens after you connect
Lunadesk immediately backfills your customers, subscriptions, invoices, products and prices, then keeps them fresh via webhooks. On the integration's detail page you can:
- ·Browse synced data across the Overview, Customers, Subscriptions, Invoices and Catalog tabs — the Overview shows customer count, subscriptions by status, MRR, and paid/open invoices.
- ·Hit Resync any time to pull the latest from Stripe on demand.
- ·Disconnect to remove the stored credentials — billing context simply stops appearing on tickets.
Read-only vs Read + actions
| Capability | Read-only | Read + actions |
|---|---|---|
| Billing context on tickets (LTV, MRR, status) | ✓ | ✓ |
| Billing-aware AI drafts | ✓ | ✓ |
| Browse customers, subscriptions, invoices, catalog | ✓ | ✓ |
| Issue refunds from a ticket | — | ✓ |
| Cancel a subscription | — | ✓ |
| Retry / collect an unpaid invoice | — | ✓ |
| Stripe key permissions needed | Read only | Read + Write on Charges, Subscriptions, Invoices |
Match the mode to the key. Actions mode only works if your restricted key actually has the Write scopes. If you pick “Read + actions” but the key is read-only, the refund or cancel will fail at Stripe. You can always reconnect later with a wider key.
Keep your key secure
- ·Least privilege. Grant only the resources listed above — nothing more. A restricted key can't create charges or move money it wasn't given access to.
- ·Shown once. Stripe reveals the key a single time. Store it in a password manager if you need a copy; otherwise just create a new one.
- ·One key per tool. Use a dedicated key for Lunadesk so you can revoke it independently of your other integrations.
- ·Rotate & revoke. If a key is ever exposed, roll it in Stripe and reconnect. Lunadesk stores your key encrypted and never exposes it back to you or over the API.
Troubleshooting
“Could not validate the Stripe key”
“Stripe actions are not enabled”
The Account ID shows “—”
Data looks stale
I don't see Stripe under integrations
Open any ticket from a paying customer and you'll see their Stripe billing card in the sidebar — with the AI drafting replies that already understand their plan and payment status.