The law prohibits upfront pricing unless the drivers are employees of uber.
The law requires you (the rider) to be the customer of the driver. So the pricing / payment between driver and rider need to be linked.
If you are a customer of uber transit services (instead of uber ride finding and safety platform) they can offer flat rate prices and eat difference, but the drivers then need to be employees.