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:
"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.
"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 Name | Type | Length | Required | Description |
|---|---|---|---|---|
| Order Information | ||||
| merNo | String | 5 | Yes | Merchant Number; unique ID assigned by the payment platform |
| gatewayNo | String | 8 | Yes | Gateway Access No.; unique ID for merchant access |
| orderNo | String | 50 | Yes | Store Order No.; unique, no duplicates in the same store system |
| orderCurrency | String | 3 | Yes | Payment currency (3-digit ISO 4217 code; see Appendix) |
| orderAmount | String | 10 | Yes | Total order amount; 2 decimal places, rounded if needed |
| shipFee | String | 100 | No | Shipping fee; numeric, max 2 decimals |
| discount | String | 100 | No | Discount; default negative, numeric, max 2 decimals |
| goodsInfo | String | 5000 | Yes | Detailed goods info; see Appendix: Goods Information |
| Credit Card Information | ||||
| tradeType | String | 50 | Yes | Transaction type; fixed: GOOGLEPAY (required for wallet payments) |
| cardToken | String | 500 | Yes | payment data generated by Google Pay js. payment data example |
| User Information | ||||
| firstName | String | 100 | Yes | First name |
| lastName | String | 50 | Yes | Last name |
| String | 200 | Yes | User email | |
| ip | String | 100 | Yes | User IP address |
| phone | String | 50 | Yes | User phone |
| country | String | 100 | Yes | User country (ISO 3166-1 2-letter code, e.g., US) |
| state | String | 100 | No | User state/province |
| city | String | 100 | Yes | User city |
| address | String | 500 | Yes | User detailed address |
| zip | String | 100 | Yes | User ZIP/postal code |
| Consignee Information | ||||
| shipFirstName | String | 100 | No | Consignee first name |
| shipLastName | String | 100 | No | Consignee last name |
| shipEmail | String | 100 | No | Consignee email |
| shipPhone | String | 100 | No | Consignee phone |
| shipCountry | String | 100 | No | Consignee country (ISO 3166-1 2-letter code) |
| shipState | String | 100 | No | Consignee state/province |
| shipCity | String | 100 | No | Consignee city |
| shipAddress | String | 100 | No | Consignee detailed address |
| shipZip | String | 100 | No | Consignee ZIP/postal code |
| Device/OS Information | ||||
| os | String | 50 | Yes | Cardholder OS |
| brower | String | 50 | Yes | Browser type |
| browerLang | String | 50 | Yes | Browser language |
| timeZone | String | 50 | Yes | Time zone |
| resolution | String | 50 | Yes | Screen resolution |
| Other Information | ||||
| webSite | String | 200 | Yes | Source website domain |
| notifyUrl | String | 200 | Yes | Asynchronous notification URL; platform POSTs result here; reply OK. Asynchronous Notification Example |
| returnUrl | String | 200 | Yes | Real-time return URL; for 3D Secure redirection |
| signInfo | String | 32 | Yes | SHA256 signature; fixed order: merNo+gatewayNo+orderNo+orderCurrency+orderAmount+tradeType+cardToken+merKey; no spaces or + . For details, please refer to the appendix: SHA256 Signature Method. |
| remark | String | 500 | No | Merchant 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 Name | Type | Max Length | Description |
|---|---|---|---|
| merNo | String | 5 | Merchant Number |
| gatewayNo | String | 8 | Gateway Access No. |
| tradeNo | String | 50 | Platform transaction serial number (unique) |
| orderNo | String | 50 | Merchant order number |
| orderCurrency | String | 3 | Order currency (ISO 4217) |
| orderAmount | String | 10 | Order amount |
| orderStatus | String | 1 | Transaction status:-1=Pending 0=Failed 1=Success 5=Failed (3D abandoned) |
| orderInfo | String | 100 | Transaction result message |
| billAddress | String | 100 | Billing descriptor (success only) |
| returnType | String | 1 | Return type: 1(Browser real-time) 2(Server real-time) 3(Server asynchronous) |
| orderErrorCode | String | 50 | Error code; 00 = success |
| signInfo | String | 32 | SHA256 signature: merNo+gatewayNo+tradeNo+orderNo+orderCurrency+orderAmount+orderStatus+orderInfo+merKey |
| remark | String | 500 | Merchant remark (as-is) |
| redirectUrl | String | 500 | 3D 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 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 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
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
merKeycorrectness 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
0for empty values - Currency matches the order currency
- All symbols are half-width
Example:
Good1#,#ID1#,#10.00#,#2#;#Good2#,#ID2#,#15.50#,#1Transaction Currency ISO 4217
| Code | Description EN | Description CN |
|---|---|---|
| CNY | Chinese Yuan | 人民币 |
| USD | US Dollar | 美元 |
| HKD | Hong Kong Dollar | 港币 |
| GBP | Pound Sterling | 英镑 |
| JPY | Japanese Yen | 日元 |
| EUR | Euro | 欧元 |
| AUD | Australian Dollar | 澳元 |
| SGD | Singapore Dollar | 新加坡元 |
| NZD | New Zealand Dollar | 新西兰元 |
| TWD | New Taiwan Dollar | 台币 |
| KRW | South Korean Won | 韩元 |
| DKK | Danish Krone | 丹麦克朗 |
| MYR | Malaysian Ringgit | 马币 |
| THB | Thai Baht | 泰铢 |
| INR | Indian Rupee | 印度卢比 |
| PHP | Philippine Peso | 菲律宾比索 |
| CHF | Swiss Franc | 瑞士法郎 |
| SEK | Swedish Krona | 瑞典克朗 |
| ILS | Israeli New Shekel | 新谢克尔 |
| ZAR | South African Rand | 兰特 |
| RUB | Russian Ruble | 卢布 |
| NOK | Norwegian Krone | 挪威克朗 |
| AED | UAE Dirham | 迪拉姆 |
| ARS | Argentine Peso | 阿根廷比索 |
| BRL | Brazilian Real | 巴西雷亚尔 |
| MMK | Myanmar Kyat | 缅币 |
| CAD | Canadian Dollar | 加元 |
| COP | Colombian Peso | 哥伦比亚比索 |
| HUF | Hungarian Forint | 匈牙利福林 |
| IDR | Indonesian Rupiah | 印尼卢比 |
| KWD | Kuwaiti Dinar | 科威特第纳尔 |
| LAK | Laotian Kip | 老挝基普 |
| MXN | Mexican Peso | 墨西哥比索 |
| NGN | Nigerian Naira | 尼日利亚奈拉 |
| PLN | Polish Złoty | 波兰兹罗提 |
| QAR | Qatari Riyal | 卡塔尔里亚尔 |
| SAR | Saudi Riyal | 沙特里亚尔 |
| TRY | Turkish Lira | 新土耳其里拉 |
| VND | Vietnamese Dong | 越南盾 |
Error List
| Code | Description |
|---|---|
| I0001 | Merchant No. cannot be empty |
| I0002 | Gateway No. cannot be empty |
| I0003 | Encryption Value cannot be empty |
| I0004 | Merchant No. and Gateway No. mismatch |
| I0005 | Merchant No. not activated |
| I0006 | Merchant No. disabled |
| I0007 | Merchant No. does not exist |
| I0008 | Abnormal merchant status |
| I0009 | Gateway Access No. not activated |
| I0010 | Gateway Access No. disabled |
| I0011 | Gateway Access No. deleted |
| I0012 | Abnormal gateway status |
| I0013 | Invalid signInfo |
| I0014 | Test gateway → production interface |
| I0015 | Production gateway → test interface |
| I0016 | Gateway not bound to this interface |
| I0017 | Order No. cannot be empty |
| I0018 | Order No. over 50 chars |
| I0019 | Order amount cannot be empty |
| I0020 | Invalid order amount |
| I0021 | Amount must have ≤2 decimals and ≥0 |
| I0022 | Currency cannot be empty |
| I0023 | Invalid currency |
| I0024 | Return URL cannot be empty |
| I0025 | Return URL over 1000 chars |
| I0059 | Required parameter missing |
| I0060 | Invalid parameter length |
| I0061 | Successful txn exists for this order (24h) |
| I0062 | System exception |
| I0067 | Remark over 500 chars |
| I0068 | Two-party verification failed |
| I0069 | Please select payment method |
| I0070 | Please select payment type |
| I0071 | IP cannot be empty |
| I0072 | Invalid IP format |
| I0092 | Invalid payment method |
| I0115 | Order not found |
| I0132 | Transaction type cannot be empty |
| I0133 | Invalid transaction type |
| I0134 | Appid cannot be empty |
| I0135 | Openid cannot be empty |
| I0136 | Goods info cannot be empty |
| R0000 | High risk |
| R0001 | Website not submitted/approved |
| R0002 | Cross-border transaction |
| C0001 | Gateway not bound to channel |
| C0002 | Rate not set |
| E0001 | Operation timeout |
| E0008 | Duplicate payment |
| T0001 | Test payment success |
| U0001 | Cardholder cancelled |
SHA256 Signature Method
Java
signInfo=sha256(merNo+gateWayNo+orderNo+orderCurrency+orderAmount+tradeType+cardToken+merKey);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.
//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
{
"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
$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";
}