Skip to main content
Triqai enriches transactions with an entities array containing real-world entities relevant to understanding the transaction. Each entity has a type, role, confidence (with reason tags), and type-specific data. Only identified entities are included in the array if no location was found, there is simply no location entity present.

Entity Types

Merchants

The business or company behind the transaction

Locations

The physical place where the transaction occurred

Intermediaries

Payment processors, delivery platforms, wallets, and P2P services

Persons

Recipients in peer-to-peer transfers

Entity Structure

Every entity in the entities array follows the same shape:
{
  "type": "merchant",
  "role": "organization",
  "confidence": {
    "value": 98,
    "reasons": ["name_closely_matched", "results_consensus"]
  },
  "data": {
    /* type-specific fields */
  }
}
FieldTypeDescription
typestringEntity type: merchant, location, intermediary, or person
rolestringContextual role (depends on type — see below)
confidenceobject{ value: 0-100, reasons: string[] } — confidence score with explanatory tags
dataobjectType-specific data fields

Entity Roles

Each entity type has specific roles that describe its function in the transaction context:
TypePossible RolesDescription
merchantorganization, financial_institution, institutionThe kind of business
locationstore_location, headquarters, officeWhat the location represents
intermediaryprocessor, platform, wallet, p2pThe intermediary’s function
personrecipientThe person’s role in the transfer

Merchants

Merchants are the primary entities in most transactions. When identified, you get:
{
  "type": "merchant",
  "role": "organization",
  "confidence": {
    "value": 98,
    "reasons": ["name_closely_matched", "results_consensus"]
  },
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Starbucks",
    "alias": ["Starbucks Coffee", "SBUX"],
    "keywords": ["coffee", "cafe", "drinks"],
    "icon": "https://logos.triqai.com/images/starbuckscom",
    "description": "Multinational chain of coffeehouses",
    "color": "#00704A",
    "website": "https://www.starbucks.com",
    "domain": "starbucks.com"
  }
}

Merchant Fields

FieldTypeDescription
idstringUnique identifier for the merchant
namestringCanonical merchant name
aliasstring[]Alternative names and abbreviations
keywordsstring[]Related search terms
iconURL | nullLogo image URL
descriptionstringBrief description of the business
colorstring | nullBrand color (hex format)
websiteURL | nullOfficial website
domainstring | nullPrimary domain name

Merchant Coverage

Triqai maintains a database of over 150 million companies worldwide, with:
  • 143,000+ logos for visual branding
  • Normalized names for consistent identification
  • Multiple aliases to match various transaction formats

Locations

Location enrichment provides geographic context for transactions:
{
  "type": "location",
  "role": "store_location",
  "confidence": {
    "value": 92,
    "reasons": ["city_match", "address_closely_matched"]
  },
  "data": {
    "id": "660e8400-e29b-41d4-a716-446655440001",
    "name": "Starbucks - Times Square",
    "formatted": "1530 Broadway, New York, NY 10036, USA",
    "phoneNumber": "+1-212-555-0123",
    "website": "https://www.starbucks.com/store-locator/store/8289",
    "priceRange": "$$",
    "rating": { "average": 4.2, "count": 1250, "source": "google" },
    "structured": {
      "street": "1530 Broadway",
      "city": "New York",
      "state": "NY",
      "postalCode": "10036",
      "country": "US",
      "countryName": "United States",
      "coordinates": {
        "latitude": 40.758,
        "longitude": -73.9855
      },
      "timezone": "America/New_York"
    }
  }
}

Location Fields

FieldTypeDescription
idstringUnique identifier for the location
namestringLocation name (may include store number)
formattedstringFull formatted address
phoneNumberstring | nullContact phone number
websiteURL | nullLocation-specific website
priceRangestring | nullPrice range indicator (e.g. ”$”, ”$$”, ”$$$“)
ratingobject | nullRating with average, count, and source
structured.streetstringStreet address
structured.citystringCity name
structured.statestringState/province/region
structured.postalCodestringPostal or ZIP code
structured.countrystringISO country code
structured.countryNamestringFull country name
structured.coordinatesobjectLatitude and longitude
structured.timezonestringIANA timezone identifier

