Skip to main content

Google Pay™

General Information

Google Pay™ is a fast and secure way for one-touch online purchases. A customer of the store can pay with any card saved in his Google account. For merchant this payment will be processed like a regular payment by card.

  • If the purchase is made from a mobile device supporting Google Pay, the customer will be asked to confirm the payment using a password, fingerprint or face recognition.
  • If the purchase is made from a device without the Google Pay app, the customer can select any saved card in his Google account and confirm payment by passing 3D Secure authentication.
note

All merchants must adhere to the Google Pay APIs Acceptable Use Policy and accept the terms defined in the Google Pay API Terms of Service.

Integration


Mobile Apps

Check out Google Pay Android developer documentation. Ensure that all the required steps of Google Pay Android integration checklist are completed and Google Pay Android brand guidelines is followed.

For accepting payments in the Android mobile apps using the Google Pay payment button, follow these instructions for using the SDK.


Simplified integration (only for web-sites)

For web-sites using the web version of our checkout page, there is no additional configuration or activation required. Just contact account manager of ioka, and we will enable the Google Pay button on your payment form.


Standard integration (only for web-sites)

Standard integration refers to hosting checkout page with Google Pay on merchant's website. To make a payment, you need to receive a payment token from Google Pay and transfer it to the ioka payment gateway.

Before you begin the integration, make sure that:

  • You have read with Google Pay API Overview;
  • Your web-page supports HTTPS protocol and has a domain-validated TLS certificate;
  • One of the following web browsers is being used: Google Chrome, Mozilla Firefox, Apple Safari, Microsoft Edge, Opera, or UCWeb UC.

Upon completion of the integration, you must ensure that:

Integration steps

  1. Send a request for a standard Google Pay integration to account-manager of ioka and receive GATEWAY_MERCHANT_ID.
  2. Integrate Google Pay API following these instructions. During Payment Data Request pass following object to allowedPaymentMethods:
    {
"type": "CARD",
"parameters": {
"allowedAuthMethods": ["PAN_ONLY", "CRYPTOGRAM_3DS"],
"allowedCardNetworks": ["MASTERCARD", "VISA"]
},
"tokenizationSpecification": {
"type": "PAYMENT_GATEWAY",
"parameters": {
"gateway": "ioka",
"gatewayMerchantId": "GATEWAY_MERCHANT_ID"
}
}
}
note

In Card Parameters set billingAddressRequired to false as it is not required to process the transaction.

  1. Implement Google Pay Token Payment Request.
  2. Test your integration with the Google Pay API and ioka.
  3. Request production Google Pay access and receive a Google Merchant ID.
  4. Request production access to ioka API.

Payment Method Token

PaymentMethodToken is signed and encrypted payment methods returned from Google Pay API. Payloads store information about cards that consist of PAN, or tokenized cards that consist of device PAN and cryptograms.

Payment Data Response is a UTF-8 encoded, serialized JSON object with the following structure:

{
"protocolVersion":"ECv2",
"signature":"MEQCIH6Q4OwQ0jAceFEkGF0JID6sJNXxOEi4r+mA7biRxqBQAiAondqoUpU/bdsrAOpZIsrHQS9nwiiNwOrr24RyPeHA0Q\u003d\u003d",
"intermediateSigningKey":{
"signedKey": "{\"keyExpiration\":\"1542323393147\",\"keyValue\":\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE/1+3HBVSbdv+j7NaArdgMyoSAM43yRydzqdg1TxodSzA96Dj4Mc1EiKroxxunavVIvdxGnJeFViTzFvzFRxyCw\\u003d\\u003d\"}",
"signatures": ["MEYCIQCO2EIi48s8VTH+ilMEpoXLFfkxAwHjfPSCVED/QDSHmQIhALLJmrUlNAY8hDQRV/y1iKZGsWpeNmIP+z+tCQHQxP0v"]
},
"signedMessage":"{\"tag\":\"jpGz1F1Bcoi/fCNxI9n7Qrsw7i7KHrGtTf3NrRclt+U\\u003d\",\"ephemeralPublicKey\":\"BJatyFvFPPD21l8/uLP46Ta1hsKHndf8Z+tAgk+DEPQgYTkhHy19cF3h/bXs0tWTmZtnNm+vlVrKbRU9K8+7cZs\\u003d\",\"encryptedMessage\":\"mKOoXwi8OavZ\"}"
}
note

