The Shulchan Aruch · Choshen Mishpat
חושן משפט כ״חChoshen Mishpat 28
Siman 28 of 427 in Choshen Mishpat — 26 se'ifim
Se’if 1א׳
כיצד מאיימין העדים ואין מקבלין עדות שלא בפני בע"ד. ובו כו סעיפים: כל מי שיודע עדות לחבירו וראוי להעידו ויש לחבירו תועלת בעדותו חייב להעיד אם יתבענו שיעיד לו (בב"ד תוס' וב"י) בין שיש עד אחד עמו בין שהוא לבדו ואם כבש עדותו פטור מדיני אדם וחייב בדיני שמים: הגה ועד א' לא יעיד אלא בדבר ממון שמביא א' לידי שבועה או בדבר איסור ואפרושי מאיסורא אבל אם כבר נעשה האיסור לא יעיד דאינו אלא כמוציא שם רע על חבירו (הגהות מיימוני פ"ה מהלכות עדות) ואסור לאדם להעיד בדבר שאינו יודע אע"פ שאמר לו אדם שיודע בו שאינו משקר ואפי' אמר לו בא ועמוד עם עד א' שיש לי ולא תעיד רק שיפחד בעל חובי ויסבור שיש לי שני עדים ויודה לי לא ישמע לו. (טור):
1. Anyone who knows testimony that another has a use for, and is fit to testify, is obligated to testify if he is called to testify in court. This is true whether he is solo or has another witness with him. If he withholds his testimony, he is exempt from judgement by man but is liable by the laws of the heavens. A solo witness should only testify on monetary matters where he may require an oath or for a matter of prohibition where he is causing someone to separate from the prohibition. If the prohibition was already done, however, he should not testify because he is merely gossiping about the individual. A person is prohibited from testifying regarding a matter he does not know, even if it was told to him by a truthful person. Even if one were to tell him to merely stand with another witness, but not actually testify, in order to intimidate the borrower who will think he has two witnesses and get the borrower to confess, the witness may not do so.
Se’if 2ב׳
אדם רשאי להחרים בבית הכנסת על כל מי שיודע לו עדות שיבא ויעיד: הגה אבל לא יוכל להשביען אלא אם לא יגיד ונשא עונו (תשובת הרשב"א סי' תרנ"ח) מיהו אם נראה לב"ד צורך שעה להשביען שיגידו האמת הרשות בידן (ב"י בשם הרא"ש) וע"ל סי' י"ז סעיף ג' ולקמן סי' ע"א סעיף ז' ח' י"א כשנותנים חרם בעדות אף הקרובים צריכים להעיד (מרדכי ריש פ' שבועת העדות) ואפי' בעל דבר בעצמו צריך להעיד (טור סי' ט"ז) ויש חולקין (תשו' הרשב"א סי' תרכ"ז ותשו' הרא"ש סי' כ') וכן עיקר וע' בי"ד סי' רל"ב מלך שצוה לתת חרם בעדות:
2. A person is permitted to place a cherem in the synagogue on anyone who knows testimony for him to come and testify. He cannot, however, force them to swear. If they don’t testify, they will carry their sin. Nevertheless, if the court sees a need to have them swear to say the truth, they may do so. See earlier 17:3 and later 71:7-8. There are those that say that when a cherem is placed, even relatives and the party himself must testify. There are those that disagree and this is the primary ruling. See Yoreh Deah Siman 232 regarding a king who commands the placement of a cherem for testimony.
Se’if 3ג׳
אם עכו"ם תובע ישראל ויש ישראל יודע עדות לעכו"ם נגד ישראל ואין עד אלא הוא והעכו"ם תובע שיעיד לו במקום שדיני העכו"ם לחייב ממון ע"פ עד א' אסור להעיד לו ואם העיד משמתין אותו: הגה אבל אינו חייב לשלם דיכול לומר אמת העדתי אבל אם יש לברר ששקר העיד חייב לשלם ואם בעל דבר מודה שאמת העיד אין משמתין אותו (הגהות מרדכי דבבא קמא) ואם מתחלה יחדו העכו"ם לישראל להיות עד איכא חילול השם אם לא יעיד לו (ויעיד לו):
3. If a gentile calls a Jew to secular court, and there is a Jew who is the only one that knows testimony for the gentile, and it is a situation where secular courts obligate payment based on a solo witness, the Jew is prohibited from testifying for him. If he testifies, we place a shmuti on him. The witness is not obligated to pay, however, because he can say I testified truthfully. If, however, one can determine that he testified falsely, he is obligated to pay. If the party admits that the testimony was true, we do not place a shmuti on him. If the gentile originally designated him as a witness, it is a desecration of God's name not to testify and he must testify for him.
Shulchan Aruch, Choshen Mishpat — Lemberg 1898 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0