Qitzur Shulchan Arukh – 181:14
Someone who accepts pay to testify, his testimony is nullified. But that is specifically if he already saw the event, for then he is obligated to testify for free. However, to go to see the matter so that afterward he could be a witness in it, it is permitted for him to receive pay — but only pay that is appropriate according to his effort, and no more. Similarly if he has [significant] effort to go before the court, he may accept pay according to what if appropriate for his effort, and no more.