Skip to content

Google Pay™

Preparations

Google Pay™ Web Integration Guide

If you intend to integrate via Google Pay™, you must complete the preparations required by Google Pay before connecting to this interface. For detailed requirements, please refer to the Google Pay integration documentation.

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 Google Pay web brand guidelines, without modifications to the Google Pay asset colors, proportions, or appearance.

You need to integrate a web application with the Google Pay API based on the Google Pay Web developer documentation, Google Pay Web integration checklist and Google Pay Web Brand Guidelines ,obtain the corresponding payment token, and submit it to our interface.

When integrating Google Pay,you are required to follow the Google Pay and Wallet API's Acceptable Use Policy and accept the terms defined in the Google Pay API Terms of Service.

We support VISA, Mastercard, American Express, and JCB card networks with the Google Pay API. You can define these values in the allowedCardNetworks property and find the appropriate values in Google Pay's web developer documentation

A billing address is required for Google Pay, ensure that you include required parameters. For more details, see BillingAddressParameters.

Billing address request example:

json
"allowedPaymentMethods": [
    {
        "type": "CARD",
        "parameters": {
            "billingAddressRequired": true,
            "billingAddressParameters": {
                "phoneNumberRequired": true,
                "format": "MIN"
            },
            "allowedCardNetworks": ["VISA","MASTERCARD","AMEX","JCB"],
            "allowedAuthMethods": ["PAN_ONLY","CRYPTOGRAM_3DS"]
        },
        "tokenizationSpecification": {...}
    }
]

Once the integration criteria is fulfilled, proceed with registration on the Google Business console

Prepare gateway & gatewayMerchantId

We support gateway integration for Google Pay; we handle decryption on your behalf.

When you integrate with the Google Pay API as a merchant, ensure to set the following values in the TokenizationSpecification object:

  • gateway: fireantpay

  • gatewayMerchantId : In the merchant platform, under the Merchant > Merchant Information section, you can find the gatewayMerchantId.

Set in TokenizationSpecification.

json
"tokenizationSpecification": {
    "type": "PAYMENT_GATEWAY",
    "parameters": {
        "gateway": "fireantpay",
        "gatewayMerchantId": "<YOUR_GATEWAY_MERCHANT_ID>"
    }
}

3DS Requirements for Google Pay™ Transactions

Google Pay provides two different authorization methods: PAN_ONLY and CRYPTOGRAM_3DS.

Our integration with Google Pay supports two types of card credentials:

  • PAN_ONLY: physical card details stored in Google Pay™.

    • 3DS required: yes, standard 3DS flow applies.
    • Supported country: Europe, US, and Canada.
  • CRYPTOGRAM_3DS: tokenized virtual card stored on device.

    • 3DS required: no, authentication is performed by Google Pay™.
    • Supported country: US only .

For PAN_ONLY transactions, 3DS authentication is required if the transaction is subject to PSD2 (e.g., in the EEA/UK). When 3DS authentication is required, the redirectUrl field in the interface response will return the 3DS authentication URL. The merchant needs to redirect the user's browser to this URL to guide them through the 3DS authentication process. After the authentication is completed, the transaction results will be notified to the merchant via notifyUrl, with redirection back to the merchant’s online store via returnUrl.

Payment Request

Payment Interface Request

  • Fill in relevant information according to the example format.
  • Submit fields using the exact field names in the table below; parameter names are case-sensitive.
  • All commands sent to this system gateway use the POST method and UTF-8 encoding.
  • Trim leading/trailing spaces from every parameter value before combining, encrypting, and submitting payment parameters.

Payment Flow

Google Pay

This interface uses server-to-server integration (not browser form submission). The browser URL remains unchanged during the entire payment process.

1.The payer selects products on the merchant’s store (e.g., SHOPLINE) and proceeds to payment.

2.The merchant’s client checks whether the device/browser supports Google Pay. If supported, Google Pay is launched; if not, it falls back to other payment methods.