More information about payment method token structure can be found here.

This object is expected to be passed to "google_pay" parameter of payment request.

One-click Payment Request

This method is used for creating order and immediate initiating payment with Google Pay.

Request:

  • amount - order amount in minor monetary units (e.g. in tiyns, 1/100 of tenge)
  • tool_type - "GOOGLE_PAY"
  • google_pay - payment method token received from the Google Pay API on a web-site or app
  • other parameters optional, but may help describe order and payment process
POST /v2/orders/tool HTTP/1.1
Host: stage-api.ioka.kz
Content-Type: application/json
Content-Length: 547

{
"amount": 500,
"tool_type": "GOOGLE_PAY",
"google_pay": {
"signature": "ME...",
"intermediateSigningKey": {
"signedKey": "{\"keyValue\":\"MF\...\",\"keyExpiration\":\"16...\"}",
"signatures": ["ME..."]
},
"protocolVersion": "ECv2",
"signedMessage": "{\"encryptedMessage\":\"oT...\",\"tag\":\"sm...\"}"
}
}

Response:

info

To complete the payment for card with 3D Secure authentication you need to redirect a customer to the url specified in the corresponding parameter of action field.

After completing authentication customer will be redirected to the payment form, and you will be notified with webhook containing payment data.

{
"id": "pay_test",
"order_id": "ord_test",
"status": "REQUIRES_ACTION",
"created_at": "2022-06-20T00:00:00.000000",
"approved_amount": 0,
"captured_amount": 0,
"refunded_amount": 0,
"processing_fee": 0,
"tds": true,
"payer": {
"pan_masked": "411111******1111",
"expiry_date": "12/24",
"holder": "holder",
"payment_system": null,
"emitter": null,
"email": null,
"phone": null,
"customer_id": null,
"card_id": null,
"iin": null
},
"acquirer": null,
"error": null,
"action": {
"url": "https://api.ioka.kz/v2/pay_test/check3ds"
}
}

Standard Payment Request

This method is used for initiating payment with Google Pay for pre-created order.

Request:

  • order_id - id of pre-created order (e.g. ord_a1b2c3d4e5)
  • tool_type - "GOOGLE_PAY"
  • google_pay - payment method token received from the Google Pay API on a web-site or app
POST /v2/orders/{order_id}/payments/tool HTTP/1.1
Host: stage-api.ioka.kz
Content-Type: application/json
Content-Length: 547

{
"tool_type": "GOOGLE_PAY",
"google_pay": {
"signature": "ME...",
"intermediateSigningKey": {
"signedKey": "{\"keyValue\":\"MF\...\",\"keyExpiration\":\"16...\"}",
"signatures": ["ME..."]
},
"protocolVersion": "ECv2",
"signedMessage": "{\"encryptedMessage\":\"oT...\",\"tag\":\"sm...\"}"
}
}

Response:

info

To complete the payment for card with 3D Secure authentication you need to redirect a customer to the url specified in the corresponding parameter of action field.

After completing authentication customer will be redirected to the payment form, and you will be notified with webhook containing payment data.

{
"id": "pay_test",
"order_id": "ord_test",
"status": "REQUIRES_ACTION",
"created_at": "2022-06-20T00:00:00.000000",
"approved_amount": 0,
"captured_amount": 0,
"refunded_amount": 0,
"processing_fee": 0,
"tds": true,
"payer": {
"pan_masked": "411111******1111",
"expiry_date": "12/24",
"holder": "holder",
"payment_system": null,
"emitter": null,
"email": null,
"phone": null,
"customer_id": null,
"card_id": null,
"iin": null
},
"acquirer": null,
"error": null,
"action": {
"url": "https://api.ioka.kz/v2/pay_test/check3ds"
}
}