RevGlanceDocs

Stripe

Connect Stripe with a read-only restricted key, then add a webhook so new payments show up right away.

RevGlance reads your Stripe account through Stripe's API with a key you create. It reads charges, refunds, fees, disputes and subscriptions, and never charges, refunds or changes anything.

Before you start

  • You need to be the owner or an admin of the business in RevGlance. Viewers cannot add sources.
  • Use a restricted key rather than your secret key. RevGlance accepts both (rk_… or sk_…), but a restricted key can only read what you allow.
  • Test mode keys work too, which is handy for a first look. Connect a second source with your live key when you are ready.

Connect

  1. In the Stripe Dashboard, open Developers › API keys and choose Create restricted key. Call it RevGlance.
  2. Give it Read access to Balance, Charges, Customers, Disputes, Invoices, Checkout Sessions, Subscriptions and Coupons. Leave everything else at None.
  3. Create the key and copy it. It starts with rk_live_.
  4. Paste it under Restricted key and choose Connect Stripe. The first sync reads your whole history.

What the form asks for

FieldLooks like
Restricted keyStored encryptedrk_live_…

The Name field is optional. It tells two Stripe accounts in one business apart.

Add the webhook

Without a webhook RevGlance syncs Stripe every hour. With one, a new payment, refund or cancellation queues a sync within seconds.

  1. In RevGlance, open Settings › Sources, find the Stripe source, open its menu and choose Webhook. Copy the URL.
  2. In Stripe, open Developers › Webhooks and add an endpoint with that URL.
  3. Select the events that change your numbers: charge.succeeded, charge.failed, charge.refunded, charge.dispute.closed, customer.subscription.created, customer.subscription.updated, customer.subscription.deleted and invoice.paid. Any event works: each one simply starts a sync.
  4. Copy the endpoint's signing secret (whsec_…), paste it under Signing secret in RevGlance and save.

What RevGlance syncs

  • Balance transactions: every charge, refund, dispute and Stripe fee, in the currency Stripe settled it in.
  • Failed charges, for the failed charges metric and Recover.
  • Subscriptions of every status, with their customer, items, discounts and latest invoice, for MRR, plans, trials and cancellations. Stripe's cancellation reason and the customer's comment come along when Stripe has them.

The first sync reads your whole history. After that each sync reads from three days before the last one, so late changes are caught, and subscriptions are read in full every time.

How Stripe is counted

  • Charges, refunds and Stripe's fees come from your balance transactions, in the currency Stripe settled them in.
  • Card refunds count on the day Stripe records them. Bank payments (ACH, SEPA and other local methods) count too; a refund the bank sends back lowers your refunds again.
  • A dispute counts as a refund when Stripe takes the money back, and the refund is cancelled if you win it. Stripe's dispute fee is kept as the fee.
  • Coupons on the subscription and on single items come off MRR. A fixed-amount coupon only counts in its own currency.
  • Paused and unpaid subscriptions count as churn; a past-due one keeps counting while Stripe retries the card.
  • Charges, refunds and disputes count before tax, in the share of tax on their invoice or Checkout Session. Without read access to Checkout Sessions, tax on sales outside an invoice stays in.
  • A tax-inclusive price counts before tax in MRR, in the share of tax on the latest invoice.
  • Pausing payment collection counts as churn from the day RevGlance first sees it, since Stripe does not date it.

See How we count for the rules that hold for every provider.

Recovery emails

Recover links a failed subscription payment to its open invoice page in Stripe, where the customer can pay with a new card. When there is no open invoice it opens a Stripe customer portal session instead. That fallback needs the portal switched on in Stripe and a key allowed to write Customer portal sessions; without it, the email links to your own update-card page.

Troubleshooting

  • "Paste a Stripe secret or restricted key." The key must start with rk_ or sk_. A publishable key (pk_) cannot read anything.
  • "Stripe refused that key." The key was revoked, or it lacks read access to Balance.
  • "Stripe refused the failed-charge request" or "the subscription request": the key cannot read Charges or Subscriptions. Payments still sync; add the missing permission and sync again.