3.The payer clicks the Google Pay button and selects a credit card from the list to pay. The Google Pay server generates an encrypted payment data packet and returns it to the merchant’s client. The merchant then submits the encrypted data to Fireantpay to complete the process.

4.The merchant’s client submits the payment data and order information to Fireantpay (payment service provider). The backend assembles the request and submits it to this interface.

5.If PAN_ONLY mode triggers 3D Secure authentication, you need to redirect to the redirectUrl to complete verification. If CRYPTOGRAM_3DS mode is used, 3D Secure authentication is not required.

6.After the transaction succeeds, Fireantpay notifies the merchant of the transaction result asynchronously.

7.If the merchant does not receive the transaction callback from Fireantpay and the order status remains unknown, the merchant must call Fireantpay’s single order query interface to check the transaction result.

Form Parameter Format Description

Param NameTypeLengthRequiredDescription
Order Information
merNoString5YesMerchant Number; unique ID assigned by the payment platform
gatewayNoString8YesGateway Access No.; unique ID for merchant access
orderNoString50YesStore Order No.; unique, no duplicates in the same store system
orderCurrencyString3YesPayment currency (3-digit ISO 4217 code; see Appendix)
orderAmountString10YesTotal order amount; 2 decimal places, rounded if needed
shipFeeString100NoShipping fee; numeric, max 2 decimals
discountString100NoDiscount; default negative, numeric, max 2 decimals
goodsInfoString5000YesDetailed goods info; see Appendix: Goods Information
Credit Card Information
tradeTypeString50YesTransaction type; fixed: GOOGLEPAY (required for wallet payments)
cardTokenString500Yespayment data generated by Google Pay js. payment data example
User Information
firstNameString100YesFirst name
lastNameString50YesLast name
emailString200YesUser email
ipString100YesUser IP address
phoneString50YesUser phone
countryString100YesUser country (ISO 3166-1 2-letter code, e.g., US)
stateString100NoUser state/province
cityString100YesUser city
addressString500YesUser detailed address
zipString100YesUser ZIP/postal code
Consignee Information
shipFirstNameString100NoConsignee first name
shipLastNameString100NoConsignee last name
shipEmailString100NoConsignee email
shipPhoneString100NoConsignee phone
shipCountryString100NoConsignee country (ISO 3166-1 2-letter code)
shipStateString100NoConsignee state/province
shipCityString100NoConsignee city
shipAddressString100NoConsignee detailed address
shipZipString100NoConsignee ZIP/postal code
Device/OS Information
osString50YesCardholder OS
browerString50YesBrowser type
browerLangString50YesBrowser language
timeZoneString50YesTime zone
resolutionString50YesScreen resolution
Other Information
webSiteString200YesSource website domain
notifyUrlString200YesAsynchronous notification URL; platform POSTs result here; reply OK. Asynchronous Notification Example
returnUrlString200YesReal-time return URL; for 3D Secure redirection
signInfoString32YesSHA256 signature; fixed order: merNo+gatewayNo+orderNo+orderCurrency+orderAmount+tradeType+cardToken+merKey; no spaces or + . For details, please refer to the appendix: SHA256 Signature Method.
remarkString500NoMerchant custom remark (returned as-is)


Payment Interface Response

Interface Description

After receiving and processing the merchant’s order, the gateway returns the payment result in real time in XML format with UTF-8 encoding.

Return Data Description

Parse the XML response first, then judge the payment result. See the example below.

Form Parameter Format Description

