License Activation (Windows)

Using Paddle licenses to manage app access requires creation of a Paddle SDK Product in your seller dashboard, or enabling Paddle licensing on a recurring subscription plan.

Activation Dialog

The SDK provides a standard license activation dialog, which can be invoked whenever the app is found in an unlicensed state:

// Create the Product we want to work with:
PaddleProduct product = PaddleProduct.CreateProduct(ProductId,
                                                    ProductType.SDKProduct,
                                                    null);

// Refresh to ensure we have up to date information locally for the product
// Remote trial values will supersede local
product.Refresh((success) =>
{
    if (success)
    {
        Paddle.Instance.ShowProductAccessWindowForProduct(product);
    }
});

Programmatic (“Silent”) Activation

If you’re making use of our licensing but want to use your own UI then you’ll need to make the activation call manually and handle the result:

product.ActivateWithEmail("example@email.com",
                          "A1B2C3-D4E5F6-G7H8I9",
                          (state, errorMessage) =>
                          {
                              // Handle the activation result
                          });
Automatic Post-Purchase Activation

Programmatic activation can be used to retrieve a license key returned in a checkout completion block and automatic and automatically activate the license. This saves the user the job of copying and pasting the license into the activation dialog and can reduce the volume of licensing-related support requests.


Override Licensing UI

You can also override our activation UI. This will cause the SDK to use your custom window instead of the built-in Licensing Window.

To do this you need to ensure your window implements the ILicenseWindow interface and inject into the Paddle Instance by calling the following method:

Paddle.Instance.OverrideLicenseWindow<MyLicenseWindow>();