Ionic React Google Pay issue

Hey everyone,

I’ve been using a square react plugin for some time now without any issues.

However, I’m trying to implement the same plugin into a Ionic Hybrid app and I can get the credit card to function as expected, but the Google Pay button doesn’t work as expected.

When I click the “Pay with Google Pay” button, it opens a new browser (outside of the webview app) and asks me to login. Once I confirm the card I get a “Unknown Developer error” and when I click retry it tries to redirect to a localhost url.

I’m assuming the issue lies within the app opening a new browser instead of opening a window within the webview (‘like my functioning webview app does’) but i’m unsure of how to prevent the Google Pay button from opening a new window.

I understand this is not really a Square issue but maybe someone has come across this before or might know a fix…


Thanks for bringing this to our attention. The team is looking into this. :slightly_smiling_face:

Hello! Just wondering if there is any update on this? Thanks :slight_smile:

At this time there isn’t any additional updates on this however the team is working on this. :slightly_smiling_face:

Finally had some time to look into this issue again, I don’t have a resolution but maybe some more info that may help.

This is the redirect url after clicking “Ok” when the Developer error appears.

To me it looks like a capacitor issue that doesn’t allow the google pay window to open as a popup hence not being able to read or atleast return data.



I’ve created a CapacitorJs plugin which uses Square’s native card entry form and GooglePay and Apple pay. It basically just returns cardDetails after the forms have completed

Maybe someone wants to contribute to refactor and finalize, since I built this in 2 days with minimal java/swift knowledge

Thanks for sharing with the community. :slightly_smiling_face: