Pay3 Javascript SDK

Initialize using script tag

3min

Include script dependency

When using script dependency you can include the javascript's url with in the head section of the application. X.Y.Z is the version of the javascript file, for instance: https://pay3.money/pay3-sdk-pay/index.global.1.2.3.js

index.js


This script creates a singleton instance of the Pay3 class and exports an object window.pay3Pay

init()

Init saves the parameters which will be used during future function calls. It also registers a listener to listen for messages from Pay3. Pay3 team shares hostname and clientId during onboarding.

Parameters

  1. hostname: Pay3 will be opened in a new window using this hostname prefix. The host name is environment dependent.
  2. clientId: A unique client ID is created by the Pay3 team to identify the client application. The client ID is environment dependent.
  3. lang (optional, default value 'en'): This parameter specifies the language preference for the Pay3 SDK. The strings used follow two letter language code as in ISO 639-1. Example pt for Portuguese, en for English.
index.js