I want to see if there is a way to quickly check on the mobile web on chrome whether or not a user has Google Pay enabled. On IOS, I can call window.ApplePaySession.can make payments()
method on safari dev tools to instantly know if the user has apple pay enabled.
Is there an equivalent code snippet I can call on Chrome dev tools to figure out if the user has Google pay enabled? I don't need to be able to make a transaction or anything complicated, I just need to know if a user has that functionality enabled.
As far as my research, I found that window.PaymentRequest(methodData).canMakePayments()
should do the trick, but the problem with that route is that methodData needs information such as the merchant ID and merchant name, which I don't have. On apple's side, I do need that info to make a transaction, but I don't need it to simply check if apple pay is possible. Is there a way (maybe similar to the previous code snippet I shared) to ask the browser if Google pay is enabled without providing extra info such as merchant ID?