Transactions API (1.0)

Download OpenAPI specification:Download

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

Authentication

OAuth2

OAuth2 security scheme

Security Scheme Type OAuth2
authorizationCode OAuth Flow
Authorization URL: https://accounts.brex.com/oauth2/v1/auth
Token URL: https://accounts.brex.com/oauth2/v1/token
Scopes:
  • openid -

    openid

  • offline_access -

    offline access

  • transactions.card.readonly -

    View card transaction data

  • statements.card.readonly -

    View card statement data

  • accounts.card.readonly -

    View card account data

  • accounts.cash.readonly -

    View cash account data

Transactions

Endpoints for transaction data.

List transactions for the primary card account.

This endpoint lists all settled transactions for the primary card account.

Request
Security:
OAuth2 (transactions.card.readonly)
query Parameters
cursor
string or null
limit
integer or null <int32>
posted_at_start
string 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
Responses
200

listPrimaryCardTransactions 200 response

400

Bad request

401

Unauthorized

403

Forbidden

get/v2/transactions/card/primary
Request samples
curl -i -X GET \
  https://platform.brexapis.com/v2/transactions/card/primary \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Response samples
application/json
{
  • "next_cursor": "string",
  • "items": [
    ]
}

List transactions for the selected cash account.

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

Request
Security:
OAuth2 (transactions.cash.readonly)
path Parameters
id
required
string
query Parameters
cursor
string or null
limit
integer or null <int32>
posted_at_start
string 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
Responses
200

listCashTransactions 200 response

400

Bad request

401

Unauthorized

403

Forbidden

get/v2/transactions/cash/{id}
Request samples
curl -i -X GET \
  'https://platform.brexapis.com/v2/transactions/cash/{id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Response samples
application/json
{
  • "next_cursor": "string",
  • "items": [
    ]
}

Accounts

Endpoints for account data.

List card accounts

This endpoint lists all accounts of card type.

Request
Security:
OAuth2 (accounts.card.readonly)
Responses
200

listCardAccounts 200 response

400

Bad request

401

Unauthorized

403

Forbidden

get/v2/accounts/card
Request samples
curl -i -X GET \
  https://platform.brexapis.com/v2/accounts/card \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Response samples
application/json
[
  • {
    }
]

List primary card account statements.

This endpoint lists all finalized statements for the primary card account.

Request
Security:
OAuth2 (statements.card.readonly)
query Parameters
cursor
string or null
limit
integer or null <int32>
Responses
200

listPrimaryCardStatements 200 response

400

Bad request

401

Unauthorized

403

Forbidden

get/v2/accounts/card/primary/statements
Request samples
curl -i -X GET \
  https://platform.brexapis.com/v2/accounts/card/primary/statements \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Response samples
application/json
{
  • "next_cursor": "string",
  • "items": [
    ]
}

List cash accounts

This endpoint lists all the existing cash accounts with their status.

Request
Security:
OAuth2 (accounts.cash.readonly)
Responses
200

listAccounts 200 response

400

Bad request

401

Unauthorized

403

Forbidden

get/v2/accounts/cash
Request samples
curl -i -X GET \
  https://platform.brexapis.com/v2/accounts/cash \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Response samples
application/json
{
  • "next_cursor": "string",
  • "items": [
    ]
}

Get primary cash account

This endpoint returns the primary cash account with its status. There will always be only one primary account.

Request
Security:
OAuth2 (accounts.cash.readonly)
Responses
200

getPrimaryAccount 200 response

400

Bad request

401

Unauthorized

403

Forbidden

get/v2/accounts/cash/primary
Request samples
curl -i -X GET \
  https://platform.brexapis.com/v2/accounts/cash/primary \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Response samples
application/json
{
  • "id": "string",
  • "name": "string",
  • "status": "ACTIVE",
  • "current_balance": {
    },
  • "available_balance": {
    },
  • "account_number": "string",
  • "routing_number": "string",
  • "primary": true
}

Get cash account by ID

This endpoint returns the cash account associated with the provided ID with its status.

Request
Security:
OAuth2 (accounts.cash.readonly)
path Parameters
id
required
string
Responses
200

getAccount 200 response

400

Bad request

401

Unauthorized

403

Forbidden

get/v2/accounts/cash/{id}
Request samples
curl -i -X GET \
  'https://platform.brexapis.com/v2/accounts/cash/{id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Response samples
application/json
{
  • "id": "string",
  • "name": "string",
  • "status": "ACTIVE",
  • "current_balance": {
    },
  • "available_balance": {
    },
  • "account_number": "string",
  • "routing_number": "string",
  • "primary": true
}

List cash account statements.

This endpoint lists all finalized statements for the cash account by ID.

Request
Security:
OAuth2 (statements.cash.readonly)
path Parameters
id
required
string
query Parameters
cursor
string or null
limit
integer or null <int32>
Responses
200

listCashStatements 200 response

400

Bad request

401

Unauthorized

403

Forbidden

get/v2/accounts/cash/{id}/statements
Request samples
curl -i -X GET \
  'https://platform.brexapis.com/v2/accounts/cash/{id}/statements' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
Response samples
application/json
{
  • "next_cursor": "string",
  • "items": [
    ]
}
Copyright © Brex 2019–2022. All rights reserved.