Skip to main content
Use case prompt
A raw statement line like AMZN MKTP US*XX1234 means nothing to the person who reads it. A merchant logo and a clean name make every row recognizable. Your app keeps the original descriptor and any correction the user makes.

Choose the lookup from the data you have

  • A merchant domain: many card processors and open-banking providers return one. Use it with the Logo.dev CDN.
  • Only the raw descriptor: resolve it on your server with Transaction. It is a private beta, and it returns 403 until the beta is on for your account.
  • A clean merchant name: use a name lookup.
This server module picks the lookup for one transaction:
merchant-lookup.ts

Handle every row state

Store the lookup result with the transaction. Render each row from this table:

Render the feed

A row with a domain shows the logo. A row without one shows a neutral placeholder:
Show the original descriptor in the transaction details. Keep the amount, currency, and date from your ledger. A lookup result never replaces them.

Test the feed

Test with four rows: a merchant with a known domain, a raw descriptor that Transaction matches, a descriptor that comes back cleaned, and a row the user corrected. Then make one lookup fail, and send one with an account that does not have the beta. The corrected row and the original descriptor must not change, and the 403 must not retry.

Transaction

Identify merchants from raw card descriptors.

Stock watchlists

Build the same row pattern for trading and portfolio apps.