Skip to content

Transactions API (1.0)

The transactions API lets you view your transactions, accounts, and statements.

Download OpenAPI description
Languages
Servers
Production
https://api.brex.com
Staging (Note: This is not a sandbox. It will not work with customer tokens.)
https://api-staging.brex.com

Endpoints for transaction data.

Operations

List transactions for all card accounts.

Request

This endpoint lists all settled transactions for all card accounts. Regular users may only fetch their own "PURCHASE","REFUND" and "CHARGEBACK" settled transactions.

Security
OAuth2(Required scopes:
transactions.card.readonly
)
Query
cursorstring or null
limitinteger or null(int32)
user_idsArray of strings or null
posted_at_startstring or null(date-time)

Shows only transactions with a posted_at_date on or after this date-time. This parameter is the date-time notation as defined by RFC 3339, section 5.6

Example: posted_at_start=2022-12-12T23:59:59.999
expand[]Array of strings or null

expense_id can be passed to expand[] query parameter to get expanded, e.g., ?expand[]=expense_id.

curl -i -X GET \
  https://api.brex.com/v2/transactions/card/primary \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

listPrimaryCardTransactions 200 response

Bodyapplication/json
next_cursorstring or null
itemsArray of objects(CardTransaction)required
items[].​idstringrequired
items[].​card_idstring or null

ID of the card used for the transaction. Null when type is REWARDS_CREDIT or COLLECTION.

items[].​descriptionstringrequired

Description of the transaction

items[].​amountobject(Money)required

Money fields can be signed or unsigned. Fields are signed (an unsigned value will be interpreted as positive). The amount of money will be represented in the smallest denomination of the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.

items[].​amount.​amountinteger(int64)

The amount of money, in the smallest denomination of the currency indicated by currency. For example, when currency is USD, amount is in cents.

items[].​amount.​currencystring or null

The type of currency, in ISO 4217 format. Default to USD if not specified

items[].​initiated_at_datestring(date)required

ISO 8601 date string

items[].​posted_at_datestring(date)required

ISO 8601 date string

items[].​typestring or null
Enum"PURCHASE""REFUND""CHARGEBACK""REWARDS_CREDIT""COLLECTION""BNPL_FEE"
items[].​merchantobject or null
items[].​card_metadataobject or null

Set of key value pairs associated with this object. Please do not store any personally identifiable or sensitive information here. Limitations: maximum of 50 keys, keys cannot exceed 40 characters, values cannot exceed 500 characters.

items[].​expense_idstring or null

The expense ID related to the card transaction.

Response
application/json
{ "next_cursor": "string", "items": [ {} ] }

List transactions for the selected cash account.

Request

This endpoint lists all transactions for the cash account with the selected ID.

Security
OAuth2(Required scopes:
transactions.cash.readonly
)
Path
idstringrequired
Query
cursorstring or null
limitinteger or null(int32)
posted_at_startstring or null(date-time)

Shows only transactions with a posted_at_date on or after this date-time. This parameter is the date-time notation as defined by RFC 3339, section 5.6

Example: posted_at_start=2022-12-12T23:59:59.999
curl -i -X GET \
  'https://api.brex.com/v2/transactions/cash/{id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

listCashTransactions 200 response

Bodyapplication/json
next_cursorstring or null
itemsArray of objects(CashTransaction)required
items[].​idstringrequired
items[].​descriptionstringrequired

Description of the transaction

items[].​amountobject or null

Money fields can be signed or unsigned. Fields are signed (an unsigned value will be interpreted as positive). The amount of money will be represented in the smallest denomination of the currency indicated. For example, USD 7.00 will be represented in cents with an amount of 700.

items[].​initiated_at_datestring(date)required

ISO 8601 date of when the payment is initiated

items[].​posted_at_datestring(date)required

ISO 8601 date of when the payment is posted

items[].​typestring or null
Enum"PAYMENT""DIVIDEND""FEE""ADJUSTMENT""INTEREST""CARD_COLLECTION""REWARDS_REDEMPTION""RECEIVABLES_OFFERS_ADVANCE""FBO_TRANSFER""RECEIVABLES_OFFERS_REPAYMENT"
items[].​transfer_idstring or null

Transfer ID to fetch additional metadata about the transaction using https://developer.brex.com/openapi/payments_api/#operation/getTransfersById

Response
application/json
{ "next_cursor": "string", "items": [ {} ] }

Endpoints for account data.

Operations