Hackathon · Payments and finance

Merchant Match

Who charged me? An API that tells a bank customer which store is behind a strange name on the card statement, before they call the bank or dispute a purchase that was their own.

Result
25 of 30 real purchases matched to the right store, in about 8 seconds and about $0.05 each.
Decision
The AI only suggests. Public tax records confirm, and every answer says how sure it is.

Product, design and buildWith Aline CostaNov 2026Live prototype

A card statement line reading MP*CASADOPAODEQUEIJO, next to a phone showing the demo: the name, the city São Paulo, and the answer Casa do Pão de Queijo with high certainty
OverviewThe public demo with a real lookup. Interface translated from Portuguese.

The problem

A name nobody recognizes

On a card statement, the name is often not the store’s name. A small shop that sells through a card reader shows up as the reader’s prefix and a squeezed code, like MP*CASADOPAODEQUEIJO. The statement has no address.

Many times the purchase was the customer’s own. They just don’t recognize the name, so they call the bank or open a dispute. The bank pays for a call that didn’t need to happen, and the customer loses some peace of mind.

The real problem. Help the customer recognize a purchase on their own, inside the bank’s app, without claiming more certainty than the evidence gives.

My role. A team of two, with Aline Costa, in about a week. I led product and design and built the prototype, with Claude as a coding pair: the flows, the screens, the API and the tests. Aline shaped the scenarios, the user stories and the research plan, and we built the pitch together.

Decision 1

The AI suggests, the official records check

The AI is good at messy names. In the tests it fixed a typo in a store name and understood a card reader prefix the code didn’t know. It can also be confidently wrong, so it never has the last word.

The flow is fixed. The code cleans the name, the AI searches the web for the store and its CNPJ (the company tax ID), public federal registry data confirms the tax ID and the city, and fixed rules set the certainty.

Not an agent. An agent decides its own next step. A fixed flow is more predictable, cheaper and easier to test, and the steps can be explained to a bank’s risk team.

Five cards in a row: the input from the bank, a name and a city; step 1 code cleans the name; step 2 AI finds the store; step 3 official records check the tax ID; step 4 code sets the certainty. Below, a stronger model tries again when the tax ID is not confirmed.
FlowFour steps. The AI is one of them, and it never sets the certainty.

Decision 2

Say how sure, and why

Every answer carries a certainty, high, medium or low, with the registry record and the sources. When a name was cut in half on the statement, the answer came back with low certainty instead of a guess. When a chain has many franchises, each with its own tax ID, and the bank sent no address, it says so and leaves the tax ID empty.

When the bank sends where the card reader was, the code measures the distance to the address in the registry. Up to 500 m, the certainty goes up. Over 5 km, it goes down.

A suggestion, not a verdict. The answer never decides if a purchase is legitimate or if the customer should dispute it. It gives them what they need to remember.

A result card: we think it is Casa do Pão de Queijo, high certainty, an explanation, the registry record with legal name, tax ID, address and activity, a suggested category and the sources. Next to it, notes on certainty, evidence and sources.
AnswerA real answer from the demo, translated from Portuguese.

Decision 3

A cheap model first, a strong one when needed

The first version asked Claude for every lookup: about 11 seconds and $0.11 each. Too slow for a bank app, and too expensive at scale.

Now a fast, cheap model tries first. Claude only runs when the registry doesn’t confirm the tax ID or the certainty is low. The cascade kept the same accuracy, 25 of 30, in about 8 seconds and about $0.05. The cheap model solved 16 of the 30 cases on its own.

Decision 4

Sell to banks, not to people

We weighed three ways to ship it. A public site proves the idea, but nobody pays for it. Our own spending app, reading every bank through Open Finance, starts with no users and needs investment.

An API inside the bank’s app reaches the customer at the exact moment of doubt. They tap the purchase, the bank sends the name and where the card reader was, and the answer appears in the bank’s own design, without our brand. The bank pays per lookup. The own app stays as a vision.

Three cards: a public demo where the customer types the name; the chosen product, an API inside the bank’s app; and a later spending app with Open Finance.
ScenariosOne API for all three. The bank integration is the product.

Decision 5

Send the least, show the least

The API never receives the customer’s name, tax number, card number, amount or history. Only the name on the statement and the city, or the address, of the purchase.

Many small shops belong to a sole trader registered under their own name. For those, the answer shows only the owner’s first two names, the neighbourhood and the city. No surname, phone or street.

The cheap model’s provider stores data abroad. That is an international data transfer the bank has to approve under data protection law, so the cascade can also run on Claude alone, or on another approved provider.

Build

Small stack, three backup sources

React and Vite for the screens, two serverless functions on Vercel for the API: one to identify the store, one to build the bank’s official dispute steps and a ready-to-send text. Both models run through OpenRouter with web search. No Google APIs: the map and the distance use OpenStreetMap.

An incident. In the first round of tests, the main registry source went down and returned errors. It confirmed only 1 of 10 tax IDs, so almost every answer fell to medium certainty. The registry check now tries three free sources in turn, up to 4 seconds each.

Outcome

25 of 30 real purchases, with no confident mistakes

We tested 30 real names from card statements, all purchases in one city. For the first 10, the right answer came from instant payment receipts, which show the store’s legal name and tax ID. For the other 20, the card owner checked each store.

25 of 30 right (83%). About 8 seconds and about $0.05 per lookup, estimated. No wrong store came back with high certainty. The 5 misses were stores it couldn’t find, like a sole trader selling through a card reader, and they came back with low certainty.

Cost. About $70 a month for 1,000 lookups, including $20 of hosting.

Limits. A small sample, with no marketplace, delivery, subscription or international purchases. The AI can answer differently on different runs: one bar got a different tax ID each time. The free registry sources allow a few lookups a minute, so production needs a paid source. A pilot with a bank would measure the real numbers.

Four results: 25 of 30 right stores, about 8 seconds, about $0.05 per lookup, and 16 of 30 solved by the cheap model alone. Below, a table comparing Claude only, the fast model only and the cascade.
ResultsTests from Nov 26 to 30, 2026. Costs are estimates.

What I learned

“Not sure” is a feature

In a bank, a confident wrong answer is worse than no answer. The most useful thing the system does is say how sure it is, and show why. Low certainty, the sources and the registry record are what make the answer worth trusting.

It was my first hackathon. Testing on the live site every day, with real statement names, changed the product more than any idea did: the outage gave us three registry sources, and the 11-second answers gave us the cascade.

Try it: the live demo (in Portuguese) and the code on GitHub.