---
title: "Stripe Revenue Sync"
description: "Import your paid Stripe invoices as invoices in Frihet with a read-only restricted key. Manual import and auto-sync every 6 hours."
canonical_url: "https://docs.frihet.io/en/integraciones/stripe-revenue"
language: "en"
---

# Stripe Revenue Sync

:::note Connection
Frihet stores a restricted Stripe key and uses it to read your paid invoices. You can import them whenever you want or turn on auto-sync every 6 hours.
:::

## What Frihet does

- Stores the restricted Stripe key (stored encrypted).
- **Test connection** — Frihet checks the key against your Stripe account.
- **Import invoices** — reads the paid invoices from your Stripe account and creates one invoice in Frihet for each. Every manual import checks the paid invoices created in the last 90 days; the ones already imported are skipped.
- **Auto-sync every 6 hours** — if you turn it on, every 6 hours Frihet checks the invoices created in Stripe since the last sync (the first time, since you connected) and imports the ones already paid. An invoice created before that sync and paid afterwards is not picked up by auto-sync: import it with **Import invoices**.
- Each imported invoice is saved as paid, with the Stripe payment date as its issue date, and receives its Frihet invoice number.
- The Stripe invoice ID is stored on the Frihet invoice: a Stripe invoice that was already imported is not imported again.
- If a Stripe invoice cannot be reproduced exactly (its amounts do not match Stripe's, it has several tax rates or the rate is not recognized), Frihet does not import it, lists it under **Stripe invoices not imported** and later imports skip it. Issue it by hand in Frihet with the Stripe amounts.
- If Stripe rejects the key, Frihet asks you to replace it before importing again.

## What Frihet does not do

- Import customers, subscriptions, standalone payments or refunds: only Stripe invoices with paid status.
- Let you pick a start date when connecting: there is no such field.
- Write to your Stripe account.
- Collect payment on invoices from Frihet: that is what [Stripe Connect](./stripe-connect) is for.

## Requirements

- An active [Stripe](https://stripe.com) account
- A Stripe **restricted key** with read permission on Invoices and Customers
- Each connected integration counts toward your plan limit: 2 on Free, 5 on Pro, unlimited on Premium.

## Connect

### Step 1: create a restricted key in Stripe

1. Go to [Stripe Dashboard → Developers → API Keys](https://dashboard.stripe.com/apikeys)
2. Click **Create restricted key**
3. Name it, for example `Frihet Revenue Sync`
4. Grant read permission (**Read**) on:
   - **Invoices**
   - **Customers**
5. Copy the key (it starts with `rk_live_`)

### Step 2: save it in Frihet

1. In Frihet, go to **Integrations**
2. Open **Stripe Revenue Sync**
3. On the **Connection** tab, paste the restricted key
4. Click **Test connection** to verify
5. If the test succeeds, click **Save connection**

### Step 3: import invoices

1. On the **Data** tab, click **Import invoices**
2. Frihet reads the paid invoices from Stripe and creates the ones that do not already exist in Frihet

### Step 4: turn on auto-sync (optional)

1. On the **Settings** tab, turn on **Auto-sync every 6 hours**
2. Frihet will import the new invoices that are already paid every 6 hours

## How each invoice is imported

| Stripe                                      | Frihet                                              |
| ------------------------------------------- | --------------------------------------------------- |
| Customer name, email, address and tax ID    | Client (reused if it already exists)                |
| Invoice lines                               | Invoice lines                                       |
| Tax rate                                    | Invoice tax rate                                    |
| Payment date                                | Issue date and due date                             |
| Stripe invoice number                       | Invoice notes ("Importado desde Stripe Revenue Sync") |
| Stripe invoice ID                           | Stored so the same invoice is not imported twice    |

The Stripe invoice number is kept in the notes: the Frihet invoice carries its own number.

## Security

- The restricted key only reads: it cannot move money.
- The key is stored encrypted.

## Troubleshooting

### No invoices were imported

- Check that the key has read permission on **Invoices** and **Customers**
- Only invoices with paid status in Stripe are imported
- Check that you are not using a test-mode key if your payments are real
- A manual import checks invoices created in the last 90 days: older ones are not imported

### Reconnect your account

- Stripe has rejected the key: it has expired, been revoked or lacks permissions
- Create a new key in the Stripe Dashboard and replace it on the **Connection** tab

### Stripe invoices not imported

- These are invoices Frihet cannot reproduce exactly. Issue them by hand in Frihet with the Stripe amounts

### Disconnect

Invoices already imported stay in Frihet. To disconnect, go to **Integrations**, open **Stripe Revenue Sync** and go to the **Settings** tab; there, click **Disconnect**.

## Next steps

- [Collect payments with Stripe Connect](./stripe-connect)
- [Overview of the Stripe integrations](./stripe)