Location Coverage

  • 10M+ places globally
  • 150+ countries supported
  • Store-level precision when available

Intermediaries

Intermediaries are a unified entity type that replaces the previous separate “payment processor” and “P2P platform” concepts. They represent any service that sits between the customer and the final recipient of funds.

Intermediary Roles

RoleDescriptionExamples
processorPayment processor/gatewayStripe, Adyen, Square, Worldpay
platformDelivery/marketplace platformDoorDash, Uber Eats, Instacart
walletDigital wallet/payment appApple Pay, Google Pay, Alipay
p2pPeer-to-peer transfer serviceVenmo, Zelle, Cash App, PayPal
{
  "type": "intermediary",
  "role": "processor",
  "confidence": { "value": 99, "reasons": ["known_processor_match"] },
  "data": {
    "id": "770e8400-e29b-41d4-a716-446655440002",
    "name": "Stripe",
    "icon": "https://logos.triqai.com/images/stripecom",
    "description": "Online payment processing platform",
    "color": "#635BFF",
    "website": "https://stripe.com",
    "domain": "stripe.com"
  }
}

Intermediary Fields

FieldTypeDescription
idstringUnique identifier
namestringIntermediary name
iconURL | nullLogo image URL
descriptionstring | nullBrief description
colorstring | nullBrand color (hex)
websiteURL | nullOfficial website
domainstring | nullDomain without protocol

Why It Matters

Intermediary detection is valuable for:
  • Identifying the actual merchant behind processor-branded transactions
  • Understanding payment methods used by customers
  • Fraud detection by recognizing unusual processor patterns
  • Analytics on payment method preferences
  • Delivery platform tracking for food delivery and marketplace transactions

Persons

Person entities appear in P2P transfer transactions to identify the recipient:
{
  "type": "person",
  "role": "recipient",
  "confidence": { "value": 98, "reasons": [] },
  "data": {
    "displayName": "John Doe"
  }
}

Person Fields

FieldTypeDescription
displayNamestringRecipient’s name as shown in transaction
Privacy: Person display names are stored per-organization and never shared globally. This ensures personal information remains private and GDPR-compliant.

P2P Transfer Example

A P2P transfer typically produces both an intermediary entity (the platform) and a person entity (the recipient):
{
  "entities": [
    {
      "type": "intermediary",
      "role": "p2p",
      "confidence": { "value": 98, "reasons": ["known_processor_match"] },
      "data": {
        "id": "p2p_venmo",
        "name": "Venmo",
        "icon": "https://logos.triqai.com/images/venmocom",
        "description": null,
        "color": "#3D95CE",
        "website": "https://venmo.com",
        "domain": "venmo.com"
      }
    },
    {
      "type": "person",
      "role": "recipient",
      "confidence": { "value": 98, "reasons": [] },
      "data": {
        "displayName": "John Doe"
      }
    }
  ]
}

Fetching Entity Details

You can fetch full entity details by ID:
import Triqai from "triqai";

const triqai = new Triqai(process.env.TRIQAI_API_KEY!);

const merchant = await triqai.merchants.get("merchant-uuid");
console.log(merchant.name, merchant.website, merchant.icon);

const location = await triqai.locations.get("location-uuid");
console.log(location.formatted, location.structured.city);

const intermediary = await triqai.intermediaries.get("intermediary-uuid");
console.log(intermediary.name);

Entity Sharing

Entities are shared resources:
  • Merchants, locations, and intermediaries are shared across all organizations
  • This ensures consistent identification and reduces duplication
  • Entity IDs are stable and can be used for deduplication
Exception: Person display names are scoped to your organization for privacy.

Next Steps

Confidence Scores

Learn how to interpret confidence values and reason tags

Entity APIs

Explore the entity lookup endpoints