Core Concepts (Android)
Going beyond the Google Play Billing Library, to Xsolla Mobile SDK involves a few essential steps to ensure seamless integration and functionality. Hereโs a structured breakdown of the three core concepts required for supporting expanded range of payments:
Authentication and Loginโ
- Automatic login via Google Play: Users are automatically logged into the Google Play ecosystem via Google Play Services, which naturally happens in background, providing developers with immediate access to an ID used for billing (in a private, yet hidden way).
- Xsolla Login: Xsolla provides developers a way to implement specific login authentication SDK APIs, integrating it with developer's server or relying on client-side authentication methods for simpler games, e.g., hypercasual. These APIs are crucial for passing the user's ID or device ID to Xsolla services, ensuring that users are properly recognized within the Xsolla products (e.g., for seamless recurring payments). Upon successful authentication, Xsolla provides a token that is essential for initiating purchasing flows.
SKU and In-App Purchases (IAP)โ
- In-app products sold via Google Play Billing Library: Product SKU (aka IAP) within an app are identified via a Product ID (e.g., 'com.company.gameapp.keys_1') accompanied by a matching Product Name (e.g., '5 Keys'), which might contain e.g. a pack of keys worth $1.
- Xsolla Store: To transition these products to Xsolla, developers need to import their Google Play In-app Product IDs (aka IAP/SKU) into Xsolla Store Virtual Item catalog (sometimes referred to as IGS or In-Game Store). This product manages the mapping and administration of Virtual Items, ensuring that In-app products from Google Play ecosystem are accurately mirrored in the Xsolla ecosystem.
Initializing the Pay Stationโ
- After setting up SKUs and obtaining an access token (e.g., based on user/device ID, or via server), the next step is to initialize the Pay Station. This is where the actual transaction process begins by forming an order.
- The Pay Station requires both the access token and the specific Virtual Item SKU (e.g., 'keys_1') to process a purchase. Developers need to ensure that both elements are correctly configured to allow users to buy items seamlessly, mirroring the purchase experience they would have via Google Play Billing.
Webhooksโ
Webhooks are notifications about events occurring in the system. When a specific event occurs, Xsolla sends an HTTP request, transmitting event data to your game server (or client, in case of simplified client-only integration e.g. for hypercasual games). These webhooks are essential for the game client and/or server to receive notification on successful/unsuccessful payments and user authentication attempts.
Conclusionโ
By following these steps, developers can effectively map the Xsolla ecosystem to expand beyond Google Play Billing Library, providing a comprehensive alternative that opens up a broader array of payment options globally. This expansion not only supports a more diversified monetization strategy but also enhances user engagement by leveraging Xsollaโs extensive set of value-add solutions.