This guide walks through the complete process of enriching transactions, from preparing your data to processing the results.Documentation Index
Fetch the complete documentation index at: https://docs.triqai.com/llms.txt
Use this file to discover all available pages before exploring further.
Preparing Transaction Data
Required Fields
Every enrichment request needs three fields:| Field | Type | Description |
|---|---|---|
title | string | Raw transaction description (1-256 characters) |
country | string | ISO 3166-1 alpha-2 country code |
type | string | expense or income |
Transaction Title Best Practices
Use the full, original string
Use the full, original string
Don’t truncate or pre-process the transaction title. Include everything from
the bank statement:
✓ "POS 4392 STARBUCKS STORE #1234 NEW YORK NY 10001" ✗ "STARBUCKS" The full string contains valuable signals (store numbers,
locations, dates) that improve accuracy.Preserve original formatting
Preserve original formatting
Keep the original case, spacing, and punctuation:
✓ "AMAZON.COM*2K4X9T3H2 AMZN.COM/BILL WA" ✗ "Amazon"Include all available metadata
Include all available metadata
If your transaction source provides additional description fields,
concatenate them:
javascript const title = [ transaction.description, transaction.merchantName, transaction.locationInfo ].filter(Boolean).join(' '); Country Code
The country code should be:- ISO 3166-1 alpha-2 format (2 letters)
- The country where the transaction originated
- Uppercase or lowercase (both work)
Transaction Type
Settype based on the transaction direction:
| Type | When to Use |
|---|---|
expense | Money leaving the account (purchases, payments, fees) |
income | Money entering the account (salary, refunds, transfers in) |
Making the Request
Basic Request
Processing Multiple Transactions
For multiple transactions, make individual requests. Retries and rate limits are handled automatically:Processing the Response
Successful Response
A successful enrichment returns structured data with an entities array:Extracting Key Data
Handling Different Transaction Types
Regular Purchases
Most transactions identify a merchant directly:Intermediary Transactions
When a payment processor or platform is involved:processor) and attempts to identify the underlying merchant (Acme Inc).
P2P Transfers
Peer-to-peer payments return both an intermediary and a person entity:p2p) and the recipient as a person entity.
Income Transactions
Refunds, salary, and other income:Next Steps
Handling Responses
Learn to process different response types
Error Handling
Handle errors and edge cases
API Reference
See the full API documentation
Best Practices
Optimization tips and patterns