Transactions API (1.0)

Download OpenAPI specification:Download

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

Transactions

Endpoints for transaction data.

List transactions for the primary card account.

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

SecurityOAuth2
Request
query Parameters
cursor
string or null
limit
integer or null <int32>
user_ids
Array of strings or null
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
expand[]
Array of strings or null

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

Responses
200

listPrimaryCardTransactions 200 response

400

Bad request

401

Unauthorized

403

Forbidden

get/v2/transactions/card/primary
Request samples
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.

SecurityOAuth2
Request
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
Response samples
application/json
{
  • "next_cursor": "string",
  • "items": [
    ]
}

Accounts

Endpoints for account data.

List card accounts

This endpoint lists all accounts of card type.

SecurityOAuth2
Responses
200

listCardAccounts 200 response

400

Bad request

401

Unauthorized

403

Forbidden

get/v2/accounts/card
Request samples
Response samples
application/json
[
  • {
    }
]

List primary card account statements.

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

SecurityOAuth2
Request
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
Response samples
application/json
{
  • "next_cursor": "string",
  • "items": [
    ]
}

List cash accounts

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

SecurityOAuth2
Responses
200

listAccounts 200 response

400

Bad request

401

Unauthorized

403

Forbidden

get/v2/accounts/cash
Request samples
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.

SecurityOAuth2
Responses
200

getPrimaryAccount 200 response

400

Bad request

401

Unauthorized

403

Forbidden

get/v2/accounts/cash/primary
Request samples
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.

SecurityOAuth2
Request
path Parameters
id
required
string
Responses
200

getAccount 200 response

400

Bad request

401

Unauthorized

403

Forbidden

get/v2/accounts/cash/{id}
Request samples
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.

SecurityOAuth2
Request
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
Response samples
application/json
{
  • "next_cursor": "string",
  • "items": [
    ]
}
Copyright © Brex 2019–2022. All rights reserved.