The XPay SDK allows you to render multiple payment methods dynamically based on store configurations.
To render all available payment methods, simply load the SDK without specifying paymentMethods
. If the store has card, JazzCash, or Easypaisa gateways configured, the respective options will be displayed else only the card payment option will be available.
Currently, the XPay SDK supports Card , JazzCash, EasyPaisa and Google Pay payment methods. By default, both methods render within the same element with tabs. However, if you want to render them separately, follow the steps below.
paymentMethods: ["card"]
for the Card payment element.paymentMethods: ["jazzcash"]
for the JazzCash payment element.paymentMethods: ["easypaisa"]
for the Easypaisa payment element.paymentMethods: ["googlepay"]
for the Google Pay payment element.paymentMethods: ["card", "jazzcash", "googlepay", "easypaisa"]
, they will be combined into a single element with tabbed options for each method.<aside> 💡
You need to use the V4 SDK version.
Stage Env: https://js.xstak.com/v4/xpay-stage.js
React NPM Package: "@xstak/xpay-element-stage-v4": "^1.1.2"
The URL for the live environment will be added soon.
</aside>
index.html
file.