Acquiring via Google Pay™
Protocol Description
API allows the Partner to accommodate payments from debit and credit cards performed by users on websites or in apps via Google Pay™
The solution is implemented in concordance with methods used by Google Pay:
- https://pay.google.com/intl/en_us/about/
- https://pay.google.com/intl/en_us/about/business/
- Google Pay Web Developer Documentation
- Google Pay Web Integration Checklist
if you provide Google Pay as a payment method to your customers, you must use the official Google Pay logo and button assets in compliance with Google Pay Android brand guidelines and Google Pay web brand guidelines, without modifications to the Google Pay asset colors, proportions, or appearance.
You must also adhere to Google Pay and Wallet API's Acceptable Use Policy and accept the terms defined in the Google Pay API Terms of Service.
Payments interaction diagram

Payments interaction diagram description:
1) Partner's Shop provides payment method to end User;
2) User selects GooglePay as a payment method;
3) Partner's Shop transfers payment method information to System (see «Payment request» segment);
4) System returns payment form to Partner's Shop for further display (see «Payment request» segment);
5) Partner's Shop displays payment form to end User. This can be done by either by redirecting the User to payment form URL, or by opening payment form in WebView;
6) User chooses source of funds (card, account) for payment;
7) System requests payment token from chosen payment system (GooglePay);
8) Payment system returns payment token to System;
9) System debits funds from User account;
10) System sends payment result callback to (success/failure, see «Callback example» segment).
Optional:
10.1) Partner's Shop requests transaction status from System (see «Payment status request» segment).
11) Partner's Shop redirects User to url_success or url_fail depending on transaction result.
Available request methods
The following requests are used for information exchange between Partner and System:
| Request direction | Request description | URL |
|---|---|---|
| Partner -> System | Payment request, POST | /acquiring-v2/googlepay/pay |
| Partner -> System | Payment status request, POST | /acquiring-v2/{Service_ID}/check |
| Partner -> System | Payment confirmation request (only available for two-stage payments), POST | /acquiring-v2/{Service_ID}/confirm |
| Partner -> System | Hold cancellation request (only available for two-stage payments), POST | /acquiring-v2/{Service_ID}/unhold |
| Partner -> System | Refund request | Contact technical support to issue refunds |
| Partner -> System | Transaction registry request, GET | Request description provided below |
Where is the value of :
For Stage environment - https://int.gwp.digital
For Production environment - https://gwp.digital
{Service_ID} – Partner identifier within System. Provided after onboarding.
Every request must contain a header (HTTP header)
Content-Typewith the valueapplication/x-www-form-urlencoded.
The system checks the request from the point of view of security and correctness of the request. If the security check fails, the System returns HTTP Status 400 to the request, in case of a request validation error, HTTP Status 401 or 403.
Payment request
to initiate a payment you should send the following request:
POST /acquiring-v2/googlepay/pay
Request parameters:
| Parameter | Required | Type | Description | Example |
|---|---|---|---|---|
| orderid | Yes | String | Unique transaction identifier within Partner's system | 123456789 |
| amount | Yes | Decimal | Transaction amount | 1.01 |
| dt | Yes | String | Request date and time in yyyyMMddHHmmss format | 2024070123301 |
| url_success | Yes | String | URL for User redirect after successful payment | https://google.com/success |
| url_fail | Yes | String | URL for User redirect after unsuccessful payment | https://google.com/fail |
| callback_url | No | String | Custom callback URL | https://some.partner.system/callback |
| control | Yes | String | Control signature. SHA256-hash ( orderid + amount + dt + SecretKey), where «+» - concatenation sign | 36a02d89974fd0efa9d7bc8036d8983c |
| request | No | String | Request type. Available values: check, pay, get-status | - |
| receiver_fio | No | String | User's full name. String, only latin characters and spaces are allowed | Testio Testi |
| currency | No | String | Payment currency, ISO 4217 Alpha 3 | EUR |
| payer_country | No | String | User's country of residence, ISO 3166-1-Alpha 2 | PL |
| payer_commis | No | Decimal | User's payment fee (if applicable) | 1.50 |
| detailsofpayment | No | String | Payment description/details | Some descpription |
| client_ip | No | String | User's IP address. Format: IPv4 / IPv6 | 91.19.8.17 |
| No | String | User's e-mail address | [email protected] | |
| merchant_site | No | String | Partner Shop website, where payment takes place | https://123abc.org |
Some optional parameters need to be passed in addition depending on the specific configuration. For a list of mandatory parameters for your account, please contact technical support.
System checks incoming request for validity and correctness of control signature. If incoming request is incorrect – System will respond with HTTP Status 400, in case of a validation error - HTTP Status 401.
If request parameter value is set to check or get-status – response will contain current transaction status. If request parameter value is set to pay, any other value or empty value – response will contain a payment link.
Example of a payment request
POST {{url_system}}/acquiring-v2/{paymentSystem}/pay
HEADERS
Content-Type: application/x-www-form-urlencoded
BODY
"orderid": "123456789"
"amount": "300.00"
"dt": "20240701123301"
"control": "b66f2f573e59015a5fae686aaef6207d97698ef79efe09f1aac9a6160710f108"
"merchant_site": "https://123abc.org"
Where the control value is generated using SecretKey = Qwerty123
Signature generation string: 123456789300.0020240701123301Qwerty123
System responds in XML format, UTF-8 encoding (Content-type: application/xml):
Successful response example:
<response>
<result>OK</result>
<txnid>20004410</txnid>
<url>https://{{url_system}}/user/url/Z2Rlc1A2aU85OVQ0N3NtajdIK2VqLzdQMGtONEp0MXpzQ1czUHh0h4Nm9YaHQ3ZVBIQjNCSHJHNjNHpMTQ</url>
</response>
Unsuccessful response example:
<response>
<errorCode>1</errorCode>
<txnid>20004410</txnid>
<description>Something went wrong, please try again or contact support</description>
<paymentStatus>PAY_FAIL</paymentStatus>
</response>
In case of a repeat request with request=pay or absent request parameter System will form a following response:
<response>
<errorCode>9712</errorCode>
<description>Operation 123456789 already exists</description>
<paymentStatus>DUPLICATE TRANSACTION</paymentStatus>
</response>
A list of the main possible errors and their description:
| errorCode | paymentStatus | descpription |
|---|---|---|
| 9712 | DUPLICATE TRANSACTION | Operation %s already exists |
| 9713 | INVALID PROVIDER | Unable to determine provider |
| 9714 | PROCESSING ERROR | Temporary error, please try again later Payment amount is less than allowed! Payment amount is more than allowed! |
| 9908 | ORDER NOT FOUND | Operation %s not found |
Parameters desctiption
- «Result=OK» - Successful transaction initiatization, «errorCode» = error code in case of a failed initialization.
- «txnid» - Unique request identifier within System (Required for «Result=OK»).
- «url» - Payment form URL for User to be redirected to (Required for «Result=OK»).
Callback
After User follows the redirect URL and confirms payment, System sends a callback request containing transaction status to Partner, while User gets redirected to one of the URL's provided by Partner in the initial request – url_success or url_fail depending on payment result.
Callback example:
POST {{partner_url_for_notification}}
BODY
id=20476210&&result=1&cmd=status&control=a5fd50af2baae1298d8e89fde3fcbed25e7e3080a9bdbfd38b8938ad7cab52bb
Callback parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| id | Yes | String | Unique transaction ID in Partner's system |
| result | Yes | Integer | Result code: 0 – Successful operation 1 - Error 2 – Awaiting User input |
| cmd | Yes | String | status for one-stage payments; cancel or confirm for two-stage payments |
| control | Yes | String | Control signature, SHA256-hash ( id + result + SecretKey). where "+" is the concatenation sign, secret_key is the secret key to the Partner's account. |
Expected callback response:
In response to HTTP-request Partner forms a response in XML format, UTF-8 encoding (Content-type: text/plain or application/xml).
<response>
<result>0</result>
<description>success</description>
</response>
| Parameter | Required | Type | Description |
|---|---|---|---|
| result | Yes | Integer | Request processing result code. Can hold following values: 0 – Request successfully accepted by Partner; 1 – Temporary request processing error (request should be resent later), callback request will be retried; 2 – Permanent request processing error (for example, incorrect request parameters), callback request will not be retried. |
| description | No | String | Request result processing description |
Payment status request
POST /acquiring/{Service_ID}/check
, where {Service_ID} – Partner's ID in System.
System checks incoming request for validity and correctness of control signature. If incoming request is incorrect – System will respond with HTTP Status 400, in case of a validation error - HTTP Status 401, in case of not found operation - HTTP Status 404
Request parameters:
| Parameter | Required | Type | Description | Example |
|---|---|---|---|---|
| orderid | Yes | String | Unique transaction identifier within Partner's system | 123456789 |
| dt | Yes | String | Request date and time in yyyyMMddHHmmss format | 20240701233011 |
| control | Yes | String | Control signature. SHA256-hash (orderid + dt + SecretKey)**, where «+» - concatenation sign. | a2cfa5ff904616bbb670ed0b2e7fcef17ac7754cc0105f251bdfe37ce491dd1f |
Example of a payment status request
POST {{url_system}}/acquiring-v2/{Service_ID}/check
HEADERS
Content-Type: application/x-www-form-urlencoded
BODY
"orderid": "123456789"
"dt": "20240701233011"
"control": "a2cfa5ff904616bbb670ed0b2e7fcef17ac7754cc0105f251bdfe37ce491dd1f"
Where the control value is generated using SecretKey = Qwerty123
Signature generation string: 12345678920240701233011Qwerty123
System responds in XML format, UTF-8 encoding (Content-type: application/xml):
Example response for an operation with a successful final status:
<response>
<txnId>20476210</txnId>
<paymentStatus>PAY_OK</paymentStatus>
<paymentStatusDesc>SUCCESS</paymentStatusDesc>
</response>
Example of a response for an operation with an unsuccessful final status:
<response>
<txnId>20476211</txnId>
<description>User did not follow the link</description>
<paymentStatus>PAY_FAIL</paymentStatus>
<paymentStatusDesc>FAIL</paymentStatusDesc>
</response>
Example of a response for an operation that does not exist in the System:
<response>
<errorCode>9908</errorCode>
<description>Operation 123456789 not found</description>
<paymentStatus>ORDER NOT FOUND</paymentStatus>
</response>
Response parameters>:
| Parameter | Required | Type | Description |
|---|---|---|---|
| paymentStatus | Yes | String | INIT_FAIL – Payment initialization failed PAY_OK – Successful payment PAY_FAIL – Failed payment PROCESSING – Payment is processing REF_OK – Successful refund ORDER NOT FOUND – Payment with ordered is not found MANUAL_OK – Successful payment (status corrected manually) MANUAL_FAIL – Unsuccessful payment (manually adjusted status) |
| description | Yes | String | Detailed error description |
| paymentStatusDesc | No | String | Payment status description |
| txnid | No | String | Unique transaction ID within System |
Payment confirmation request
(Available only when two-stage payments are enabled)
POST {url_system}/acquiring-v2/{Service_ID}/confirm
, where {Service_ID} – Partner's ID in System.
System checks incoming request for validity and correctness of control signature. If incoming request is incorrect – System will respond with HTTP Status 400, in case of a validation error - HTTP Status 401, in case of not found operation - HTTP Status 404
Request parameters:
| Parameter | Required | Type | Description | Example |
|---|---|---|---|---|
| orderid | Yes | String | Unique transaction identifier within Partner's system | 123456789 |
| dt | Yes | String | Request date and time in yyyyMMddHHmmss format | 20240701233011 |
| control | Yes | String | Control signature. SHA256-hash (orderid + dt + SecretKey)**, where «+» - concatenation sign. | a2cfa5ff904616bbb670ed0b2e7fcef17ac7754cc0105f251bdfe37ce491dd1f |
System responds in XML format, UTF-8 encoding (Content-type: application/xml):
<response>
<paymentStatus>PAY_OK</paymentStatus>
<paymentStatusDesc>CONFIRMED</paymentStatusDesc>
<txnId>100001900441</txnId>
</response>
Response parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| paymentStatus | Yes | String | INIT_FAIL – Payment initialization failed PAY_OK – Successful payment PAY_FAIL – Failed payment PROCESSING – Payment is processing REF_OK – Successful refund ORDER NOT FOUND – Payment with ordered is not found |
| paymentStatusDesc | Yes | String | Payment status description |
| txnid | Yes | String | Unique transaction ID within System |
| description | Yes | String | Detailed error description |
Hold cancellation request
(Available only when two-stage payments are enabled)
POST {url_system}/acquiring-v2/{Service_ID}/unhold
, where {Service_ID} – Partner's ID in System.
System checks incoming request for validity and correctness of control signature. If incoming request is incorrect – System will respond with HTTP Status 400, in case of a validation error - HTTP Status 401, in case of not found operation - HTTP Status 404
Request parameters:
| Parameter | Required | Type | Description | Example |
|---|---|---|---|---|
| orderid | Yes | String | Unique transaction identifier within Partner's system | 123456789 |
| dt | Yes | String | Request date and time in yyyyMMddHHmmss format | 20240701233011 |
| control | Yes | String | Control signature. MD5-hash (orderid + dt + SecretKey)**, where «+» - concatenation sign. | a2cfa5ff904616bbb670ed0b2e7fcef17ac7754cc0105f251bdfe37ce491dd1f |
System responds in XML format, UTF-8 encoding (Content-type: application/xml):
<response>
<paymentStatus>PAY_FAIL</paymentStatus>
<paymentStatusDesc>UNHOLDED</paymentStatusDesc>
<txnId>100001900441</txnId>
</response>
Response parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| paymentStatus | Yes | String | INIT_FAIL – Payment initialization failed PAY_OK – Successful payment PAY_FAIL – Failed payment PROCESSING – Payment is processing REF_OK – Successful refund ORDER NOT FOUND – Payment with ordered is not found |
| paymentStatusDesc | Yes | String | Payment status description |
| txnid | Yes | String | Unique transaction ID within System |
| description | Yes | String | Detailed error description |
Refund request
! Contact technical support to issue refunds
POST {url_system}/acquiring-v2/{Service_ID}/refund
, where {Service_ID} – Partner's ID in System.
System checks incoming request for validity and correctness of control signature. If incoming request is incorrect – System will respond with HTTP Status 400, in case of a validation error - HTTP Status 401, in case of not found operation - HTTP Status 404
Request parameters:
| Parameter | Required | Type | Description | Example |
|---|---|---|---|---|
| orderid | Yes | String | Unique transaction identifier within Partner's system | 123456789 |
| dt | Yes | String | Request date and time in yyyyMMddHHmmss format | 20240701233011 |
| control | Yes | String | Control signature. MD5-hash (orderid + dt + SecretKey)**, where «+» - concatenation sign. | a2cfa5ff904616bbb670ed0b2e7fcef17ac7754cc0105f251bdfe37ce491dd1f |
System responds in XML format, UTF-8 encoding (Content-type: application/xml):
<response>
<paymentStatus>REF_OK</paymentStatus>
<paymentStatusDesc>REFUNDED</paymentStatusDesc>
<txnId>0000000100001900441</txnId>
</response>
Response parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| paymentStatus | Yes | String | INIT_FAIL – Payment initialization failed PAY_OK – Successful payment PAY_FAIL – Failed payment PROCESSING – Payment is processing REF_OK – Successful refund ORDER NOT FOUND – Payment with ordered is not found |
| paymentStatusDesc | Yes | String | Payment status description |
| txnid | Yes | String | Unique transaction ID within System |
| description | Yes | String | Detailed error description |
Transaction registry request
GET {url_system}/reestr-v2/{type}?service_id={service_id} &dt_start={dt_start} &dt_end={dt_end} &hash={hash}
System checks incoming request for validity and correctness of control signature. If incoming request is incorrect – System will respond with HTTP Status 400, in case of a validation error - HTTP Status 401, in case of not found operation - HTTP Status 404
Request parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| type | Yes | String | Registry format. Possible values: json, csv, xml |
| service_id | Yes | Integer | Partner's identifier within System |
| dt_start | Yes | String | Registry period starting date and time. Format: DD.MM.YYYY HH:mm |
| dt_end | Yes | String | Registry period ending date and time. Format: DD.MM.YYYY HH:mm |
| hash | Yes | String | Control signature. SHA256-hash(dt_start + dt_end + SecretKey)**, where «+» - concatenation sign. |
System will respond with transaction registry in requested format (type).
Example response in XML format:
<?xml version="1.0" encoding="UTF-8"?>
<operations>
<operation>
<id>350087610</id>
<pid>Test_01</pid>
<status>PAY_OK</status>
<created>2023-10-02 14:05:29</created>
<changed>2023-10-02 16:10:03</changed>
<amount>1,00</amount>
<partner_notified>true</partner_notified>
<partnerName>AL/Test Google</partnerName>
<partnerFee></partnerFee>
</operation>
<operation>
<id>350128752</id>
<pid>Test_02</pid>
<status>PAY_FAIL</status>
<created>2023-10-05 09:54:06</created>
<changed>2023-10-05 11:55:03</changed>
<amount>2,00</amount>
<partner_notified>true</partner_notified>
<partnerName>AL/Test Google</partnerName>
<partnerFee></partnerFee>
</operation>
</operations>
Example response in CSV format:
id;pid;status;created;changed;amount;partner_notified;partnerName;partnerFee
"350087610";"Test_01";"PAY_OK";"2023-10-02 14:05:29";"2023-10-02
16:10:03";"1,00";"true";"AL/Test Google";"null"
"350128752";"Test_02";"PAY_FAIL";"2023-10-05 09:54:06";"2023-10-05
11:55:03";"2,00";"true";"AL/Test Google";"null"
"350128767";"Test_03";"INIT_FAIL";"2023-10-05 09:55:26";"2023-10-05
12:00:03";"300,00";"true";"AL/Test Google ";"null"
Example response in JSON format:
[
{
"id": "350087610",
"pid": "Test_01",
"status": "PAY_OK",
"created": "2023-10-02 14:05:29",
"changed": "2023-10-02 16:10:03",
"amount": "1,00",
"partner_notified": "true",
"partnerName": "AL/Test Google",
"partnerFee": "null"
},
{
"id": "350128752",
"pid": "Test_02",
"status": "PAY_FAIL",
"created": "2023-10-05 09:54:06",
"changed": "2023-10-05 11:55:03",
"amount": "2,00",
"partner_notified": "true",
"partnerName": "AL/Test Google",
"partnerFee": "null"
},
{
"id": "350128767",
"pid": "Test_03",
"status": "INIT_FAIL",
"created": "2023-10-05 09:55:26",
"changed": "2023-10-05 12:00:03",
"amount": "300,00",
"partner_notified": "true",
"partnerName": "AL/Test Google",
"partnerFee": "null"
}
]
Response parameters:
| Parameter | Required | Description |
|---|---|---|
| id | String | Unique operation ID in the System |
| pid | String | ID of the operation in the Partner's system |
| status | String | Operation result |
| created | Date-Time | Date and time when the payment operation was created |
| changed | Date-Time | Date and time of the payment operation |
| amount | Decimal | Payment amount |
| partner_notified | Boolean | Indicated whether a notification (callback) was sent to the Partner. Possible values: |
| parameters | String | Additional payment parameters |
| partnerName | String | Partner’s name in the System |
| partnerFee | String | Commission amount for operation |
For this request, the System has set a limit on the maximum number of operations in the response (no more than 20,000 transactions). If the limit is exceeded, an error message will follow with the text:
"Too much data was requested. Reduce the date range or DT\_END parameter to 12.03.2024 14: 29"
, where the specified date is the time when 20,000 transactions were created in the request minus 1 minute.
To get a further report, the Partner must add 1 minute to the specified time and use the new time as the dt_start