Param NameTypeMax LengthDescription
merNoString5Merchant Number
gatewayNoString8Gateway Access No.
tradeNoString50Platform transaction serial number (unique)
orderNoString50Merchant order number
orderCurrencyString3Order currency (ISO 4217)
orderAmountString10Order amount
orderStatusString1Transaction status:-1=Pending 0=Failed 1=Success 5=Failed (3D abandoned)
orderInfoString100Transaction result message
billAddressString100Billing descriptor (success only)
returnTypeString1Return type: 1(Browser real-time) 2(Server real-time) 3(Server asynchronous)
orderErrorCodeString50Error code; 00 = success
signInfoString32SHA256 signature: merNo+gatewayNo+tradeNo+orderNo+orderCurrency+orderAmount+orderStatus+orderInfo+merKey
remarkString500Merchant remark (as-is)
redirectUrlString5003D Secure redirect URL

Payment Return Example

When the PAN_ONLY type is used and 3DS authentication is required, the response example is as follows:

xml
<?xml version="1.0" encoding="UTF-8"?>
<respon>
<merNo>80000</merNo>
<gatewayNo>80000001</gatewayNo>
<tradeNo>N025050101235959566838</tradeNo>
<orderNo>Test-123456</orderNo>
<orderAmount>10.00</orderAmount>
<orderCurrency>USD</orderCurrency>
<orderStatus>-1</orderStatus>
<orderErrorCode></orderErrorCode>
<orderInfo></orderInfo>
<returnType>2</returnType>
<billAddress>Test Descriptor</billAddress>
<signInfo>B359F45698D1CE8A341C64815D346C9EDA8F14657D997901EA4D30FFODFC232A</signInfo>
<remark></remark>
<redirectUrl>http://sandbox.fireantpay.com/ccpg/threeDSProcessingPage?threeDSToken=92095B5D2549DC544625F8B432D47A63</redirectUrl>
</respon>

When 3DS authentication is not required, the response example is as follows:

xml
<?xml version="1.0" encoding="UTF-8"?>
<respon>
<merNo>80000</merNo>
<gatewayNo>80000001</gatewayNo>
<tradeNo>N025050101235959566838</tradeNo>
<orderNo>Test-123456</orderNo>
<orderAmount>10.00</orderAmount>
<orderCurrency>USD</orderCurrency>
<orderStatus>1</orderStatus>
<orderErrorCode>00</orderErrorCode>
<orderInfo>Approved</orderInfo>
<returnType>2</returnType>
<billAddress>Test Descriptor</billAddress>
<signInfo>B359F45698D1CE8A341C64815D346C9EDA8F14657D997901EA4D30FFODFC232A</signInfo>
<remark></remark>
<redirectUrl></redirectUrl>
</respon>

Asynchronous Notification Example

clojure
Content-Type: application/x-www-form-urlencoded

merNo=80000&gatewayNo=80000001&tradeNo=N025050101235959566838&orderNo=Test-123456&orderAmount=10.00&orderCurrency=USD&orderStatus=1&orderErrorCode=00&orderInfo=Approved&returnType=2&billAddress=Test%20Descriptor&signInfo=B359F45698D1CE8A341C64815D346C9EDA8F14657D997901EA4D30FFODFC232A&remark=&redirectUrl=

Common Errors

I0013: Signature Value (signInfo) Error

  • Check merKey correctness and case consistency.
  • Use SHA256 signature.
  • Remove all leading/trailing spaces from combined parameters.

I0014: Test Gateway Access No. → Production Payment Gateway

  • Use the test gateway during development.
  • Contact support to switch the merchant number to production after testing.

I0015: Production Gateway Access No. → Test Payment Gateway

  • After switching to production, update the submission URL in your code to the production endpoint.

E0008: Duplicate Payment

  • Multiple submissions for the same order within a short window (≈30s) are blocked to prevent duplicate payments.

Appendix

Goods Information

Format (fixed order):

GoodsName#,#GoodsID#,#UnitPrice#,#Qty#;#NextGoods...
  • Separate fields with #,#
  • Separate goods with #;#
  • Use 0 for empty values
  • Currency matches the order currency
  • All symbols are half-width

Example:

Good1#,#ID1#,#10.00#,#2#;#Good2#,#ID2#,#15.50#,#1

Transaction Currency ISO 4217

