All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
If you have a right to the bonus according to the job's codes and regulations and the boss is aware of this, then there is no blame on you for receiving and using it. The manager has no right to withhold it from you and it is not permissible for him to take anything from you. If he does, then he does so unlawfully, so he should fear Allaah and stop doing so.
Also, it is not permissible for you to give him any of your bonus unless he prevents you from your right to it and you cannot get it except by giving some of it to him. In this case, the sin falls on him and not on you, and this would not then consist in bribery because bribery is what is paid to offset a right or impose a wrong.
The author of Tuhfat Al-Ahwathi, a commentary on At-Tirmithi, said: “As for what is given in order to get a lawful right or repel injustice, this is not included in it (bribery). It was reported that Ibn Mas‘ood was held in Abyssinia for something, so he gave two dinaars to be released. It was also reported about a group of Imaams among the Taabi‘is (the followers of the Companions) that it is permissible for a man to pay money to save himself or his wealth if he fears injustice.”
Also, Al-Mirqaat Sharh Al-Mishkaat reads: “It was reported that bribery is what is given to offset a right or impose an injustice, but if it was given in order to defend oneself (from an injustice), then this is permissible.”
Allaah Knows best.