Skip to main content
Skip table of contents

Developer Docs

Learn to set up and accept payments through Google PayTM

Merchants can now support Google PayTM as a payment method using XPay on their websites.

Currently, XPay supports Google PayTM via SDKs only, and merchants are advised to use the respective SDK to render the GPay option and then proceed with confirmPayment() SDK method as usual.

1. XPay Element

  • Merchants need to use the XPay Element v4 SDK.

SDK URL

React Package

  • npm i @xstak/xpay-element-stage-v4

  • npm i @xstak/xpay-element-live-v4

But first, merchants should test integration on their staging for UAT environments.

2. XPay Flutter SDK

Use the following Flutter package version to enable Google PayTM.

CODE
// for production
dependencies:
  xpay_element_flutter: ^3.3.0

// for stagging
dependencies:
  xpay_element_flutter_stage: ^3.6.0

3. Support for Google PayTM Button

Currently, XPay doesn’t support paying with the Pay with Google Pay button rendered separately. You are advised to use XPay SDKs and enable GPay as per the docs below.

4. Enabling Google PayTM

  • Google PayTM will only work with the Bank Alfalah gateway at the moment. If BAFL MIDs are not added to XAP account gateways, the Google PayTM option won’t show.

  • In the XPay staging environment, Google PayTM works by default.

Go-Live CheckList

  • Google PayTM needs to be enabled on Bank Alfalah MIDs.

  • The merchant website domain, including the subdomain where the XPay Element Google PayTM would be rendered, will need to be whitelisted by Google.

    • Merchants will need to apply here.

  • To go live with Google PayTM on Flutter, you need to publish your app on the Google Play Store and then apply for live approval via the Google PayTM & Wallet Console using the same published app.

Enable Google PayTM on XAP

  1. Go to XAP Store settings and click Edit Store Setting.

  2. Add the Google Merchant ID value to the respective field.

  1. From store settings on XAP, the Google PayTM option needs to be enabled.

image-20250627-101321.png

5. Card Networks Supported

Currently, we support Visa, MasterCard, and AMEX.

6. Authorization Methods

We support both PAN_ONLY and CRYPTOGRAM_3DS. In case of PAN_ONLY, 3DS flow will be triggered but with CRYPTOGRAM_3DS tokenized payment will be performed.

7. Gateway & Gateway Merchant ID

XPay SDK automatically fills these values for the Google Pay IsReadyToPayRequest method. But adding further details for merchant clarification.

  1. Gateway Merchant ID is the public key passed in the SDK instance.

  2. Gateway value will be xpaybyxstak

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.