Not quite. According to a quick search [1]: "Under California law, it's illegal for a landlord to require cash and/or electronic deposits as the sole methods to pay rent.1 Landlords must allow a tenant to pay rent using at least one of these other options as well: check, cashier's check, or money order."
When I lived in CA I had a landlord that demanded cashier's check. Do you know how annoying those are to get?
I could have also paid cash but then I'd take the risk that the cash, dropped in a mailbox, would "go missing".
[1] https://caretaker.com/learn/rent/rent-payment-laws-in-califo...