Skip to main content

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​

  1. Go to dashboard.stripe.com/apikeys and sign in
  2. Copy the Secret key (starts with sk_live_ or sk_test_)
note

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:

TextText
PermissionsAccess to your own Stripe account
Connect PermissionsAccess 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:

CategorySet toWhy
CoreReadBalance, charges, refunds, customers
BillingRead

Subscriptions, invoices, products, prices

ReportingReadFinancial summaries (optional but nice)
Everything elseNoneNot needed — keep it locked down

For the Connect Permissions column (right), leave everything as None unless you use Stripe Connect.

note

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.

note

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​

CategoryExamples
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 wantTry 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_ or rk_test_ use test mode (sandbox data, no real charges).
  • Keys starting with sk_live_ or rk_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:

  1. Go to dashboard.stripe.com/apikeys
  2. Find your restricted key → click the pencil icon (edit)
  3. Scroll to the section the AI mentioned (e.g. Core, Billing)
  4. Change the permission from None to Read
  5. 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