Connections
Connect Stripe
Create a restricted Stripe key, choose its permissions, and bring charges, fees, refunds, payouts and revenue schedules into the books.
One Stripe key brings in your revenue, gross of fees, with the fees and payouts as their own lines. You need someone whose Stripe role can create API keys, and an owner, admin or accountant in LedgerIt.
LedgerIt reads from Stripe unless you choose otherwise. Three optional write permissions let it make payment links on invoices, and nothing it does with them moves money out of your account.
The short version
- In Stripe, open your API keys page in live mode, select Create restricted key and set these permissions to Read.
- Copy the key.
- In LedgerIt, open Add connection at Stripe, paste the key and select Connect Stripe.
What comes in
- Charges, at their gross amount, on the day the customer was charged.
- Stripe's fees, each on its own line, filed as a processing cost.
- Refunds, disputes and failed bank debits, which reduce revenue.
- Payouts, as transfers from Payment processor receivable to your bank account, dated when they settle. A payout is never counted as revenue.
- Customers, with their name, email and location, linked to what they paid.
- Invoices you finalized in Stripe, so an unpaid one is on your receivables and each shows under Invoices.
- Revenue schedules, from invoices whose service period runs past the month they were booked in, so the revenue is earned over that period. See schedules.
The first sync reads up to 400 days of history. After that, Stripe syncs every 6 hours. New transactions then appear in your review queue.
A charge in a currency other than your books' is held back for a person to deal with, and gets no revenue schedule. An invoice in another currency is not brought in.
Create a key at Stripe
1. Open the API keys page
Sign in to Stripe and open your API keys page. Check that you are in live mode, not a sandbox. LedgerIt refuses a sandbox key, which would fill your books with test data. A live restricted key starts with rk_live_.
2. Start a restricted key
Select Create restricted key. If Stripe offers preset permissions, start with none. Stripe's guide to restricted API keys has the current screens.
Do not paste your secret key, the one starting sk_live_. It would connect, and it can do anything in your Stripe account.
3. Name it and choose its permissions
Enter a Key name you will recognize later, such as LedgerIt. Then set the rows below, and leave every other row on None. The names are the ones in Stripe's permissions reference; the form may shorten them.
| Permission | Set to | LedgerIt uses it for | Without it |
|---|---|---|---|
| Accounts (some forms call this All Connect resources) | Read | Checking whose account the key belongs to | Stripe rejects the connection |
| Balance | Read | Every movement of money in your Stripe balance | The sync fails |
| Balance transaction sources | Read | What is behind each movement | The sync fails |
| Charges and Refunds | Read | The charge behind a movement, and its customer | The sync fails |
| Disputes | Read | The dispute behind a movement | The sync can fail once a dispute is among your movements |
| Payouts | Read | The payout behind a movement | Nothing, as Balance transaction sources includes it |
| Invoices | Read | Your invoices, what they bill and where they stand, and their service periods for revenue schedules | The sync fails |
| Customers | Read | Each customer's name, email and location | Transactions still sync, with the customer known only by Stripe's id |
To make payment links on invoices, also set these four. Without them everything above still syncs.
| Permission | Set to | LedgerIt uses it for | Without it |
|---|---|---|---|
| Products | Write | The product a link's price is made with | LedgerIt cannot make a link, and says so on the invoice |
| Prices | Write | The amount owed on the invoice | LedgerIt cannot make a link, and says so on the invoice |
| Payment Links | Write | Making a link, and turning one off | LedgerIt cannot make or remove a link, and says so on the invoice |
| Checkout Sessions | Read | Which checkout paid which invoice | Payments are still matched, by the invoice LedgerIt names on each link's payment |
4. Copy the key
Select Create key and complete the verification Stripe sends you. Then select the key's value to copy it. Stripe does not show it again. If you lose it, create another.
Connect it in LedgerIt
- Open Add connection at Stripe. To click your way there, go to Integrations, select Add connection and, under Revenue, choose Stripe.
- Paste the key into API key.
- Optionally, give the connection a Label. You need a different one for each Stripe account you connect.
- Select Connect Stripe.
LedgerIt checks the key with Stripe before saving anything, then encrypts it. It is never shown again. That check only proves LedgerIt can see whose account it is: a missing permission other than Accounts shows up at the first sync. See Sync and check a connection.
Each Stripe account can feed one set of books.
If something goes wrong
Stripe says which permission a key is missing, and LedgerIt shows that message. A restricted key can be edited: on Stripe's API keys page, open the key's ⋯ menu and select Edit key.
| What you see | What it means | What to do |
|---|---|---|
| Stripe rejected that key when connecting | The key is wrong, or lacks Accounts | Check you copied it whole. Read the rest of the message for the permission it names, edit the key, and select Connect Stripe again |
| That is a Stripe test key when connecting | The key comes from a sandbox or test mode | Switch Stripe to live mode, create the key there, and select Connect Stripe again |
| That account is already connected to a set of books | This Stripe account feeds other books | Disconnect it there first |
| Last sync failed, with a Last error naming a permission | The key lacks one of the rows above | Edit the key, then select the sync icon |
| Last sync failed, with a Last error about an invalid or expired key | The key was expired or rolled at Stripe | Create a new key, select Reconnect and paste it |
| Behind | Stripe's target is 1 hour, and it syncs every 6, so this can show between syncs | Select the sync icon. If the sync succeeds, nothing is wrong |
A customer shown as an id starting cus_ | The key lacks Customers | Edit the key to add it |
| Not mapped, so not in the books | Stripe sent a transaction type LedgerIt does not map | Open it in the Inbox. The money it moved is missing from your figures until it is dealt with |
| The Stripe key these books use may only read on an invoice | The key lacks the write permissions | Edit the key to add Products, Prices and Payment Links, then try again |
Reconnecting under the same label replaces the old key rather than adding a second connection, and everything already in the books stays.
How long a key lasts
Stripe sets no fixed expiry on a restricted key. It stops working when someone expires it, or rolls it and the old key's time runs out. When that happens, create a new one and reconnect.
Disconnect Stripe
- Open Stripe from Integrations.
- On the connection's row, open the ⋯ menu and select Disconnect, then confirm.
LedgerIt destroys its copy of the key, and everything Stripe brought in stays in your books. The key itself is yours: to retire it, expire it on Stripe's API keys page.
A payment link LedgerIt already made stays on at Stripe, and LedgerIt no longer records what it takes. Turn off any you do not want before you disconnect, with Remove on the invoice.