Skip to content

Accounts API

The Accounts API manages financial accounts, balances, and account products.

Overview

EndpointMethodDescription
/api/v1/accountsGETList all accounts
/api/v1/accountsPOSTCreate a new account
/api/v1/accounts/:idGETGet account details
/api/v1/accounts/:id/balanceGETGet account balance
/api/v1/accounts/:id/statementGETGet account statement

List Accounts

http
GET /api/v1/accounts
Authorization: Bearer {token}

Query Parameters:

ParameterTypeDescription
pageintegerPage number (default: 1)
per_pageintegerItems per page (default: 20, max: 100)
statusstringFilter by status: active, inactive, blocked
product_idstringFilter by account product

Response:

json
{
  "data": [
    {
      "id": "acc_01HQGX...",
      "name": "Main Operating Account",
      "product": {
        "id": "prod_pix_merchant",
        "name": "PIX Merchant Account"
      },
      "status": "active",
      "balance": {
        "available": 76824,
        "pending": 5000,
        "blocked": 0
      },
      "currency": "BRL",
      "created_at": "2026-01-15T10:00:00Z"
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 20,
    "total": 4,
    "total_pages": 1
  }
}

TIP

Balances are in centavos. R$ 768.24 = 76824.

Create Account

http
POST /api/v1/accounts
Authorization: Bearer {token}
Content-Type: application/json

{
  "name": "Settlement Account",
  "product_id": "prod_pix_settlement",
  "metadata": {
    "purpose": "Daily PIX settlements"
  }
}

Get Account Balance

Returns the real-time balance from TigerBeetle:

http
GET /api/v1/accounts/acc_01HQGX.../balance
Authorization: Bearer {token}

Response:

json
{
  "data": {
    "account_id": "acc_01HQGX...",
    "available": 76824,
    "pending": 5000,
    "blocked": 0,
    "total": 81824,
    "currency": "BRL",
    "updated_at": "2026-02-03T12:00:00Z"
  }
}

Balance Types

TypeDescription
availableFunds available for immediate use
pendingFunds in processing (PIX payouts, settlements)
blockedFunds blocked by compliance or disputes
totalSum of available + pending + blocked

Get Account Statement

http
GET /api/v1/accounts/acc_01HQGX.../statement?start_date=2026-02-01&end_date=2026-02-03
Authorization: Bearer {token}

Query Parameters:

ParameterTypeDescription
start_datedateStart date (YYYY-MM-DD)
end_datedateEnd date (YYYY-MM-DD)
pageintegerPage number
per_pageintegerItems per page (max: 100)
typestringFilter: credit, debit, all

Response:

json
{
  "data": {
    "account_id": "acc_01HQGX...",
    "opening_balance": 50000,
    "closing_balance": 76824,
    "entries": [
      {
        "id": "txn_01HQGX...",
        "type": "credit",
        "amount": 15000,
        "balance_after": 65000,
        "description": "PIX received - Maria Silva",
        "category": "pix_in",
        "end_to_end_id": "E12345678202602031200...",
        "created_at": "2026-02-01T10:30:00Z"
      }
    ]
  },
  "meta": {
    "page": 1,
    "per_page": 20,
    "total": 89,
    "total_pages": 5
  }
}

Account Products

Product IDNameDescription
prod_pix_merchantPIX MerchantMain operating account for merchants
prod_pix_settlementPIX SettlementSettlement holding account
prod_pix_escrowPIX EscrowEscrow for disputed transactions
prod_pix_feePIX FeePlatform fee collection
prod_pix_transitPIX TransitIn-flight transaction holding
prod_pix_providerPIX ProviderProvider integration account
prod_pix_reservePIX ReserveRegulatory reserve account
prod_pix_revenuePIX RevenueRevenue recognition account

Error Codes

CodeHTTP StatusDescription
ACCOUNT_NOT_FOUND404Account does not exist
ACCOUNT_INACTIVE422Account is not active
ACCOUNT_BLOCKED422Account is blocked by compliance
INVALID_PRODUCT422Unknown account product
DUPLICATE_ACCOUNT409Account with same parameters exists

FluxiQ Core - PIX Payment Gateway