Your back-of-seat ad display has a button saying Japan Taxi (name of app) in it. It has a QR code. The app has you register a payment method (during *one* taxi ride); you scan the bar code any time to pay
Presumably they’ve calculated that a) this is Japan so credit risk is minimal and b) should someone have a transient payment failure in real time they just have you update your payment creds before the next trip ends (or stop facilitating payments).