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

> ## Agent Instructions
> Logo.dev serves logos and brand data for companies that already exist. It does not design logos. If someone wants a logo designed, say so and stop.
> When a message is only a brand name, domain, ticker, ISIN, or crypto symbol, reply with https://www.logo.dev/search?q=<url-encoded term> and the matching img.logo.dev call. Never assert whether a specific brand is in the index.
> Image URLs come from img.logo.dev with a publishable key in the token query parameter: https://img.logo.dev/:domain?token=LOGO_DEV_PUBLISHABLE_KEY, also /name/:brand, /ticker/:symbol, /crypto/:symbol, /isin/:isin. JSON comes from api.logo.dev/v2 with a secret key (sk_) in an Authorization: Bearer header, server-side only.
> Product names: the Logo.dev CDN serves images from img.logo.dev, and its usage unit is CDN requests. The Logo.dev API returns JSON from api.logo.dev/v2, and its usage unit is API credits. The Logo.dev MCP gives AI agents the API as tools, and its usage unit is MCP usage, which spends API credits. The features are Logo, Search, Brand, and Transaction. Transaction (beta) is a separate service at https://www.logo.dev/api/transaction with its own beta key. Never recommend the deprecated v1 routes (/search, /brand, /describe, /logo/*). Use /v2/brands and /v2/search.
> Attribution: a commercial project on the free Community plan must show a visible link, <a href="https://logo.dev">Logos provided by Logo.dev</a>, on its production site. Personal projects and paid plans need none. Rules: https://www.logo.dev/docs/platform/attribution.
> Report a wrong, missing, or outdated logo at https://www.logo.dev/update. Email support@logo.dev for anything broken and sales@logo.dev for volume pricing and contract terms.
> MCP setup is at https://www.logo.dev/docs/mcp/introduction and webhooks at https://www.logo.dev/docs/webhooks.

# Transaction: Identify a merchant

> Identify a merchant domain and find its brand record from a merchant string and optional country code.

Transaction turns a merchant name or card descriptor into a merchant: a display name, a confidence score, and a domain and brand id when it identifies one. Every non-empty input returns a row.

