Core Concepts (iOS)
Expanding from Apple's StoreKit Framework to Xsolla Mobile SDK involves several key steps to ensure seamless integration and functionality. Here's a structured breakdown of the core concepts required for supporting an expanded range of payments on iOS:
Authentication and Login
- Awareness of Apple ID / Account: iOS users are typically signed into their Apple ID on their devices, providing a seamless identity layer for transactions.
- 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 Purchases sold via StoreKit Framework: Product SKUs or IAPs within an iOS app are identified via a "Product ID" (e.g., com.game.key_1) with "Reference Names", like "Keys," which might contain a pack of keys valued at one dollar.
- Xsolla Store: To transition these products to Xsolla, developers need to import their App Store In-app Purchase Product IDs (IAP/SKU) into the 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 Purchases from the App Store ecosystem are accurately represented and in-sync for purchase through 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., "key_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 StoreKit Framework.
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.
Alternative Payments and App Store Policies
With recent changes in App Store policies, developers now have more options for implementing alternative payment methods, especially in certain regions. Xsolla Mobile SDK is designed to help navigate these new possibilities while ensuring compliance with Apple's guidelines.
Conclusion
By following these steps, developers can effectively map the Xsolla ecosystem to expand beyond the StoreKit, 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, all while maintaining compliance with iOS platform requirements.