Skip to main content
Transaction enrichment is the core capability of Triqai. It takes raw, unstructured transaction strings from bank statements and transforms them into clean, structured data that’s easy to understand and use.

The Problem

Bank transaction data is notoriously messy. A simple coffee purchase might appear as:
This string contains useful information: merchant name, store number, location, but it’s buried in noise and inconsistent formatting. Every bank formats transactions differently, making it impossible to reliably extract meaning without specialized processing.

The Solution

Triqai analyzes transaction strings using a combination of:
  • Pattern matching against known merchant signatures
  • Natural language processing to extract entities
  • Extensive merchant databases (150M+ companies)
  • Location intelligence (10M+ places globally)
  • Machine learning models for classification and confidence scoring
The result is structured data you can immediately use in your application.

Enrichment Pipeline

When you submit a transaction for enrichment, it goes through several stages:
1

Parsing

The raw transaction string is tokenized and analyzed for structure.
2

Entity Detection

Potential merchants, locations, intermediaries, and other entities are identified.
3

Matching

Detected entities are matched against our databases of known merchants, locations, and intermediaries.
4

Classification

The transaction is categorized and additional metadata (such as confidence signals) is determined.
5

Scoring

Confidence scores with explanatory reason tags are calculated for each entity and field.

What Gets Enriched

Each enrichment request returns two main sections: transaction metadata and an entities array.

Transaction Metadata

Classification and signals about the transaction itself:
  • Category — Hierarchical spending categories (primary, secondary, tertiary) with MCC/SIC/NAICS codes
  • Confidence — Overall enrichment confidence with reason tags

Entities Array

An array of identified real-world entities, each with a type, role, confidence, and data:
  • Merchant — The business behind the transaction (name, logo, website, domain)
  • Location — The physical place where it occurred (address, coordinates, timezone)
  • Intermediary — Payment processors, delivery platforms, wallets, or P2P services (Stripe, Venmo, DoorDash, etc.)
  • Person — The private person on the other side of a P2P transfer (display name). If you already know the payment went to a person, send options.p2p
Only entities that are actually identified appear in the array. If no location is found, no location entity is present. There are no "status": "no_match" entries.

Request Format

A basic enrichment request requires three fields:

Request Options

The optional options object tells Triqai what you already know about the transaction: A filter can’t be combined with pre-filled data for the same entity type, and p2p: true can’t be combined with pre-filled merchant data. Such requests return a 422 validation error.

Person-to-person transfers

A title alone often can’t tell a private person from a business. When your payment rail already tells you who was paid, for example an account transfer to a payee or a card payment, send options.p2p:
Intermediaries such as PayPal or Wise are still detected with either value. Requests with different p2p values are cached separately, so the same title with and without the hint can return different results. See Person-to-person hint for more examples.

Response Structure

The enrichment response uses an entities array pattern. Only found entities are included:
meta.transactionId identifies the stored transaction. Use it to fetch the transaction later or to report an issue with the result.
Only identified entities appear in the entities array. If no intermediary or location was found, they are simply absent not present with a null status.

Partial Results

Sometimes not all enrichment modules succeed. For example, a transaction might have a recognized merchant but no identifiable location. In these cases:
  • The response includes partial: true
  • Successful enrichments are returned normally in the entities array
  • The meta.errors array lists which enrichers failed
  • No credits are deducted for partial results

Best Practices

The country code helps Triqai narrow down merchant and location matching. An incorrect country code may lead to less accurate results.
Don’t pre-process or truncate transaction titles. The full string often contains valuable signals like store numbers and location hints.
The type field (expense vs income) helps classify refunds, transfers, and income sources correctly.
Check confidence scores and their reason tags before displaying data to users. Low-confidence results may need manual review. Reason tags explain why the score is what it is.

Next Steps

Categories

Learn about the category taxonomy

Entities

Understand merchant, location, intermediary, and person data

Confidence Scores

How to interpret confidence scores and reason tags

API Reference

See the full API documentation