Google Pay tokenize error


I’m implementing square into my web app and have been able to successfully implement the credit card side of things and am extending that to google pay. I’ve been following along/adapting the sample app code as a guide.

I’m able to initialize google pay and display the button in our ui, but when call tokenize() in the click handler, the google pay window that pops up reports:

“Unexpected developer error, please try again later”

In my console, I’m seeing 8 requests to the same URL: that fail with a 401 and a response of “Your client does not have permission to the requested URL”

Does that sound familiar? Anything in particular I should be looking for?

Thanks for any help,

What example are you using? Is it our Quickstart Google Pay example? :slightly_smiling_face:


Thank you for the response!

I was using a different reference.

Which I found unnecessarily convoluted with its insistence on creating a bunch of functions on the window object as part of the example. The example you pointed to was more straightforward, which I appreciate.

I believe the error was that I was passing an invalid amount. (NaN - whoops!)