Skip to main content
This async method initializes the SDK with information about the loyalty program and the currently logged-in customer. This method must be called before you can interact with other methods provided by the SDK.
If you’re loading the SDK script asynchronously, you should wrap your initialization code with a loaded event to ensure it doesn’t encounter an error due to the script not yet being present on the page.

Parameters

object
required

Returns

This method returns a Promise that:
  • On success, resolves to void. The SDK will be initialized and ready for use.
  • On failure, rejects with an error object.
If the method is improperly invoked (e.g. missing publishableKey), the Promise will be rejected.