> ## Documentation Index
> Fetch the complete documentation index at: https://docs.brandfetch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Transaction enrichment

> Turn raw payment descriptors into clean merchant identity, category, and logo using the Transaction API

Bank and card statements arrive as unstructured line-item text, `SQ *BLUE BOTTLE COFFEE OAKLAND`, `AMZN MKTP US*2X4B1QT0`, `UBER *EATS 8005928996 CA`. Users don't recognize the charge, support tickets follow, and spend categorization breaks.

The [Transaction API](https://docs.brandfetch.com/transaction-api/overview.md) resolves that text to the real merchant in a single call, returning the company's name, domain, industry, and logo, so banking, spend-tracking, and accounting apps can categorize spend and show a feed people actually recognize.

## Show merchants, not codes

Raw transaction descriptors like `SQ *BLUE BOTTLE COFFEE OAKLAND` are unreadable. The [Transaction API](https://docs.brandfetch.com/transaction-api/overview.md) resolves that line-item text to a real merchant, name, domain, industry, and logo, in a single call, so banking and spend-tracking apps can show a clean, recognizable feed.

### Transaction feed

A statement-style feed where each charge shows the recognized merchant and logo, with the original bank descriptor kept underneath for reference.

> [tab] Preview
>
> Preview

> [tab] Code
>
> ```tsx TransactionFeed.tsx theme={null}
> const CLIENT_ID = "YOUR_CLIENT_ID"; // free client ID from developers.brandfetch.com/register
>
> // merchant + domain come from the Transaction API; the raw descriptor is the input.
> const TXNS = [
>   { domain: "starbucks.com", merchant: "Starbucks", raw: "STARBUCKS 1523 OMAHA NE", amount: "6.45", date: "Jul 3" },
>   { domain: "amazon.com", merchant: "Amazon", raw: "AMZN MKTP US*2X4B1QT0", amount: "42.99", date: "Jul 2" },
>   { domain: "uber.com", merchant: "Uber Eats", raw: "UBER *EATS 8005928996 CA", amount: "23.10", date: "Jul 1" },
>   { domain: "netflix.com", merchant: "Netflix", raw: "NETFLIX.COM 866-579-7172", amount: "15.49", date: "Jun 30" },
> ];
>
> export function TransactionFeed() {
>   return (
>     <div className="flex w-full max-w-[420px] flex-col gap-0.5">
>       {TXNS.map((t) => (
>         <div
>           key={t.raw}
>           className="flex items-center gap-3 rounded-[10px] px-3 py-2.5 transition-colors duration-150 hover:bg-[#6363631f]"
>         >
>           <img
>             src={`https://cdn.brandfetch.io/domain/${t.domain}/w/80/h/80/fallback/lettermark?c=${CLIENT_ID}`}
>             alt={`${t.merchant} logo`}
>             className="h-10 w-10 shrink-0 rounded-lg"
>           />
>           <div className="min-w-0 flex-1">
>             <div className="text-[15px] font-semibold">{t.merchant}</div>
>             <div className="truncate font-mono text-[12px] text-[#9ca3af]">{t.raw}</div>
>           </div>
>           <div className="shrink-0 text-right">
>             <div className="text-[15px] font-semibold">-${t.amount}</div>
>             <div className="text-[12px] text-[#6b7280]">{t.date}</div>
>           </div>
>         </div>
>       ))}
>     </div>
>   );
> }
> ```

Want a bank feed with recognizable merchant logos? This prompt gives your AI coding tool everything it needs to build it in your framework.

Build a transaction feed for a banking or spend-tracking app. Each row shows the merchant's logo, the recognized merchant name, the original raw bank descriptor underneath in a smaller monospaced muted font, and the amount and date on the right.

Resolve each raw descriptor to a merchant with Brandfetch's Transaction API (get an API key at `https://developers.brandfetch.com/register`):

```
POST https://api.brandfetch.io/v2/brands/transaction
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{ "transactionLabel": "STARBUCKS 1523 OMAHA NE", "countryCode": "US" }
```

The response includes the merchant's `name`, `domain`, and `company.industries` (sorted by descending `score`). Render its logo from the domain via the Logo API: `https://cdn.brandfetch.io/domain/{domain}/w/40/h/40/fallback/lettermark?c=YOUR_CLIENT_ID`

Call the Transaction API from your server so the API key stays secret, then hotlink the returned merchant logo URL directly on the client rather than downloading or re-hosting it.

### Descriptor enrichment

Show the raw-to-recognized transformation directly, useful in a transaction detail view or when confirming a match.