CodeDescription ENDescription CN
CNYChinese Yuan人民币
USDUS Dollar美元
HKDHong Kong Dollar港币
GBPPound Sterling英镑
JPYJapanese Yen日元
EUREuro欧元
AUDAustralian Dollar澳元
SGDSingapore Dollar新加坡元
NZDNew Zealand Dollar新西兰元
TWDNew Taiwan Dollar台币
KRWSouth Korean Won韩元
DKKDanish Krone丹麦克朗
MYRMalaysian Ringgit马币
THBThai Baht泰铢
INRIndian Rupee印度卢比
PHPPhilippine Peso菲律宾比索
CHFSwiss Franc瑞士法郎
SEKSwedish Krona瑞典克朗
ILSIsraeli New Shekel新谢克尔
ZARSouth African Rand兰特
RUBRussian Ruble卢布
NOKNorwegian Krone挪威克朗
AEDUAE Dirham迪拉姆
ARSArgentine Peso阿根廷比索
BRLBrazilian Real巴西雷亚尔
MMKMyanmar Kyat缅币
CADCanadian Dollar加元
COPColombian Peso哥伦比亚比索
HUFHungarian Forint匈牙利福林
IDRIndonesian Rupiah印尼卢比
KWDKuwaiti Dinar科威特第纳尔
LAKLaotian Kip老挝基普
MXNMexican Peso墨西哥比索
NGNNigerian Naira尼日利亚奈拉
PLNPolish Złoty波兰兹罗提
QARQatari Riyal卡塔尔里亚尔
SARSaudi Riyal沙特里亚尔
TRYTurkish Lira新土耳其里拉
VNDVietnamese Dong越南盾

Error List

CodeDescription
I0001Merchant No. cannot be empty
I0002Gateway No. cannot be empty
I0003Encryption Value cannot be empty
I0004Merchant No. and Gateway No. mismatch
I0005Merchant No. not activated
I0006Merchant No. disabled
I0007Merchant No. does not exist
I0008Abnormal merchant status
I0009Gateway Access No. not activated
I0010Gateway Access No. disabled
I0011Gateway Access No. deleted
I0012Abnormal gateway status
I0013Invalid signInfo
I0014Test gateway → production interface
I0015Production gateway → test interface
I0016Gateway not bound to this interface
I0017Order No. cannot be empty
I0018Order No. over 50 chars
I0019Order amount cannot be empty
I0020Invalid order amount
I0021Amount must have ≤2 decimals and ≥0
I0022Currency cannot be empty
I0023Invalid currency
I0024Return URL cannot be empty
I0025Return URL over 1000 chars
I0059Required parameter missing
I0060Invalid parameter length
I0061Successful txn exists for this order (24h)
I0062System exception
I0067Remark over 500 chars
I0068Two-party verification failed
I0069Please select payment method
I0070Please select payment type
I0071IP cannot be empty
I0072Invalid IP format
I0092Invalid payment method
I0115Order not found
I0132Transaction type cannot be empty
I0133Invalid transaction type
I0134Appid cannot be empty
I0135Openid cannot be empty
I0136Goods info cannot be empty
R0000High risk
R0001Website not submitted/approved
R0002Cross-border transaction
C0001Gateway not bound to channel
C0002Rate not set
E0001Operation timeout
E0008Duplicate payment
T0001Test payment success
U0001Cardholder cancelled

SHA256 Signature Method

Java

java
signInfo=sha256(merNo+gateWayNo+orderNo+orderCurrency+orderAmount+tradeType+cardToken+merKey);

PHP

php
$signInfo=hash("sha256",$merNo.$gateWayNo.$orderNo.$orderCurrency.$orderAmount.$tradeType.$cardToken.$merKey);

Google Pay Payment Data

You need to refer to Google's Tutorial to obtain the payment data. The payment data contains the payment token and other data we need. You need to pass the entire payment data to us.

