Skip to main content
Use the following function to initialize the SDK:
This initialization method is sufficient if you’ve already set the Environment and Checkout Public Key fields in the configuration file. If you prefer to set these values programmatically, use the initialization method described in the next section.

Re-initialize the SDK

You may need to re-initialize the SDK in the following cases:
  1. When switching environments at runtime, for example, when testing the SDK.
  2. When certain configuration details are managed manually instead of being defined in the configuration file.
In such cases, re-initialize the SDK using the extended method below:
Always ensure the correct environment and checkoutPublicKey are used when re-initializing. Incorrect values can cause failed checkout validations.