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

  1. In Stripe, open your API keys page in live mode, select Create restricted key and set these permissions to Read.
  2. Copy the key.
  3. 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.

PermissionSet toLedgerIt uses it forWithout it
Accounts (some forms call this All Connect resources)ReadChecking whose account the key belongs toStripe rejects the connection
BalanceReadEvery movement of money in your Stripe balanceThe sync fails
Balance transaction sourcesReadWhat is behind each movementThe sync fails
Charges and RefundsReadThe charge behind a movement, and its customerThe sync fails
DisputesReadThe dispute behind a movementThe sync can fail once a dispute is among your movements
PayoutsReadThe payout behind a movementNothing, as Balance transaction sources includes it
InvoicesReadYour invoices, what they bill and where they stand, and their service periods for revenue schedulesThe sync fails
CustomersReadEach customer's name, email and locationTransactions 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.

PermissionSet toLedgerIt uses it forWithout it
ProductsWriteThe product a link's price is made withLedgerIt cannot make a link, and says so on the invoice
PricesWriteThe amount owed on the invoiceLedgerIt cannot make a link, and says so on the invoice
Payment LinksWriteMaking a link, and turning one offLedgerIt cannot make or remove a link, and says so on the invoice
Checkout SessionsReadWhich checkout paid which invoicePayments 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

  1. Open Add connection at Stripe. To click your way there, go to Integrations, select Add connection and, under Revenue, choose Stripe.
  2. Paste the key into API key.
  3. Optionally, give the connection a Label. You need a different one for each Stripe account you connect.
  4. 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 seeWhat it meansWhat to do
Stripe rejected that key when connectingThe key is wrong, or lacks AccountsCheck 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 connectingThe key comes from a sandbox or test modeSwitch Stripe to live mode, create the key there, and select Connect Stripe again
That account is already connected to a set of booksThis Stripe account feeds other booksDisconnect it there first
Last sync failed, with a Last error naming a permissionThe key lacks one of the rows aboveEdit the key, then select the sync icon
Last sync failed, with a Last error about an invalid or expired keyThe key was expired or rolled at StripeCreate a new key, select Reconnect and paste it
BehindStripe's target is 1 hour, and it syncs every 6, so this can show between syncsSelect the sync icon. If the sync succeeds, nothing is wrong
A customer shown as an id starting cus_The key lacks CustomersEdit the key to add it
Not mapped, so not in the booksStripe sent a transaction type LedgerIt does not mapOpen 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 invoiceThe key lacks the write permissionsEdit 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

  1. Open Stripe from Integrations.
  2. 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.