js
//Refer to Step 9 in Google's Tutorial, you can obtain the payment data through the paymentsClient. 
paymentsClient.loadPaymentData(paymentDataRequest).then(function(paymentData){
   // Please pass the entire payment data to us as the cardToken parameter in our interface.
  const cardToken = JSON.stringify(paymentData);
}).catch(function(err){
  // show error in developer console for debugging
  console.error(err);
});

Google Pay Payment Data Example

json
{
  "apiVersion": 2,
  "apiVersionMinor": 0,
  "paymentMethodData": {
    "description": "Test Card: Visa •••• 1111",
    "info": {
      "assuranceDetails": {
        "accountVerified": true,
        "cardHolderAuthenticated": false
      },
      "cardDetails": "1111",
      "cardFundingSource": "CREDIT",
      "cardNetwork": "VISA"
    },
    "tokenizationData": {
      "token": "{\"signature\":\"MEYCIQDevxpK7wCKIeKWSctph5XaFHIliZny8XLaCbJjYTPe/QIhANTTPQXZhbXqdeDAGdm+TVzmeSNIpGg8584x28AlCvCR\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHeJFV5RiBvt2N2wNy6A\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"1775121013140\\\"}\",\"signatures\":[\"MEQCICGh1LYitMMNCb+2i+iIP8QR/0lCbwaIeorsHOQtLCGLAiBeKWML5diXND6eWSyREpsWr/g7shRhJKe2aovJqPO2zg\\u003d\\u003d\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"gv+gp98+2UtJbC8UCXtGni8Tu7Y"}\"}",
      "type": "PAYMENT_GATEWAY"
    },
    "type": "CARD"
  }

Payment Submission Example PHP

php
$data = array(
    'merNo'             => $merNo,
    'gatewayNo'         => $gatewayNo,
    'orderNo'           => $orderNo,
    'orderAmount'       => $orderAmount,
    'orderCurrency'     => $orderCurrency,
    'shipFee'           => $shipFee,
    'firstName'         => $firstName,
    'lastName'          => $lastName,
    'email'             => $email,
    'phone'             => $phone,
    'zip'               => $zip,
    'address'           => $address,
    'city'              => $city,
    'state'             => $state,
    'country'           => $country,
    'shipFirstName'     => $shipFirstName,
    'shipLastName'      => $shipLastName,
    'shipPhone'         => $shipPhone,
    'shipEmail'         => $shipEmail,
    'shipCountry'       => $shipCountry,
    'shipState'         => $shipState,
    'shipCity'          => $shipCity,
    'shipAddress'       => $shipAddress,
    'shipZip'           => $shipZip,
    'returnUrl'         => $returnUrl,
    'notifyUrl'         => $notifyUrl,
    'shipMethod'        => $shipMethod,
    'signInfo'          => $signInfo,
    'cardToken'         => $cardToken,
    'tradeType'       =>   $tradeType,
    'ip'                => $ip,
    'os'                => $os,
    'brower'            => $brower,
    'browerLang'        => $browerLang,
    'timeZone'          => $timeZone,
    'resolution'        => $resolution,
    'goodsInfo'         => $goodsInfo
);

// Submit via CURL to FireAnt Payment Gateway
$result = curl_post('https://sandbox.fireantpay.com/TPInterface', http_build_query($data));
$xmlstring = simplexml_load_string($result, 'SimpleXMLElement', LIBXML_NOCDATA);
$value_array = json_decode(json_encode($xmlstring), true);

// If the token is of type PAN_ONLY, the user is required to complete 3DS authentication.
// The redirectUrl field in the response will provide the 3DS authentication URL.
// You need to redirect to this URL in the browser to allow the user to complete the 3DS authentication.
if (!empty($value_array['redirectUrl'])) {
    header('Location:'.$value_array['redirectUrl']);
    exit;
}

// Get order status
$orderStatus = $value_array['orderStatus'];
if ($orderStatus == "1") {
    echo "Payment Successful";
}