This feature is in beta. Contact your Customer Success Manager or raise a ticket through the Support Portal to enable it for your account.
How it works
- You create a Primer-managed Google Pay merchant ID in the Dashboard. It is separate from any merchant ID you have in the Google Pay & Wallet Console, and you manage its domains only through Primer’s API.
- You prove you control each domain and register it through the API.
- When all your domains are registered, you switch your Google Pay configuration to the new merchant ID in the Dashboard.
Before you begin
- Set up Google Pay with Primer. See Google Pay.
- Ask Primer to enable domain management for your account.
- Create an API key with the
google_pay_merchants:readandgoogle_pay_merchants:writescopes. See Authentication.
Step 1. Create a Primer-managed merchant ID
In the Dashboard, open the Google Pay Managed by Primer card and submit:- your company’s legal name, display name, country of registration and registered address
- your website and merchant category code (MCC)
- your acceptance of the Google Pay API Terms of Service
Step 2. Serve the verification token
Primer checks that you control a domain before registering it. Serve your token on every domain you register, including each subdomain:- at
https://{domain}/.well-known/primer-google-pay-domain-verification - over HTTPS, with a valid certificate for the domain
- with status
200and no redirect - as the whole response body, uncompressed and under 1 KB
Step 3. Register your domains
Register one domain per request, and send requests one at a time: wait for each to finish before you send the next. Primer refuses a registration or removal while another one for your account is still in progress. Send the domain name only, withouthttps://, a path or a wildcard.
201:
201, so you can safely re-run an interrupted batch.
Step 4. Switch to the new merchant ID
When every domain you accept Google Pay on is registered, open your Google Pay integration in the Dashboard and replace the merchant ID with the one on the Google Pay Managed by Primer card. After the switch, publish your checkout again in the Checkout Builder. To switch back, enter your previous merchant ID from the Google Pay & Wallet Console in the same field, and publish your checkout again. Creating a Primer-managed merchant ID doesn’t change your previous merchant ID or the domains registered on it, so keep them until you’re sure you won’t switch back. Switching doesn’t affect payments you’ve already taken. You can still refund payments taken under the previous merchant ID.Manage your domains
List domains
Remove a domain
204 with no body. Removing a domain frees a slot for a new one. Removing a domain that isn’t registered also returns 204.
Test in sandbox
Usehttps://api.sandbox.primer.io to test your integration with the API. Sandbox doesn’t affect Google Pay in test mode, where Google doesn’t require domains to be registered.
Errors
Errors use Primer’s standard error payload:diagnosticsId when you contact Primer.
Limitations
- You can’t register
*.example.comto cover all subdomains. Register each subdomain separately, for exampleshop.example.comandtickets.example.com.