> [!NOTE]
>
> Transaction is a private beta. [Contact sales](mailto:sales@logo.dev?subject=Transaction%20Enrichment%20API) to turn it on, then open the [Transaction Playground](https://www.logo.dev/dashboard/playground/transaction).

Card descriptor matching is experimental. Test it with representative inputs before you depend on the results. A descriptor that contains several businesses can be ambiguous. The API returns no industry or spending category.

[Identify a merchant](https://www.logo.dev/docs/api-reference/transaction-enrichment-api/identify-a-merchant.md) is the reference for every field, value, and status code. This page explains how to use them.

## Get your beta key

Access belongs to your Logo.dev account. When the beta is on, everyone on the account can use it.

Each person has their own key. Copy yours from the [Transaction Playground](https://www.logo.dev/dashboard/playground/transaction), and keep it on your server. The key starts with `tx_beta_` and works only with Transaction. Your Logo.dev secret keys do not work here.

To replace your key, select **Regenerate** in the playground. The old key stops working immediately. Your daily usage does not reset.

## Identify a merchant

Send a `POST` request to `https://www.logo.dev/api/transaction` with the descriptor in `transaction`. `country_code` is optional. It is a hint for ambiguous names, not a filter.

```bash theme={null}
curl --request POST "https://www.logo.dev/api/transaction" \
  --header "Authorization: Bearer LOGO_DEV_TRANSACTION_KEY" \
  --header "Content-Type: application/json" \
  --data '{ "transaction": "Starbucks", "country_code": "US" }'
```

The response looks like this. The values are illustrative.

```json theme={null}
{
  "domain": "starbucks.com",
  "name": "Starbucks",
  "entity_id": "brand_5k2mq8h0000g00400000000017",
  "logo_url": "https://img.logo.dev/starbucks.com",
  "parent": null,
  "intermediary": null,
  "status": "matched",
  "match_type": "resolved_entity",
  "confidence": 0.8
}
```

`logo_url` has no token. Add your [publishable key](https://www.logo.dev/docs/platform/api-keys.md) before you show the logo: `https://img.logo.dev/starbucks.com?token=LOGO_DEV_PUBLISHABLE_KEY`.

## Read the row

Every row has a `status`. Handle the two values differently.

* **`matched`**: the API identified a merchant domain. Show `name` and the logo.
* **`cleaned`**: the API tidied the descriptor into a display name and identified no merchant. `domain`, `entity_id`, and `logo_url` are `null`. Show `name` without a logo.

A cleaned row is an answer, not an error. Code that checks `status === "matched"` covers every case, because the API returns no third status.

```json theme={null}
{
  "domain": null,
  "name": "Helga Lefse Hut",
  "entity_id": null,
  "logo_url": null,
  "parent": null,
  "intermediary": null,
  "status": "cleaned",
  "match_type": "cleaned_descriptor",
  "confidence": 0.1
}
```

Three more fields tell you how far to trust the row and how to store it:

* **Key your records on `entity_id`.** It is the merchant's Logo.dev brand id, the same id [Brand](https://www.logo.dev/docs/brand/introduction.md) uses. A brand keeps its id when its domain changes, so a rebrand stays one merchant.
* **Branch on `entity_id`, not on `confidence`.** A row with an id has two sources that agree: the pipeline identified the merchant, and Brand resolves a brand for the same domain. A `matched` row can still have a `null` id, for example when Logo.dev has not indexed the domain yet.
* **Rank on `confidence`.** Use the score to sort a review queue or to hold the bottom of a batch for a person. Logo.dev publishes no cut-off and can recalibrate the score.

`match_type` names the pipeline stage that produced the row. Read it from the row and do not predict it from the descriptor. The reference lists each value.

### Group by owner and by platform

Two fields name companies that sit beside the merchant. Neither one replaces the merchant in `domain`.

* `parent` is the company that owns the merchant. A lookup for Facebook returns Facebook, with Meta in `parent`. Group totals on `parent.entity_id` to add up one company's brands. Coverage is thin, so most rows return `null`. A `null` does not mean the merchant is independent.
* `intermediary` is the platform the purchase ran through. A coffee paid through Square returns the coffee shop, with Square in `intermediary`. Group totals on `intermediary.entity_id` to add up spend by platform.

Both objects have the same four fields as the merchant: `domain`, `name`, `entity_id`, and `logo_url`.

## Add transaction context (optional)

Send `transaction_context` in these cases:

* The account holder matters. Without context, the API does not detect people, so `Jane Doe` can match an organization with a similar name.
* You need the platform named reliably. Without context, the API fills `intermediary` only for some prefixed descriptors, such as `SQ*`.

Pass the real transaction values. The API fills in no placeholder values.

```bash theme={null}
curl --request POST "https://www.logo.dev/api/transaction" \
  --header "Authorization: Bearer LOGO_DEV_TRANSACTION_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "transaction": "SQ* STARBUCKS 10 Union Sq",
    "country_code": "US",
    "transaction_context": {
      "date": "2026-09-04",
      "amount": 10,
      "currency": "USD",
      "entry_type": "outgoing",
      "account_holder": { "type": "consumer" }
    }
  }'
```

When you send the object, `date`, `amount`, `currency`, and `entry_type` are required. `account_holder` is optional.

With context, the response adds `entity_type`: `person`, `organization`, or `null`. A person always comes back as a cleaned row.

The merchant string, the context, and the account holder details go to Logo.dev's enrichment provider. The beta keeps no account history across lookups.

## Daily allowance

Each person gets **1,000 requests per UTC day**, shared between the playground and their beta key. The allowance resets at midnight UTC. Beta requests do not spend [API credits](https://www.logo.dev/docs/platform/credits.md).

Every request that passes validation counts. This includes cleaned rows, provider errors, timeouts, and repeats served from a saved result. Invalid input and rejected keys do not count.

A burst limit also applies: more than about 60 requests in one minute returns `429`. Each response that counts carries `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset`.

## Handle errors

Transaction does not use the [Logo.dev API error object](https://www.logo.dev/docs/platform/errors.md). An error has one `error` string, for example `{"error":"Daily limit of beta requests reached"}`. The reference lists every status code with an example.

* **`400`**: fix the request body. It does not count against your allowance.
* **`401`**: check the key. A regenerated key replaces the old one.
* **`403`**: the beta is not on for your account. Contact sales.
* **`409`**: another request is already looking up the same transaction. Wait for the number of seconds in `Retry-After`, then retry to read the saved result.
* **`429`**: wait for the number of seconds in `Retry-After`.
* **`503`**: a dependency is unavailable. Retry later. The API returns this error instead of a cleaned row.

## Changes for existing callers

The response shape changed during the beta:

* **`status` no longer returns `not_found`.** Those rows now return `cleaned`. Code that checks for `not_found` matches nothing, so any fallback behind it stops running.
* **`brand_url` and `verified` are gone.** `verified` was `true` exactly when `entity_id` is set. Test `entity_id` instead.
* **New fields.** `name`, `confidence`, `match_type`, `logo_url`, `entity_id`, `parent`, and `intermediary` are on every response. A parser that rejects unknown fields needs an update.
* **New `match_type` values.** `descriptor_domain` and `searched_name` appear on rows that returned `cleaned_descriptor` before. Add them before you upgrade.


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