Skip to content

Transfers API

The Transfers API enables internal fund movements between accounts within the FluxiQ platform.

Overview

EndpointMethodDescription
/api/v1/transfersPOSTCreate a transfer
/api/v1/transfers/:idGETGet transfer details
/api/v1/transfersGETList transfers

Create Transfer

Move funds between two accounts:

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

{
  "source_account_id": "acc_01HQGX...",
  "destination_account_id": "acc_01HQGY...",
  "amount": 10000,
  "description": "Settlement transfer",
  "idempotency_key": "xfer_20260203_001",
  "metadata": {
    "settlement_date": "2026-02-03",
    "batch_id": "batch_456"
  }
}

Response:

json
{
  "data": {
    "id": "xfer_01HQGX...",
    "status": "completed",
    "source_account_id": "acc_01HQGX...",
    "destination_account_id": "acc_01HQGY...",
    "amount": 10000,
    "description": "Settlement transfer",
    "ledger_entry_id": "tb_01HQGX...",
    "idempotency_key": "xfer_20260203_001",
    "created_at": "2026-02-03T12:00:00Z",
    "completed_at": "2026-02-03T12:00:00Z"
  }
}

INFO

Internal transfers are processed synchronously through TigerBeetle and complete in under 10ms.

List Transfers

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

Query Parameters:

ParameterTypeDescription
pageintegerPage number (default: 1)
per_pageintegerItems per page (default: 20, max: 100)
account_idstringFilter by source or destination account
statusstringFilter: completed, failed, pending
start_datedateStart date (YYYY-MM-DD)
end_datedateEnd date (YYYY-MM-DD)

Transfer Statuses

StatusDescription
completedTransfer successfully executed
failedTransfer failed (insufficient funds, account blocked)
pendingTransfer awaiting approval (for large amounts)

Double-Entry Ledger

Every transfer creates a balanced double-entry record in TigerBeetle:

Transfer: acc_source -> acc_destination (R$ 100.00)

  Debit:  acc_source        10000
  Credit: acc_destination    10000
  ────────────────────────────────
  Balance:                       0  (always zero)

This ensures:

  • Total debits always equal total credits
  • No funds are created or destroyed
  • Complete audit trail for every movement

Error Codes

CodeHTTP StatusDescription
INSUFFICIENT_FUNDS422Source account has insufficient available balance
SAME_ACCOUNT422Source and destination cannot be the same
ACCOUNT_NOT_FOUND404Source or destination account not found
ACCOUNT_BLOCKED422One of the accounts is blocked
AMOUNT_TOO_LOW422Amount must be greater than zero
DUPLICATE_TRANSFER409Idempotency key already used
APPROVAL_REQUIRED202Transfer requires manual approval

FluxiQ Core - PIX Payment Gateway