1
Include Tazapay’s JavaScript (JS) file (client-side)
2
Fetch token for a payment session (server-side)
3
Instantiate Tazapay’s Javascript SDK using the token (client-side)
Step 1: Include Tazapay’s Javascript (JS) file (client-side)
Add the below snippet to your application to load Tazapay’s Javascript SDKSandbox (test environment)
<script type="text/javascript" src="https://js-sandbox.tazapay.com/v2.0-sandbox.js"></script>
Production (live environment)
<script type="text/javascript" src="https://js.tazapay.com/v2.0.js"></script>
Step 2: Fetching token for a session (server-side)
You can fetch the token from the response of the checkout session. Please refer to this document for creating a checkout session.Checkout API response
Step 3: Instantiate Tazapay’s Javascript SDK using token (client-side)
Once you have loaded Tazapay’s Javascript file into your client-side application using Step 1, you can instantiate Tazapay’s UI component for that particular payment using the clientToken that you have passed onto your client side (Refer Step 2).You can refer to the following code snippets to instantiate Tazapay’s UI component on your website/application for a particular checkout session:
-
Keep the division tag in your application to load the UI component.
Division Tag
-
Instantiate UI component for checkout using token and other parameters
Instantiation