Google Pay™
[POST] api/google-pay/direct
ATTENTION:
Google Pay is an online payment system that allows you to make in-app and website purchases. The system allows users to make payments online from the Internet, as well as using Android phones, tablets and watches. Before integrating with Tarlan Payments, you need to read the documentation.
Types of integration and official Google documentation. The supported integration type for websites is Web. For this integration, you need to read the following information: Google Pay for websites documentation, Google Pay for websites integration checklist, Google Pay for websites branding guidelines.
To use Google Pay, you need to sign up for Google Pay & Wallet Console and get a Google Merchant ID. All merchants must comply with the Acceptable Use Policy and the Google Pay API Terms of Service.
For options:
gateway parameter must be set to tarlanpayments;
gatewayMerchantId parameter must be your Google Merchant ID;
Supported authentication methods: PAN_ONLY and CRYPTOGRAM_3DS. Supported card networks are Visa and MasterCard.
There is no need to transfer the billing address.The payment token received from Google must be passed in the token parameter in string format. It must be transferred in the same form in which you received it from Google. The rest of the options are described below.
Headers:
Name | Type | Description | Required |
---|---|---|---|
Accept | String | Application/json | Yes |
Request:
Name | Type | Description | Required |
---|---|---|---|
merchant_id | Integer | Merchant id | Yes |
reference_id | String | Merchant order number | Yes |
secret_key | String | The secret_key field must be formed by concatenating the parameters: reference_id + secret key (secret key in your admin account). The resulting result needs to be wrapped in bcrypt, where the hash input modifier (salt/round) is 10. | Yes |
description | String | Description | No |
amount | Float | Order amount | Yes |
token | String | Encrypted token received from Google | Yes |
Response:
Name | Type | Description | Required |
---|---|---|---|
success | Boolean | Request result | Yes |
message | String | Response message | Yes |
error_code | Integer | Error code | No |
Example:
Success response:
{
"success": true,
"message": "Успешно"
}
Error response:
{
"success": false,
"message": "Decoding Failed",
"error_code": 103
}