סימן קפא סעיף יד
הַנּוֹטֵל שָׂכָר לְהָעִיד, עֵדוּתוֹ בְּטֵלָה. וְדַוְקָא כְּשֶׁכְּבָר רָאָה הַמַּעֲשֶׂה, דִּמְחֻיָּב לְהָעִיד בְּחִנָּם. אֲבָל לֵילֵךְ לִרְאוֹת אֶת הָעִנְיָן שֶׁיִהְיֶה אַחַר כָּךְ עֵד בַּדָבָר, מֻתָּר לוֹ לִקַּח שָׂכָר, אֲבָל רַק שָׂכָר הָרָאוּי לְפִי הַטִּרְחָא שֶׁלּוֹ וְלֹא יוֹתֵר. וְכֵן אִם יֶשׁ לוֹ טִרְחָא לָלֶכֶת לִפְנֵי בֵית הַדִּין, יָכוֹל לִטּוֹל שְׂכַר טִרְחָא כְּפִי הָרָאוּי בְּעַד טִרְחָא זוֹ, וְלֹא יוֹתֵר.
If you accept a reward for your testimony, your testimony is null and void. This is true only after you had already witnessed the facts, for then it is your duty to testify free of charge. However, (if you are asked) to witness a certain transaction in order to subsequently testify, you are permitted to take compensation. It is permitted to take compensation only to the extent that you were inconvenienced and no more. Also, if it is an inconvenience for you to go to Beis Din, you are entitled to compensation for your inconvenience, but only to the extent that it is proper for this inconvenience, and no more.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)