This is old news to some and may come as no surprise, but Android Pay is once again working on rooted devices (specifically HTC,) using Magisk.
Magisk is a way to hide from the OS and programs in general that you’re rooted, running a modified system, etc.
Google’s Safetynet validation checks don’t catch it (yet,) and this means you can once again run custom ROMs without losing any of the functionality just because you’ve unlocked and rooted your device.
For some (not HTC,) you can simply install Magisk, although it’s a little bit different from the process described in the link there. For HTC devices you’re probably going to have to get a ROM with Magisk baked in. You’ll need to find it for your carrier/device.
You’ll need an untouched system and boot partition from a non-rooted device which you can get from an RUU or donor, and then you’ll have some set of hoops to jump through to get the modified ROM on your phone, although usually they’re pretty easy hoops to deal with.
That is all.