Core Concepts (Android)
Going beyond the Google Play Billing Library, to Xsolla SDK involves a few essential steps to ensure seamless integration and functionality. Below is a structured breakdown of the three core concepts required for supporting expanded range of payments.
Authentication and Login
-
Google Play Sign-In ↗ (https://support.google.com/googleplay/answer/3129346): Users are automatically logged into the Google Play ecosystem via Google Play Services, which naturally happens in background, providing developers with an ID for billing (in a private but 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)
-
Google Play Billing ↗ (https://developer.android.com/google/play/billing/getting-ready#products): In Google Play Billing, products (also known as SKUs or IAPs) are identified by a unique Product ID (e.g., 'com.company.gameapp.keys_1') and a descriptive Product Name (e.g., '5 Keys'). For instance, '5 Keys' might represent a key pack priced at $1.
-
Xsolla Store: Xsolla Store serves as your central catalog for digital goods, known as Virtual Items. To transition from Google Play Billing, developers need to import their existing In-app Product IDs (IAPs/SKUs) here, ensuring seamless mapping and accurate mirroring of all products within the Xsolla ecosystem.
Initializing the Pay Station
-
The Pay Station serves as the gateway for your users' purchases. It requires both the access token and the specific Virtual Item SKU (e.g., 'keys_1') to process a transaction. Developers must ensure these elements are correctly configured, enabling users to buy items seamlessly, mirroring the purchase experience they would have via Google Play Billing.
-
With your Virtual Items set up and an access token obtained (e.g., based on user/device ID or via your server), the next crucial step is to initialize the Pay Station. This is where the actual transaction process begins by forming an order.
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.