Installing the Embedded SDK

Learn how to configure the widget player using the Flux Panda embedded SDK.

The Flux Panda Player can be configured in many ways to match your preferred workflow. In this guide we will cover the basic configuration for you to receive orders from the Flux Panda Player in Widget Mode and Standalone Mode using our Embedded SDK.

Configure your Flux Panda Channel

Login to your Flux Panda Account and make the following changes to the Channel Settings.

  1. Turn on External checkout.
  2. Set the Checkout type to Redirection (HTTP GET)
  3. Add the URL of your e-commerce store where the Embedded SDK is installed (Customers that access the Flux Panda Player in Standalone Mode will be redirected to this page upon checkout)
  4. Set the Redirection type to Same Window (only relevant for the Standalone Mode)
24122412

Initializing the Embedded SDK

The Embedded SDK takes a number or arguments to customize the experience. Please refer to our API reference for more details.

You can find your API Key in the Embedded SDK add-on in the Flux Panda admin panel.

Here is a sample of the most basic configuration:

FluxPlayer.init({
    apiKey: 'YOUR-API-KEY',
    channelId: 'YOUR-CHANNEL-ID',
    onCheckout: function (data) {
        // This function is called whenever user clicks 
        // the "Checkout" button inside the player
    }
}).then((initialized) => {
    // Widget player is now initialized
    if (initialized) {
        FluxPlayer.open();
    }
});

👍

Test your integration

Once you have installed the Embedded SDK, you can test your integration by calling FluxPlayer.open(); from the JavaScript console in your browser.