Google Pay™
Accept Google Pay payments in your online store.
Google Pay allows your customers to make payments in your app or website using a credit or debit card added to their Google Account. Use the emerchantpay Google Pay API to accept Google Pay as a payment method across all of emerchantpay’s payment integrations.
Payment method | Countries/regions | Supported payments |
---|---|---|
eWallet | Global (see list) | Card (Visa, Mastercard) |
Prerequisites
To proceed with this solution, you must have an emerchantpay merchant account. Apply for a merchant account by filling out and submitting this contact form.
You will be assigned an emerchantpay Account Manager, who will provide you with credentials and assist you with any of emerchantpay’s payment solutions.Process Google Pay payments in the Web Payment Form (WPF)
To process Google Pay payments using the emerchantpay Web Payment Form (WPF), add an emerchantpay gateway domain to your Google merchant account. To add a gateway domains:- Open the Google Pay & Wallet Console.
- Select Google Pay API in the navigation menu.
- In the Integrate with your website section, select Add website.
- In the Website URL field, enter in
wpf.emerchantpay.net
orwpf.e-comprocessing.net
. Which domain should I add? - In the Integration type field, select Gateway.
- Contact support for the screenshots required for each of the Screenshots of your buyflow elements.
- Select Save.
- Optional: To add another domain, repeat from step 3.
1. Authorise a Google Pay payment
After your customer selects Buy with Google Pay at checkout, the Google Pay API will return an encrypted payment token containing the unique transaction information.{
“signature”:”…”,
“intermediateSigningKey”:{
“signedKey”:”{
“keyValue”: “…”,
“keyExpiration”: “…”
}”,
“signatures”:[…]
},
“protocolVersion”:”…”,
“signedMessage”:”{
“encryptedMessage”: “…”,
“ephemeralPublicKey”: “…”,
“tag”: “…”
}”
}
2. Create a Google Pay payment request
After the payment token is received, create a Google Pay payment request to the emerchantpay Genesis payment gateway. Specify the encrypted payment token inpayment_token
and the payment type in payment_subtype
.
Accepted Google Pay payment types:
<?xml version=”1.0″ encoding=”UTF-8″?>
<payment_transaction>
<transaction_type>google_pay</transaction_type>
<transaction_id>119643250547501c79d8295</transaction_id>
<payment_subtype>authorize</payment_subtype>
<payment_token>
{
“signature”:”…”,
“intermediateSigningKey”:{
“signedKey”:”{
“keyValue”: “…”,
“keyExpiration”: “…”
}”,
“signatures”:[…]
},
“protocolVersion”:”…”,
“signedMessage”:”{
“encryptedMessage”: “…”,
“ephemeralPublicKey”: “…”,
“tag”: “…”
}”
}
</payment_token>
3. Receive a response
You will receive a Success or Error response to your payment request. Example of a Success response: <?xml version=”1.0″ encoding=”UTF-8″?>
<payment_response>
<transaction_type>google_pay</transaction_type>
<status>approved</status>
<mode>live</mode>
<transaction_id>119643250547501c79d8295</transaction_id>
<unique_id>44177a21403427eb96664a6d7e5d5d48</unique_id>
<consumer_id>123456</consumer_id>
<avs_response_code>5I</avs_response_code>
<avs_response_text>Response provided by issuer processor; Address information not verified</avs_response_text>
<authorization_code>345678</authorization_code>
<response_code>00</response_code>
<timestamp>2022-05-24T17:25:03Z</timestamp>
<descriptor>Descriptor one</descriptor>
<amount>100</amount>
<currency>USD</currency>
<sent_to_acquirer>true</sent_to_acquirer>
<scheme_transaction_identifier>019091214161031</scheme_transaction_identifier>
</payment_response>
payment_subtype
, you can capture and settle the customer transaction. See the Transactions API for more information.
4. Test your integration
Use a Google Pay test card to test your Google Pay integration:- Add an item to your cart in your online store.
- Proceed to the checkout page and check out using Buy with Google Pay.
- Pay using one of the test card details.
- Log in to Genesis.
- In the navigation menu, go to Payment transactions.
- Verify that the transaction appears at the top of the list and is successful.
5. Accept live payments
After you have successfully tested your Google Pay integration, you are ready to move to the production environment and accept live payments from your customers. Contact your emerchantpay Account manager to get your login credentials for the Genesis production environment.You are now ready to accept live payments from your customers using Google Pay.
Google Pay is a trademark of Google LLC.