Our vets have claimed that you can't trust online pharmacies because they sometimes replace expensive meds with worthless junk or have terrible quality control because of shady suppliers. Since vets may not be the most trustworthy source for such info (in the pockets of US pharmaceutical manufacturers, etc.), I did some research into the topic myself.
This FDA website has excellent advice. All of it's useful, but the following quote has helped us on many occasions:
If you find a cheaper medicine online, ask your veterinarian to consider matching the price. Many veterinarians are willing to competitively charge based on the online price you’ve found (and can show proof of).