It is written, "You shall not take a bribe," and it is impossible to say that the prohibition is not to take a bribe to pervert the judgment, for regarding this several prohibitions were stated independently: "You shall not pervert justice," "You shall not recognize faces," "You shall not pervert the justice of your destitute in his dispute." Rather, it is certain that the Torah forbade receiving a bribe even to acquit the innocent and to convict the guilty. Therefore, one must be very, very careful regarding the receiving of a bribe, and if he took it, he is obligated to return it when the giver claims it from him; and to fulfill his duty toward Heaven, he is obligated to return it even if the giver does not claim it from him. The giver may claim it from him even after a long time, as long as he did not explicitly forgive it [Shevut Yaakov]. And it is not specifically a judge who is forbidden from receiving a bribe, but even all those appointed and all those who engage in public needs, even though their laws are not Torah law, they are forbidden from perverting the matter because of love or hatred, and all the more so through the taking of a bribe. And it is not specifically a bribe of money that is forbidden, but even a bribe of words, such as greeting the judge first if he was not accustomed to doing so previously; and similarly, to perform some service for him is forbidden if he was not accustomed to doing so previously—even a small service is forbidden. And to give a bribe to a star-worshipping judge, if he gives it so that he perverts the judgment, he violates "before a blind person do not place a stumbling block," for just as there is a prohibition upon the judge to receive a bribe, likewise there is a prohibition upon the giver, and the children of Noah were commanded concerning laws. However, if he wants to pervert the judgment unjustly toward the other side, and one gives to him so that he does not pervert the judgment, it is permitted [Chatam Sofer].
כתיב לא תקח שוחד וא"א לומר דהאזהרה היא שלא ליקח שוחד להטות הדין דהרי על זה נאמרו כמה לאוין בפ"ע לא תטה משפט לא תכיר פנים לא תטה משפט אביונך בריבו אלא וודאי דהתורה אסרה קבלת שוחד אפילו לזכות את הזכאי ולחייב את החייב ולכן מאד מאד צריך ליזהר בקבלת שוחד ואם לקח חייב להחזירו כשיתבענו הנותן ולצאת י"ש מחוייב להחזיר אף אם לא יתבענו הנותן והנותן יכול לתבעו אף אחר זמן מרובה כל זמן שלא מחלו בפירוש [שבו"י] ולאו דווקא דיין אסור בקבלת שוחד אלא אפילו כל הממונים וכל העוסקים בצרכי ציבור אף שאין דיניהם דין תורה ואסורים להטות הענין בשביל אהבה או שנאה וכ"ש ע"י לקיחת שוחד ולאו דווקא שוחד ממון אסור אלא אפילו שוחד דברים כגון להקדים שלום להדיין אם לא היה רגיל בכך מקודם וכן לעשות לו איזה שירות אסור אם לא היה רגיל בכך מקודם אפילו שירות קטן אסור וליתן שוחד לדיין עובד כוכבים אם נותן כדי שיטה הדין עובר על לפני עור לא תתן מכשול דכשם שיש איסור על הדיין לקבל שוחד כמו כן יש איסור על הנותן ובני נח נצטוו על הדינין אבל אם הוא רוצה להטות הדין שלא במשפט לצד השני ונותן לו שלא יטה הדין מותר [ח"ס]: