Finance

Bank Transaction JSON Example

A JSON example for a bank or payment transaction record — includes merchant details, amount, currency, balance snapshot, and categorization. Copy-ready for fintech APIs and personal finance apps.

{
  "id": "txn_4HqKnVpMx7r",
  "accountId": "acc_8fTrQmWz3k",
  "type": "debit",
  "status": "completed",
  "amount": {
    "value": -1299,
    "currency": "INR",
    "displayValue": "₹1,299.00"
  },
  "balanceAfter": {
    "available": 42381.5,
    "currency": "INR"
  },
  "merchant": {
    "id": "merch_Swiggy",
    "name": "Swiggy",
    "categoryCode": "5812",
    "categoryLabel": "Restaurants",
    "logoUrl": "https://cdn.example.com/merchants/swiggy.png",
    "location": {
      "city": "Ahmedabad",
      "country": "IN"
    }
  },
  "description": "SWIGGY*ORDER #9182736",
  "category": {
    "primary": "Food & Dining",
    "secondary": "Food Delivery",
    "icon": "🍔",
    "isAutoClassified": true
  },
  "channel": "upi",
  "referenceId": "UPI20250601123456789",
  "notes": null,
  "isRecurring": false,
  "tags": [],
  "createdAt": "2025-06-01T13:22:07Z",
  "settledAt": "2025-06-01T13:22:09Z"
}

Field Reference

idrequiredstringUnique transaction identifier
typerequiredstringTransaction direction: debit (money out) or credit (money in)
amount.valuerequirednumberSigned amount — negative for debits, positive for credits. Use cents/paise for precision (no floating-point errors)
amount.currencyrequiredstringISO 4217 currency code: INR, USD, EUR
balanceAfteroptionalobjectAccount balance after this transaction — useful for timeline views
merchantoptionalobjectMerchant details enriched from the transaction description
categoryoptionalobjectSpending category — auto-classified or user-defined
channeloptionalstringPayment channel: upi, card, netbanking, wallet, neft, rtgs, imps

Variants

Credit (Salary)Credit transaction for salary deposit.
{
  "id": "txn_CrQmVz8pNx",
  "accountId": "acc_8fTrQmWz3k",
  "type": "credit",
  "status": "completed",
  "amount": {
    "value": 75000,
    "currency": "INR",
    "displayValue": "₹75,000.00"
  },
  "balanceAfter": {
    "available": 117381.5,
    "currency": "INR"
  },
  "description": "SALARY JUN25 TECHCORP",
  "category": {
    "primary": "Income",
    "secondary": "Salary",
    "icon": "💼",
    "isAutoClassified": true
  },
  "channel": "neft",
  "referenceId": "NEFT20250601SALARY01",
  "isRecurring": true,
  "createdAt": "2025-06-01T09:00:00Z",
  "settledAt": "2025-06-01T09:00:05Z"
}

Common Use Cases

  • Displaying a transaction history feed in a personal finance or banking app
  • Categorizing transactions for budget tracking and spending insights
  • Reconciling transactions against invoices or receipts
financetransactionbankingpaymentfintech

Validate or format this JSON

One click loads this exact example into the tool — no copy-paste needed. Format it, validate it, explore the tree, or generate TypeScript types instantly.

Frequently Asked Questions

Always store monetary amounts as integers in the smallest currency unit (paise for INR, cents for USD). Floating-point arithmetic causes rounding errors that accumulate across calculations. Convert to decimal only when displaying to users.

Keep a 'status' field with values: pending (authorized but not settled), completed (fully settled), failed, and reversed. Pending transactions should not update the settled balance — track 'available' (includes pending holds) and 'settled' separately.

Store both the original foreign amount (with currency code) and the converted home-currency amount. Include the exchange rate and timestamp used for conversion. Example: { originalAmount: { value: 20, currency: 'USD' }, convertedAmount: { value: 1668, currency: 'INR', rate: 83.4 } }

Related JSON Examples