With Google Pay, your customers can easily make payments on your app or website using any credit or debit card linked to their Google Account. This includes cards from services like Google Play, YouTube, Chrome, or any Android device.
When a customer makes a payment using Google Pay, it displays a payment sheet, allowing them to choose their preferred card and confirm their purchase securely.
Payment option | Category | Countries | Currencies | Features | Integrations |
---|---|---|---|---|---|
Google Pay | Digital Wallet | Czech Republic, Estonia, France, Germany, Poland, Portugal, Romania, Slovakia | CZK, EUR, PLN, RON | Pre-authorized Capture One-Time Purchase Partial captures Partial refund Recurring Refunds Cancellation | API Payment Form Prestashop Plugin WooCommerce Plugin Magento Plugin |
Before you start
To initiate the Google Pay payment processing, the initial step involves the Set up of Google Pay. After successfully setting it up, you gain the capability to incorporate the Google Pay button into your checkout page and securely request encrypted payment details from your customers.
Before going live, you must maintain strict compliance with the stipulations outlined in Google Pay API Acceptable Use Policy.
Enable Google Pay
To begin this process, you must be logged in using a Google Developer account.
This entails completing the registration on the Google Pay & Wallet Console and select “Gateway” as your Google Pay API Integration Type.
Once this process is finalized, you will gain the ability to initiate a payment.
Make a payment
First, you should initiate the creation of the order.
Upon generating the order request, make sure to include “XPAY” as a payment method.
Following this, proceed to make the payment request as per the following detailed message.
Environment | URL | Operation Method & Endpoint | Operation Description |
---|---|---|---|
PROD | api.sibsgateway.com | POST version-id/{id}/xpay/payment | Requests the payment registered by the previous checkout using xpay payment details inserted by the customer. |
TEST | stargate-cer.qly.site[1|2].sibs.pt | POST version-id/{id}/xpay/payment | Requests the payment registered by the previous checkout using xpay payment details inserted by the customer. |
The message below represents the GooglePay Payment Request:
Location | Data Element | Type | Condition | Description |
---|---|---|---|---|
Path | id | String | Conditional | Transaction Id |
Header Parameters:
Location | Data Element | Type | Condition | Description |
---|---|---|---|---|
Request Header | Content-Type | String | Mandatory | application/json |
Request Header | Authorization | String | Mandatory | Bearer Token. Based on OAuth2 authentication performed in a pre-step. |
Request Header | x-ibm-client-id | String | Mandatory | Token that identifies a client organization. It is provided during onboarding process and must be used in every call. |
Request Parameters:
Location | Data Element | Type | Condition | Description |
---|---|---|---|---|
Request Body | tokenInfo | TokenInfo | Conditional | Payment Tokens |
Request Body.tokenInfo | tokenName | String | Optional | Token Name |
Request Body.tokenInfo | tokenType | String | Mandatory | Token Type. Possible values are (“ApplePay”, “GooglePay”). |
Request Body.tokenInfo | value | String | Mandatory | Token Value |
Request Body | info | Info | Mandatory | Object that defines the transaction additional information. |
Request Body.info | deviceInfo | DeviceInfo | Mandatory | Object that defines the customer device information. |
Request Body.info.deviceInfo | browserAcceptHeader | String | Optional | Browser Accept Header |
Request Body.info.deviceInfo | browserJavaEnabled | String | Optional | Browser Java Enabled |
Request Body.info.deviceInfo | browserJavascriptEnabled | String | Optional | Browser Javascript Enabled |
Request Body.info.deviceInfo | browserLanguage | String | Optional | browser Language |
Request Body.info.deviceInfo | browserColorDepth | String | Optional | browser Color Depth |
Request Body.info.deviceInfo | browserScreenHeight | String | Optional | browser Screen Height |
Request Body.info.deviceInfo | browserScreenWidth | String | Optional | browser Screen Width |
Request Body.info.deviceInfo | browserTZ | String | Optional | Browser Time Zone |
Request Body.info.deviceInfo | browserUserAgent | String | Optional | Browser User Agent |
Request Body.info.deviceInfo | systemFamily | String | Optional | System Family |
Request Body.info.deviceInfo | systemVersion | String | Optional | System Version |
Request Body.info.deviceInfo | systemArchitecture | String | Optional | System Architecture |
Request Body.info.deviceInfo | deviceManufacturer | String | Optional | System Manufacturer |
Request Body.info.deviceInfo | deviceModel | String | Optional | Device Model |
Request Body.info.deviceInfo | deviceID | String | Optional | Device Unique Identification |
Request Body.info.deviceInfo | applicationName | String | Optional | Application Name |
Request Body.info.deviceInfo | applicationVersion | String | Optional | Application Version |
Request Body.info.deviceInfo | geoLocalization | String | Optional | Geolocation |
Request Body.info.deviceInfo | ipAddress | String | Optional | IP Address |
Request Body.info | customerInfo | CustomerInfo | Mandatory | Key Value tuple array. |
Request Body.info.customerInfo | key | String | Optional | |
Request Body.info.customerInfo | value | String | Optional |
Here’s a sample of a Google Pay transaction:
{
"info": {
"deviceInfo": {
"browserAcceptHeader": "application/json, text/plain, */*",
"browserJavaEnabled": "false",
"browserLanguage": "en",
"browserColorDepth": "24",
"browserScreenHeight": "1080",
"browserScreenWidth": "1920",
"browserTZ": "-60",
"browserUserAgent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36",
"geoLocalization": "Lat: 38.7350528 | Long: -9.2143616",
"systemFamily": "Windows",
"systemVersion": "Windows",
"deviceID": "498bfd4c3a3645b38667a7037b616c18",
"applicationName": "Chrome",
"applicationVersion": "106"
},
"customerInfo": [
{
"key": "customerName",
"value": "Test Name"
},
{
"key": "customerEmail",
"value": email@provider.com
}
]
},
"tokenInfo": {
"tokenType": "googlePay",
"value": "eyJzaWduYXR1cmUiOiJNRVVDSVFDVXkvSU1SVEErRk9UbjNhdERHQlQvVHZYOWZQdE8wSFhydGVBcWNJb9In0="
}
}
After the payment is processed, you will receive a response indicating the transaction status.
Additionally, you can perform a “Get Status” operation to check the status at any time.
The Authorization HTTP header is set to the Bearer token as it was used in the initial Checkout.
GET {transactionID}/status
Request URL:
https://stargate-cer.qly.site1.sibs.pt/api/v1/payments/{transactionID}/status
Request Headers:
Authorization: ‘Bearer <AuthToken>’
X-IBM-Client-Id: ‘<ClientId>’
Content-Type: application/json
A successful technical response comprises of an HTTP-200 status and a returnStatus.statusCode=”000″.
Here are some examples of the possible result codes:
Result Code | statusMsg | Description | Action |
---|---|---|---|
HTTP-200 | Success | Success response | N/A |
HTTP-400 | Bad Request | The JSON payload is not matching the API definition or some mandatory HTTP headers are missing. | Please check in API Market for the correct syntax. |
HTTP-401 | Unauthorized | On the Authorization, Bearer token is invalid/expired or not associated with the Terminal used. | Please check in SIBS Backoffice under the Credentials if the token is valid and create a new one if needed. |
HTTP-403 | Forbidden | The ClientID set on the X-IBM-Client-Id HTTP header is not valid or does not possess a valid subscription to the API. | Please check in SIBS Backoffice under the SPG APP 2.0 if the ClientID is correct. If the problem persists contact SIBS Gateway support for a ClientID reset. |
HTTP-405 | Method Not Allowed | The HTTP Method used is not matching any of the API definitions available. | Please check in API Market for the correct HTTP Method. |
HTTP-429 | Too Many Requests | The API calls rate limit has been exceeded. | Please check in API Market for information on the rate limits that apply to the API. |
HTTP-500 | Internal Server Error | The API call has failed… and its most likely on our side. | You should retry the operation, and if the problem persists contact SIBS Gateway support for assistance. |
HTTP-503 | Service Unavailable | The API call is not currently available. Usually we are always on, but short availability issues may occur during scheduled maintenance. | You should wait and try again later. |