What it means
When a business first starts accepting cards, its payment provider assigns it a code based on its main line of trade. For example, 5812 is used for eating places and restaurants, 5411 for grocery stores and supermarkets, and 7011 for hotels and lodging.
The code then travels with every transaction that business processes. Codes matter because many decisions are made automatically from them.
A credit card that pays higher rewards on dining relies on the code to decide which purchases qualify. Banks also use codes to apply different fees, block risky categories, or flag payments that look out of place for a cardholder.
For businesses, the code feeds into expense management. A company card programme can allow travel and software spending but block gambling or cash-like categories, and finance teams use codes to sort thousands of transactions into expense types automatically.
Receipts and accounting rules still decide the correct accounting treatment, but the code gives a good first pass. Codes are not always accurate, and that is where most surprises come from.
A restaurant inside a hotel may be coded as lodging, a supermarket might sell petrol, and a business with several activities has only one code. This is why a cardholder sometimes misses a rewards category they thought they had earned.
One more nuance is that codes differ from industry classification systems used by governments. A business can sit in one government industry class and a different card category, because the card networks designed their list for payments rather than for statistics.
In practice
Real-world examples.
Example
A software start-up issues virtual cards to its marketing team and restricts them to advertising and software categories. When someone tries to pay for a cash advance, the payment is declined automatically because the code falls outside the allowed list. The finance lead sees the failed attempt in a report the same day.
Example
A hotel chain runs a restaurant on its premises and finds that some guests complain their dining rewards were not paid. The restaurant transactions were coded as lodging because they were processed through the hotel's main account. Moving the restaurant to its own merchant account fixes the code and the complaints stop.
Example
A payments risk analyst at a bank notices a sudden spike in transactions under a code for jewellery stores on cards that normally spend on groceries. The pattern triggers a fraud review, and several cards are blocked before further losses occur.
Formula
Calculation
Rewards earned = Spend in each category x Rate for that category, added together
Suppose a company card pays 3% on restaurants (code 5812) and 1% on everything else. In a month the team spends $2,000 at restaurants and $1,500 at supermarkets (code 5411). Restaurant rewards are 2,000 x 0.03 = $60. Supermarket rewards are 1,500 x 0.01 = $15. Total rewards are 60 + 15 = $75. If the $2,000 restaurant spend had instead been coded as hotel lodging (code 7011), rewards on it would have been 2,000 x 0.01 = $20, and the month's total would have fallen to $35.Case study
Seen in the real world.
Brightside Travel Cards is an illustrative, fictional card issuer that launches a premium product promising extra rewards on airlines and hotels. Within weeks, customers complain that purchases made through online travel agents are not earning the bonus. The agents are coded as travel services, not airlines, so the rewards engine ignores them.
The product team reviews 10,000 sample transactions and finds that 18% of travel spend sits in codes outside the bonus list. It faces a choice: widen the qualifying list at a cost to margin, or keep the list tight and explain the rules more clearly.
In this illustrative case, Brightside widens the list to include travel agencies but lowers the bonus rate slightly to protect profit. The lesson is that reward promises are only as precise as the codes behind them.
Watch out
Common mistakes.
- Assuming the code reflects what you actually bought, when it reflects only how the merchant is classified.
- Believing a business can switch codes freely, when the assignment is controlled by its payment provider and the card networks.
- Using the code as the final answer for accounting classification without checking the receipt and the nature of the spend.
Questions
People also ask.
Who assigns a merchant category code?
The merchant's payment provider (acquirer) assigns it when the account is opened, following the card networks' published lists.
Can the same business have two codes?
Normally each merchant account has one code, but a business with distinct operations can open separate merchant accounts so each carries its own code.
Why does my card decline a purchase in a category I never use?
Issuers and employers can block specific codes, and some categories are blocked by default to reduce fraud.
From the founder's library

Take it further with the book.
Build your financial confidence beyond this definition. Shihan's full-length guide, Accounting Fundamentals, takes the same plain-English approach and turns it into a complete, practical playbook for non-finance managers, business owners and students - with chapter-end quiz answers and presentation slides included.
25% off with code MMHQ25, applied at checkout. Priced in USD - checkout may show the equivalent in your local currency.
View the book and save 25%Related
