The short answer is that no, merchants cannot require a minimum purchase before accepting your credit card as payment. In fact, all major card issuers explicitly forbid this practice, as follows.
From Visa’s merchant contract:
Dollar Minimums and Maximums – Always honor valid Visa cards, in your acceptance category, regardless of the dollar amount of the purchase. Imposing minimum or maximum purchase amounts is a violation.
From MasterCard’s merchant contract:
The merchant must honor all valid MasterCard cards without discrimination when properly presented for payment. The merchant must maintain a policy that does not discriminate amount customers seeking to make purchase with a MasterCard card. A merchant that does not deal with the public at large (for example, a private club) is considered to comply with this rule if it honors MasterCard cards of cardholders that have purchasing privileges with the merchant.
From Discover’s merchant contract:
You may not require that any Cardmember make a minimum dollar purchase in order to use a Card and, other than when we have not authorized a Cardmember’s transaction, you may not limit the maximum amount that a Cardmember may spend when using a Card.
So there you have it. The next time a cashier tells you that your purchase has to total a certain amount before they can accept your credit card, you’ll know that they’re blowing smoke. Of course, there’s little you can do if they hold their ground — and most will, as they’ve likely been instructed by their boss that they’re not allowed to accept credit cards for purchases under a certain amount. In such cases, your only real recourse is to contact the card issuer and report the problem.