Google Pay
Accept Google Pay on the myTU hosted payment page, or in your own checkout.
With Google Pay, your customers pay with a card stored in their Google account. They don't enter card details. Google Pay works on mobile phones and computers, in most browsers and operating systems.
Google Pay terms
To accept Google Pay, you must follow the Google Pay APIs Acceptable Use Policy and accept the Google Pay API Terms of Service.
You can accept Google Pay in two ways:
| Integration | How it works | Google registration |
|---|---|---|
| Hosted payment page | myTU shows the Google Pay button on the hosted payment page. | Not needed |
| Your own checkout | You show the Google Pay button in your own checkout and send the payment token to myTU. | Needed: you integrate with the Google Pay API |
Hosted payment page
On the hosted payment page, you don't need to register with Google. Once Google Pay is active in your project, it appears on the hosted payment page along with your other payment methods. To send your customer straight to Google Pay, create the order with google-pay as the payment method:
curl https://api.gw.mytu.co/v1/orders/ \
--user "$API_KEY:" \
--header "Content-Type: application/json" \
--data '{
"currency": "EUR",
"amount": 995,
"merchant_order_id": "EXAMPLE001",
"description": "Example Google Pay order",
"return_url": "https://www.example.com/order/EXAMPLE001",
"webhook_url": "https://www.example.com/webhook",
"transactions": [
{
"payment_method": "google-pay"
}
],
"customer": {
"merchant_customer_id": "123456789",
"email_address": "user@example.com",
"first_name": "John",
"last_name": "Smith",
"address_type": "billing",
"address": "100 Main St",
"postal_code": "SW1A 1AA",
"city": "London",
"country": "GB",
"locale": "en",
"phone_numbers": ["+441234567890"],
"ip_address": "198.51.100.1"
}
}'Redirect your customer to the payment_url of the transaction in the response. Then handle the result as for any other payment: confirm the payment.
Your own checkout
To show the Google Pay button in your own checkout instead, you integrate with Google yourself and pass the payment token to myTU. See Google Pay in your own checkout.
Customer details
Send the customer object with every Google Pay order. Depending on your acquirer, its fields can be required. See Create an order in the API reference for the fields and their formats.
Recurring payments
Google Pay supports recurring payments. See Recurring payments with Google Pay.