Skip to main content

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:

NameTypeDescriptionRequired
AcceptStringApplication/jsonYes

Request:

NameTypeDescriptionRequired
merchant_idIntegerMerchant idYes
reference_idStringMerchant order numberYes
secret_keyStringThe 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
descriptionStringDescriptionNo
amountFloatOrder amountYes
tokenStringEncrypted token received from GoogleYes

Response:

NameTypeDescriptionRequired
successBooleanRequest resultYes
messageStringResponse messageYes
error_codeIntegerError codeNo

Example:

Success response: 
{
"success": true,
"message": "Успешно"
}
Error response:
{
"success": false,
"message": "Decoding Failed",
"error_code": 103
}