Skip to main content
Google Pay runs in the browsers Google supports, and the customer pays with a card in their Google account. Elements loads Google’s pay.js from pay.google.com on demand and asks whether the browser can pay on one of the supported networks, not whether the customer has a card saved. When Payra cannot take the token, the sheet stays open with a message and the customer can try again in it. So error can be followed by confirmed, or by cancel if they close the sheet.

Register your domains

On live, Google opens Google Pay only on a page whose domain is registered with Google. On any other domain, Google shows an error when the customer taps the button, and the customer cannot pay there. To register, send your Payra contact the hostnames that will show the button, the same list as for Apple Pay: each one in full, such as checkout.example.com and www.example.com. Google reviews each domain before Google Pay works on it, so send them ahead of launch. Unlike Apple Pay, there is no file to host. Sandbox needs no registration.

Test Google Pay

In sandbox Google Pay runs in Google’s test environment. Any Google account with a card in Google Pay can pay: the sheet shows the customer’s cards, Google hands over a test token, and the sandbox processor approves it.