Skip to main content
Version: 1.6.0

WebStore

The Webstore module allows opening the 101XP web store from inside the application.

Configuration is done via the Settings Inspector in Unity.

Configuration is applied automatically at build time for each platform.

Platform markers

The following markers are used to indicate platform availability of parameters and features:

  • (no marker) — Shared parameter or feature
  • 🍏 — iOS-specific parameter or feature
  • 🤖 — Android-specific parameter or feature
  • ⚠️ — Not implemented in the Unity plugin yet

Ask your release manager for the required parameters before configuring the SDK.

Configure

Settings Inspector

FieldDescription
Web Store Project NameProject name used by the Webstore

All fields must be provided for the Webstore to open correctly.

Usage

Open Webstore

To open the Webstore using the values configured in the Settings Inspector:

P101XP.GetInstance().ShowWebStore(null, null);

Method signature:

void ShowWebStore(Dictionary<string, string> purchaseProperties, List<string> allowedLocale);
  • purchaseProperties — optional URL properties appended to the final Webstore URL as key=value.
  • allowedLocale — optional list of allowed locale codes (e.g., en, ru).

Open Webstore with parameters

You can optionally pass additional parameters when opening the Webstore:

var parameters = new Dictionary<string, string>
{
{ "source", "game" },
{ "campaign", "summer_event" },
};

var allowedLocale = new List<string> { "en", "ru" };

P101XP.GetInstance().ShowWebStore(parameters, allowedLocale);

Callback

The native SDK reports whether the Webstore was shown successfully via a result callback:

void OnShowWebStoreResult(ShowWebStoreResult result)
{
// Handle result
}

P101XP.GetInstance().ShowWebStoreEvent += OnShowWebStoreResult;

ShowWebStoreResult

public class ShowWebStoreResult
{
public bool success;
public string error;
}

Check purchase in Webstore

Plugin supports checking whether an item was purchased in the Webstore:

P101XP.GetInstance().CheckMobilePurchase("item_name");

Handle the result in the purchase-check callback:

void OnCheckMobilePurchase(CheckMobilePurchaseResult result)
{
if (!string.IsNullOrEmpty(result.error))
{
// Handle error
return;
}

// result.bought == true => purchased in Webstore
}

P101XP.GetInstance().CheckMobilePurchaseEvent += OnCheckMobilePurchase;

CheckMobilePurchaseResult

public class CheckMobilePurchaseResult
{
public string itemName;
public bool bought;
public string error;
}