Depends on the store really, some are much more willing to take back and refund than others. I don't know where you are at but petsmart they'll take your fish back for refund if you have the receipt. Other places will take them back, but don't expect a refund from most of them.
However, if they sold you something that was obviously wrong for your tank after you gave them specifics or a mislisted fish I would complain, as that is their fault for giving wrong info.