In New Jersey, for example, if you are subpoena'd and not a party to the lawsuit, you can insist on being paid for your time and for your costs. I am not sure of the rules in California. Hopefully, someone there can respond.
Marty Davidoff, email@example.com, 732-274-1600. This answer is provided for general information only. You should seek advice from an attorney or tax professional.
In California state court cases, a witness subpoenaed to testify at a deposition is entitled to witness fee of $35.00 plus mileage of 20 cents per mile, round trip from the witness's residence to the place of the hearing. The witness fee must be paid upon service of the subpoena if the witness requests it, or at the deposition.
In federal court cases, the fee for personal appearance is $40.00 per day, plus 55½ cents per mile, round trip from the witness's residence to the place of the hearing. The fee must be paid at the time of service.
The information presented here is general in nature and is not intended, nor should be construed, as legal advice. This posting does not create any attorney-client relationship with the author (who is only admitted to practice law in the State of California). For specific advice about your particular situation, consult your own attorney.