One time, an old farmer drove his pickup truck to the front office and hauled in buckets after buckets of pennies to pay his monthly premium (as in "you took my last penny").
We had no choice but to accept the pennies because they are legal money.
In general, that's not the case. As the Federal Reserve states:
There is no federal statute mandating that a private business, a person, or an organization must accept currency or coins as payment for goods or services. Private businesses are free to develop their own policies on whether to accept cash unless there is a state law that says otherwise[emphasis mine]
For example, many convenience stores and gas stations have signs saying they'll not accept $50 or $100 bills due to counterfeiting. They're free to do that. If a business wants to only accept chickens in payment, they can do that, too. They may not stay in business long (unless most of their customers are chicken farmers).
That being said, there may be local laws that say otherwise (hence the last part of the US Fed quote that I italicized). In 2020, New York City passed a law that said businesses must accept cash. This was in response to a number of places (primarily restaurants, coffee shops, small grocers, etc.) that were going cashless - only credit cards or smartphone apps would be accepted for payment. The non-cash system was considered discriminatory against people who didn't have credit cards, couldn't get them, and/or didn't want them. The law does say the business does not have to accept bills over $20, and if they refuse to transact in cash they have to provide a free means to convert cash to a smart card.