> [tab] Preview
>
> Preview
>
> Raw descriptor
>
> SQ \*BLUE BOTTLE COFFEE OAKLAND
>
> ↓
>
> Recognized merchant
>
> ![Blue Bottle Coffee logo](https://cdn.brandfetch.io/domain/bluebottlecoffee.com/w/72/h/72/fallback/lettermark?c=1bfwsmEH20zzEfSNTed)
>
> Blue Bottle Coffee
>
> bluebottlecoffee.com · Food & Beverage

> [tab] Code
>
> ```tsx TransactionEnrichment.tsx theme={null}
> const CLIENT_ID = "YOUR_CLIENT_ID"; // free client ID from developers.brandfetch.com/register
>
> export function TransactionEnrichment() {
>   return (
>     <div className="w-full max-w-[340px] rounded-xl border border-[#63636333] bg-white p-5 dark:bg-[#1c1d1f]">
>       <div className="text-[11px] font-semibold uppercase tracking-[0.05em] text-[#9ca3af]">Raw descriptor</div>
>       <div className="mt-1.5 rounded-lg bg-[#6363630d] px-3 py-2 font-mono text-[13px]">SQ *BLUE BOTTLE COFFEE OAKLAND</div>
>       <div className="my-3 text-center text-lg text-[#9ca3af]">↓</div>
>       <div className="text-[11px] font-semibold uppercase tracking-[0.05em] text-[#9ca3af]">Recognized merchant</div>
>       <div className="mt-1.5 flex items-center gap-3 rounded-lg border border-[#63636326] px-3 py-2.5">
>         <img
>           src={`https://cdn.brandfetch.io/domain/bluebottlecoffee.com/w/72/h/72/fallback/lettermark?c=${CLIENT_ID}`}
>           alt="Blue Bottle Coffee logo"
>           className="h-9 w-9 shrink-0 rounded-lg"
>         />
>         <div>
>           <div className="text-[15px] font-semibold">Blue Bottle Coffee</div>
>           <div className="text-[13px] text-[#6b7280]">bluebottlecoffee.com · Food &amp; Beverage</div>
>         </div>
>       </div>
>     </div>
>   );
> }
> ```

Want to show raw descriptors resolving to real merchants? This prompt gives your AI coding tool everything it needs to build it in your framework.

Build a transaction detail card that shows the enrichment visually: at the top, the raw bank descriptor in a monospaced pill; below it a downward arrow; then the recognized merchant in a bordered row with its logo, name, domain, and industry.

Resolve the descriptor with Brandfetch's Transaction API (get an API key at `https://developers.brandfetch.com/register`):

```
POST https://api.brandfetch.io/v2/brands/transaction
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{ "transactionLabel": "SQ *BLUE BOTTLE COFFEE OAKLAND", "countryCode": "US" }
```

Use the returned `domain` to render the merchant logo from the Logo API: `https://cdn.brandfetch.io/domain/{domain}/w/36/h/36/fallback/lettermark?c=YOUR_CLIENT_ID`

Call the Transaction API from your server so the API key stays secret, then hotlink the returned merchant logo URL directly on the client rather than downloading or re-hosting it.

## Implementation

**1. Send the descriptor**

POST the raw line-item text as `transactionLabel`, with a `countryCode` to disambiguate merchants that share a name across regions. Keep the call on your server so the API key stays secret.

```bash theme={null}
curl --request POST "https://api.brandfetch.io/v2/brands/transaction" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{ "transactionLabel": "SQ *BLUE BOTTLE COFFEE OAKLAND", "countryCode": "US" }'
```

**2. Use the response**

The identified merchant comes back as a full brand record: use `name` as the display label, the first entry in `company.industries` as the spend category, and render the logo from `domain` via the [Logo API](https://docs.brandfetch.com/logo-api/overview.md): `https://cdn.brandfetch.io/domain/{domain}/w/40/h/40/fallback/lettermark?c=YOUR_CLIENT_ID`.

**3. Cache and fall back**

The same descriptor recurs across statements; cache resolutions by normalized descriptor text. When a descriptor can't be resolved, keep showing the raw text rather than guessing.

## Pricing

The Transaction API is an [enterprise product](https://brandfetch.com/developers/contact/sales). Requests count as brand fetches, the shared usage unit across the Brand API, Brand Context API, and Transaction API, so a single quota pool covers all three.

## Measuring impact

Enrichment works when people recognize their charges, so track the merchant match rate on incoming descriptors and the drop in "what is this charge?" support tickets and disputes.

[Envestnet | Yodlee used this pattern to improve merchant identification](https://brandfetch.com/developers/customers/yodlee) across its network.

## Going further

> [card] [Transaction API reference](https://docs.brandfetch.com/reference/transaction-api.md)
>
> Request and response shape, including countryCode.

> [card] [Brand API](https://docs.brandfetch.com/brand-api/overview.md)
>
> The response is a full brand record: colors, socials, and company details.

> [card] [Get started](https://developers.brandfetch.com/register)
>
> Create a free account and start building.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.