Transaction Object

A Transaction represents a single financial transaction extracted from a bank statement or created manually.

Object Structure

{
  "id": "abc123xyz789",
  "date": "2025-01-05",
  "particulars": "ATM WITHDRAWAL HDFC BANK",
  "inflow": 0,
  "outflow": 5000000,
  "balance": 45000000,
  "entity": "HDFC Bank",
  "category": "cash_withdrawal",
  "type": "expense",
  "po": null,
  "comments": "Monthly cash withdrawal",
  "account_id": "acc123xyz",
  "account_name": "Main Savings",
  "account_currency": "INR",
  "statement": "stmt456abc"
}

Fields

Core Fields

FieldTypeRequiredDescription
idstringAuto12-character unique identifier
datestringYesTransaction date (YYYY-MM-DD format)
particularsstringNoTransaction description/narration from bank
inflownumber*Credit amount (money received)
outflownumber*Debit amount (money spent)
balancenumberNoAccount balance after transaction

*Either inflow or outflow must be provided when creating a transaction.

Categorization Fields

FieldTypeDescription
entitystringCounterparty name (e.g., vendor, customer)
categorystringTransaction category (e.g., salary, utilities)
typestringTransaction type (see types below)
postringPurchase order or reference number
commentsstringUser notes or additional context

Relationship Fields

FieldTypeDescription
account_idstringID of the account this transaction belongs to
account_namestringName of the account (read-only, populated from account)
account_currencystringCurrency code of the account, e.g. INR, USD (read-only, derived from the account; defaults to INR). Transactions carry no currency of their own.
statementstringID of the statement this transaction was extracted from

Transaction Types

TypeDescription
incomeIncome transactions (salary, revenue, etc.)
expenseExpense transactions (purchases, bills, etc.)
transferTransfer between accounts
assetAsset acquisition
liabilityLiability payments
unknownType not determined (default)

Money Values

All monetary values are returned and accepted as integers in milli-units (1/1000 of the currency unit). This avoids floating-point precision issues common in financial applications.

Conversion:

  • Divide by 1000 to get the currency value for display
  • Multiply by 1000 when sending values to the API

Examples:

API ValueCurrency Value
15001.50 (1 rupee 50 paise)
10005001000.50 (1000 rupees 50 paise)
50000005000.00 (5000 rupees)
00.00

Why integers?

  • No floating-point precision errors (e.g., 0.1 + 0.2 !== 0.3)
  • Safe arithmetic operations
  • Consistent storage and retrieval

Fingerprinting

Each transaction has a unique fingerprint used for deduplication when importing statements. The fingerprint is computed as:

D-(date)-IF-(inflow)-OF-(outflow)-P-(particulars_without_spaces)

This prevents duplicate transactions when the same statement is uploaded multiple times.


Field Selection

When retrieving transactions, use the fields parameter to request only specific fields:

GET /api/v1/transactions?fields=id,date,inflow,outflow,entity

Available fields: id, date, particulars, inflow, outflow, balance, entity, category, type, po, comments, account_id, account_name, account_currency, statement


Example: Complete Transaction

{
  "id": "txn789xyz123",
  "date": "2025-01-15",
  "particulars": "NEFT-CR-ACME CORP-INVOICE 1234",
  "inflow": 150000000,
  "outflow": 0,
  "balance": 250000000,
  "entity": "Acme Corporation",
  "category": "income",
  "type": "income",
  "po": "INV-1234",
  "comments": "January invoice payment",
  "account_id": "acc123xyz",
  "account_name": "Business Account",
  "account_currency": "INR",
  "statement": "stmt456abc"
}

Note: inflow: 150000000 = 150,000.00 rupees, balance: 250000000 = 250,000.00 rupees