Here's my source which is consistent with what I have heard before. Source is two years old so maybe something improved? Iirc theres also a mileage component if the courtroom is more than 40 km from your house but most people dont qualify for that.
I couldn't get the link to work but your earlier post gave numbers similar to what I ran into as a witness some time back.
I did a job in Quebec, got stiffed and wrote it off. It wasn't worth fighting for a couple thou.
A few years later I got a call from a lawyer in Montreal asking if I would testify in the case. I basically said I didn't get paid and they could go fly a kite. Their response was a subpoena with a cheque to cover my expenses. IIRC it was $120 to travel to Montreal and attend the trial for a day. Mileage was calculated at a fraction of the government rate for compensation and $40 a day. $20 if I was only needed for a half day.
My day was a Thursday. If they had paid their bill I would have told the wife to plan for a slightly subsidized weekend in Montreal and taken the offer.
However the rate they gave me was that of a casual observer and I was to give expert testimony and that came with my terms and conditions.
1) Pay the bill with interest
2) Pay actual travel expenses
3) Pay my present daily rate
4) Pay for decent accommodation
Basically, send a cheque for $7,000 and I'll show up. It didn't happen.
There are two rates.
A) Bill Gates is having a latte at a bistro and sees someone get hit in the head by a falling computer. He is a casual witness and gets $40 a day.
B) If Gates is called to testify on the probability of a programming error causing the computer to jump, unaided, through a window and land on someone's head he is an expert witness and he gets big bucks.
The former (A) is the reason people don't want to get involved, losing hundreds or thousands of dollars over he said / she said.
Criminal is different but in civil cases the witnesses should get full compensation, paid by the loser of the case.