I was playing in a game where I had offered a bribe on my merchant bag. The sheriff, in turn, chose to take my bribe and still search my bag anyway. Is this type of play allowed?
The sheriff can either take the bribe or search the bag, not both. From the rules, in Phase 4 (Inspection):
When the Sheriff has made a decision about a Merchant Bag, he has two choices:
Accept whatever final bribe was offered (if any) and hand the bag back to its owner; or
Reject any bribe that may have been offered and unsnap the Merchant Bag, revealing the cards inside.
No, once the bribe is taken is it a binding contract.
Once the Sheriff has made a choice it cannot be changed. As soon as you unsnap a Merchant Bag or hand it back, it’s too late to change your mind!
After the Sheriff hears your offer (and after any negotiation required to settle the issue), the Sheriff must either allow you to pass (accepting any bribe that may have been offered), and hand you your Merchant Bag, or inspect the bag (refusing any bribe that may have been offered).
Normally, all deals you make must be honored! However, there are a couple of exceptions:
• Promises of future favors, which take place after the current inspection phase, are not binding!
• A merchant might offer the sheriff a bribe, which includes Goods in his merchant bag. Of course, he might be lying about the contents of his bag. If he is allowed to pass, when he reveals the Goods in his bag, he need only pay the sheriff the Goods he promised which actually exist! If he promised Goods to the sheriff, which are not in his bag, he does not have to pay those.
As a side note in the group I played with bribes where frequently offered to open bags as well.
No, it is not allowed. Only promises of future action are non-binding. See the same question on Boardgamegeek.