Skip to main content

Load the script

Include the JavaScript SDK on each page of your site where your payment form exists. It should always be loaded directly with a script tag rather than included in a bundle.
The script will use window.postMessage to post a message when it has finished loading and is ready for initialization. You can set up a listener to get notified.
Then initialize the SDK with the Payment Token. For a more detailed explanation of the init() method, see the Hosted Fields SDK Reference Docs.