Connections

Connect Brex

Create a read-only Brex API token, choose its nine scopes, and bring your Brex cash account, every card, receipts and cardholders into the books.

One Brex connection brings in your cash account and every card. It takes about five minutes and needs someone who is an account admin at Brex, and an owner, admin or accountant in LedgerIt.

LedgerIt only reads from Brex. It never moves money, and every scope below is read-only.

The short version

  1. In Brex, open your developer settings, select Create token and set the nine rows to Read only.
  2. Copy the token.
  3. In LedgerIt, open Add connection at Brex, paste the token and select Connect Brex.

What comes in

  • Your Brex cash account, as a bank account in the books, with its transactions and balances.
  • Every card, each on its own liability account under one card account. Repayments and rewards, which belong to no single card, land on the card account itself.
  • Receipts your team uploaded to Brex, attached to their charges.
  • Who spent it, with their email, so a missing receipt reaches the right person.
  • Balances, today's and the close of every statement Brex has finalized, which reconcile the account at the close. A month that ended before you connected Brex has its figure too.

The first sync reads up to 400 days of history. After that, Brex syncs every 6 hours.

How fast changes arrive

When Brex tells LedgerIt that money moved in or out of your cash account, LedgerIt syncs straight away, so it reaches the books within about a minute. Card charges, and anything else, arrive with the sync every 6 hours.

You do nothing for this. After the first sync, LedgerIt asks Brex for these notices with your connection. Brex allows one notice address per company, so if your company already uses its own, or Brex declines for another reason, the connection keeps syncing every 6 hours, as before. LedgerIt asks again at every sync. Brex lists Transfers on Read only as the access these notices need: if they do not arrive, a new token that also has that row on Read only, never Write, may get them.

Sign in, if LedgerIt offers it

If choosing Brex under Add connection shows Connect with Brex, you do not need a token:

  1. Select Connect with Brex.
  2. Sign in at Brex and approve read-only access.
  3. Brex sends you back to LedgerIt, and the connection finishes.

A connection made by signing in before LedgerIt asked for card statements has today's card balance and no statement close. Select Reconnect on the connection and approve again to add it.

If it shows a field called API key instead, create a token.

Create a token at Brex

1. Open the developer settings

Sign in to Brex as an account admin and open your developer settings. The link goes straight there. To click your way there instead:

  1. At the top left of Brex, select your name, then Settings.

    Brex's account menu open at the top left, with your name and Settings marked

  2. In the list of settings, under your company's name, select Developer.

    Brex's settings list, from Company settings to AI, with Developer marked

2. Accept the agreement, once

If your company has not accepted it yet, Brex asks you to first. Select View agreement.

Brex's API tokens page before the agreement is accepted: Review the Brex API Access Agreement, with a View agreement button

Read the agreement, tick I accept and agree to the terms and conditions. and select Submit. Selecting Submit has the same effect as signing, on behalf of your company, so this is for someone authorized to do that.

Brex's Developer portal terms and conditions, with the box ticked for I accept and agree to the terms and conditions, and a Submit button

3. Create a token

You now see API tokens. Select Create token.

Brex's API tokens page, with no tokens yet and a Create token button at the top

Brex has no test environment, so every token reaches your real account. That is why the scopes you choose matter.

4. Name it and choose its scopes

Give it a Token name you will recognize later, such as LedgerIt. Then set the nine rows below to Read only, and leave every other row on None. They are in the order the form shows them.

Under Expenses:

  • Card Expenses brings receipts, the merchant and who spent it. Without it, charges sync without those, and nothing on screen says why.

Brex's Create API token form: the Token name field, and Card Expenses set to Read only under Expenses

Under Team:

  • Cards lists your cards. Without it, Brex rejects the connection.
  • Users brings each cardholder's email. Without it, cardholders are known by name only, and the connection shows Can't read your team.

The Team section of the form: Cards set to Read only, with Card Numbers Read and Send left on None

Under Transactions:

  • Business Accounts Data reads your cash account and its balance today. Without it, Brex rejects the connection.
  • Business Accounts Statements reads what the cash account closed at on each of its statements. Without it, the close has no statement figure for the cash account.
  • Business Accounts Transactions reads the cash account's transactions. Without it, the sync fails.
  • Card Accounts reads what the cards owe today. Without it, the close has no figure for the cards.
  • Card Statements reads what the cards closed at on each of their statements. Without it, the close has no statement figure for the cards.
  • Card Transactions reads every card's charges, repayments and rewards. Without it, the sync fails.

The end of the Team section and the Transactions section: Users, Business Accounts Data, Business Accounts Statements, Business Accounts Transactions, Card Accounts, Card Statements and Card Transactions all set to Read only

Four of them are the books themselves: Cards, Business Accounts Data, Business Accounts Transactions and Card Transactions. Without the other five the books still sync, with less.

Do not choose Write on any row. LedgerIt does not use it, and a token with Transfers on Write could move money. Leave Card Numbers Read and Send on None too: LedgerIt has no use for full card numbers.

5. Copy the token

Select Create token, check the scopes on the confirmation screen, and select Allow Access. Copy the token straight away, because Brex does not show it again. If you lose it, create another.

Connect it in LedgerIt

  1. Open Add connection at Brex. To click your way there, go to Integrations, select Add connection and, under Banks and cards, choose Brex.
  2. Paste the token into API key.
  3. Optionally, give the connection a Label. You need a different one for each Brex account you connect.
  4. Select Connect Brex.

LedgerIt checks the token with Brex before saving anything, then encrypts it. It is never shown again. The first sync starts from there: see Sync and check a connection.

If something goes wrong

Most of these come from a token missing a row. You fix that with a new token: create one with all nine rows, select Reconnect on the connection, and paste it.

What you seeWhat it means
Brex rejected that key when connectingThe token was not copied whole, or lacks Cards or Business Accounts Data
Last sync failedThe token lacks Business Accounts Transactions or Card Transactions, or has stopped working
Can't read your teamThe token lacks Users. The button here says Reconnect Brex
Charges with no receipts or spenderThe token may lack Card Expenses
No statement balance at the closeThe token lacks a statement row or Card Accounts, or the connection was signed in before LedgerIt asked for card statements

Reconnecting under the same label replaces the old token rather than adding a second connection, and everything already in the books stays.

How long a token lasts

A Brex token has no fixed expiry. It stops working in two cases:

  • It goes unused for 90 days. LedgerIt syncs every 6 hours, so this happens only if you pause the connection for that long.
  • The person who created it is no longer active at Brex. The Creator status column on Brex's API tokens page shows this. When someone who created a token leaves, create a new one and reconnect.

Disconnect Brex

  1. Open Brex from Integrations.
  2. On the connection's row, open the ⋯ menu and select Disconnect, then confirm.

LedgerIt stops Brex's notices to it, destroys its copy of the token, and everything Brex brought in stays in your books. The token itself is yours: to retire it, revoke it on Brex's API tokens page. A connection made by signing in has its access withdrawn at Brex for you.