I've seen a few responses scattered on the internet that attempt to answer this but they seem to disagree on the matter.
When dealing with cash-back credit cards, they offer different percentages for different categories like gas, groceries, dining, etc.
How do they know which category your purchases fall in? Do they guess based on the merchant? Does the merchant send them totals of each category in each transaction? I can't imagine that the credit card company sees individual items purchased.
(Secondary question but not necessary)In general do all credit cards get this information or is this something that only cash-back/rewards cards get?