Transactions API (0.1)

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>
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>
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": [
    ]
}

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–2021. All rights reserved.