Sometimes, the cashier says "not ok" despite being "ok".
These days I don't generally need to ask because the terminal have very conspicuous Apple Pay logos on them. But sometimes the terminal is kept behind the counter, so you can't see.
I've had several occasions (most recently at my vet) where I was told that it wouldn't work and I said, "Let's try it anyway," and it worked just fine.
When I’ve thought Apple Pay would have actually worked in that kind of situation, I try it next time I’m there (without asking first!)