Skip to main content

INITIALIZATION

Initialization

After configuring, the Xsolla SDK for Windows needs to be initialized and connected to Xsolla services.

var storeClient = XsollaStoreClient.Builder.Create()
.SetConfiguration(configuration)
.SetOnRestore((item, error) => {
if (error != null)
{
// handle error
return;
}

// handle delayed purchased item
})
.AddProducts(productIds)
.AddProduct("product1")
.AddProduct("product2")
.AddProduct("product3")
.AddProduct("product4")
.Build();

storeClient.Initialize((products, error) =>
{
if (error != null)
{
// handle error
return;
}

// products contains all requested products
});

The SDK loads only Virtual Items from your Xsolla Catalog — Virtual Currency, Bundles, and other catalog types are not returned.