There are 2 ways to initialize the SDK:

Option 1 | Pass a configuration object

  1. Create a configuration object called ConfigModel:
ConfigModel config = new ConfigModel(
  checkoutPublicKey = "XXXXXXXxxxxxxxXXXXXXXxxxxxxXXXXXXXX",
  environment = "sandbox", // "sandbox" or "production"
  customerId = "PLAYER_ID"
)
ArgumentTypeRequired?Description
checkoutPublicKeystringYesThe checkout public key, located in the Publisher Dashboard. In the sidebar menu, click Settings, then select the Integration tab. Copy the Checkout Public Key value.
environmentstringYesThe checkout environment.
One of:
- sandbox: For testing.
- production: For live operations.
customerIdstringYesThe player ID.
  1. Initialize the SDK via the UpdateController instance with the ConfigModel:
UpdateController.Instance.Init(ConfigModel config, IUpdateCallback callback) {...}
ArgumentTypeDescription
configConfigModelConfiguration options for the initialization.
callbackIUpdateCallbackInterface callback.

Option 2 | Pass arguments directly

Initialize the SDK via the UpdateController instance with the individual arguments:

UpdateController.Instance.Init(
  string environment,
  string checkoutPublicKey,
  string customerId,
  IUpdateCallback callback
) {...}
ArgumentTypeDescription
environmentStringThe checkout environment.
One of:
- sandbox: For testing.
- production: For live operations.
checkoutPublicKeyStringThe checkout public key, located in the Publisher Dashboard. In the sidebar menu, click Settings, then select the Integration tab. Copy the Checkout Public Key value.
customerIdStringThe player ID.
callbackIUpdateCallbackInterface callback.