Overlay Embed

The Overlay embed implementation allows you to embed the Paychant widget into your app or website. This method of integration opens the Paychant widget as a pop-up overlay on your app or website when the Javascript SDK is loaded. No new tab, this experience enables users to remain on your app or website.

Using the Paychant Javascript SDK

The method for this implementation is by placing the Paychant SDK right into your HTML files using a script tag, and the SDK will load via a CDN. Below is how to do the integration.

<!DOCTYPE html>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <!-- Paychant SDK -->
    <button type="button" onclick="triggerPaychant()">
      Buy & Sell with Paychant

    <!-- Start Paychant on button click -->
    <script type="application/javascript">
      const triggerPaychant = () => {
        new PaychantWidget({
           env: 'production',
           action: 'buy',
           partnerApiKey: [YOUR_PRODUCTION_PARTNER_API_KEY]',
           partnerLogoUrl: [YOUR_BRAND_LOGO_URL],
           partnerThemeColor: [YOUR_BRAND_THEME_COLOR],
           callback: {
              onClose: function() {
                 // console.log('window closed');
              onStatus: function(txStatus) {
                 // console.log(txStatus);

By clicking the button, the Paychant widget is going to pop up.

The available configuration parameters that can be passed to Paychant, can be found here.

Last updated