Stripe Integration
Connect Stripe to Frevana to explore your account data and ask questions about your business. A restricted, read-only key is a good choice for reporting.
Setup
Step 1: Get Your API Key
- Go to dashboard.stripe.com/apikeys and sign in
- Copy the Secret key (starts with
sk_live_orsk_test_)
We recommend using a Restricted key for safety. Click + Create restricted key, and follow these steps:
When asked "How will you use this API key?":
- Select "Building your own integration" → click Continue
- Either option works the same way — this is just for Stripe's internal classification
Name your key:
- Enter a name like Frevana or
AI Assistant
Set permissions:
You'll see a long list of resource types, each with None / Read / Write toggles in two columns:
| Text | Text |
|---|---|
| Permissions | Access to your own Stripe account |
| Connect Permissions | Access to connected accounts (if you use Stripe Connect) |
What to select:
For the Permissions column (left), click Read on these category headers — it sets all sub-items at once:
| Category | Set to | Why |
|---|---|---|
| Core | Read | Balance, charges, refunds, customers |
| Billing | Read | Subscriptions, invoices, products, prices |
| Reporting | Read | Financial summaries (optional but nice) |
| Everything else | None | Not needed — keep it locked down |
For the Connect Permissions column (right), leave everything as None unless you use Stripe Connect.
Grant only the read permissions you need. Even read-only keys can expose sensitive business and customer data, so keep your key private.
Click Create key at the bottom, then copy the key (starts with rk_live_ or rk_test_).
Step 2: Paste in the Chat
Open Frevana and try a request, for example:
Show me this month's revenue
If Stripe isn't connected yet, Frevana will ask for your secret or restricted key. Provide it when prompted.
Don't paste a publishable key (pk_...). That's the wrong one. The AI needs the Secret key (sk_...) or a Restricted key (rk_...).
What You Can Do
| Category | Examples |
|---|---|
| Revenue | "Show this month's revenue", "What's my Stripe balance?" |
| Failed payments | "Any failed payments this week?" |
| Refunds | "List refunds from the last 30 days" |
| Customers | "List my recent customers", "Search for [email protected]" |
| Subscriptions | "How many active subscribers?", "Show all past-due subscriptions" |
| Products | "List my products and pricing", "Show prices for the Pro plan" |
| Invoices | "Show open invoices", "Find invoices for customer X" |
Sample Prompts
| What you want | Try saying |
|---|---|
| Revenue overview | "Show me this month's revenue" |
| Check balance | "What's my current Stripe balance?" |
| Failed payments | "Any failed payments in the last 7 days?" |
| Customer lookup | "Find the customer with email [email protected]" |
| Subscription health | "Give me a subscription summary by status" |
| Product catalog | "List all my products and their prices" |
| Open invoices | "Show all unpaid invoices" |
Test Mode vs Live Mode
- Keys starting with
sk_test_orrk_test_use test mode (sandbox data, no real charges). - Keys starting with
sk_live_orrk_live_use live mode (real data).
You can switch anytime by pasting a different key. Tell the AI "Reconnect Stripe" to swap keys.
Troubleshooting
"Invalid API key"
Make sure the key starts with sk_live_, sk_test_, or rk_. Get it from dashboard.stripe.com/apikeys.
"Permission denied" on some operations
Your restricted key is missing Read permission for that resource. To fix:
- Go to dashboard.stripe.com/apikeys
- Find your restricted key → click the pencil icon (edit)
- Scroll to the section the AI mentioned (e.g. Core, Billing)
- Change the permission from None to Read
- Click Save
No need to paste a new key — the existing one updates automatically.
Want to switch accounts or modes?
Tell the AI "Reconnect Stripe" and paste a new key.
Privacy & Security
- Your API key is stored only on your computer (
~/.config/stripe/config.json) - The AI only reads data — it never creates charges, modifies subscriptions, or changes your Stripe account
- We recommend restricted keys with read-only permissions for maximum safety
- You can revoke the key anytime in the Stripe Dashboard