> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rumorly.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Stripe

> Read subscriptions with a restricted key and put revenue next to every channel.

> [!NOTE]
>
> Stripe needs the Starter plan or higher. The 14-day signup trial includes it.

## Create a restricted key

Rumorly only ever reads from Stripe, so it asks for a restricted key with read access and nothing else. Full secret keys (`sk_…`) are refused.

1. In Stripe, go to **Developers → API keys** and select **Create restricted key**. Choose "Building your own integration" and name it `rumorly`.
2. Set these permissions to **Read** and leave everything else at **None**:

| Resource | Permission |
| - | - |
| Customers | Read |
| Subscriptions | Read |
| Products | Read |
| Prices | Read |
| Invoices | Read |
| Coupons | Read |

3. Create the key and copy it (`rk_live_…`, or `rk_test_…` in test mode).
4. In Rumorly, go to **Integrations → Stripe**, paste the key and pick your reporting currency.

Rumorly syncs right away and then every hour. The key is encrypted at rest; **Disconnect** deletes it.

## What counts as MRR

* Subscriptions that are `active` or `past_due` count. Trials, canceled, incomplete and paused subscriptions don't.
* Price × quantity for each subscription item, with percentage and fixed-amount discounts applied.
* Yearly, quarterly and other multi-month, weekly and daily plans are converted to a monthly amount.
* Metered prices, and tiered prices whose amount isn't fixed, are skipped and counted as unpriced.
* Other currencies are converted into your reporting currency with a fixed rate table. The rates are an approximation, which is fine for comparing channels but not for accounting.

## Matching customers

Each Stripe customer is matched to the person who answered by `rumorly_id` in the customer's metadata, then exact email, then company domain. See [How revenue is matched](/concepts#how-revenue-is-matched). To get exact matches, set `rumorly_id` to your user id when you create the Stripe customer:

```javascript theme={null}
await stripe.customers.create({
  email: user.email,
  metadata: { rumorly_id: String(user.id) }, // the same value you send as external_id
});
```

Revenue that couldn't be matched to anyone is shown as a share on every report, so you always know how much of the picture is missing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.