Integration overview
Learn more about integrating Stash Web Shop
Integrating Stash Web Shop happens in partnership with Stash's engineering team. For custom web shops, Stash handles most of the integration work. This reduces engineering effort on your end, and allows for creating custom online experiences for your players. When integrating Stash Web Shop, there are three core milestones.
1. Set up account linking
Account linking ties your players' accounts to the web shop without them having to enter an email address and password. Players complete the process by scanning a QR code on desktop or clicking a deep-link button on mobile to complete authentication. This is required so that you can grant players the correct items based on their purchases. Stash supports several identity providers, including custom providers if you built your own. Stash also supports direct sign-in, meaning players log in to the web shop with their game account instead of linking accounts.
2. Process purchases
For each transaction, Stash verifies that the player has enough funds to cover the purchase. You then need to grant the player their items and notify Stash to charge the player. To enable this flow, you create an endpoint on your backend for authorizing purchases that Stash calls for every purchase.
To process all events in the web shop, including analytics, you have the option to integrate our webhooks. Webhooks allow you to listen to Stash events and then perform logic on your end. For example, when players make purchases, you might want to update their accounts or show in-game notifications. Internally, you might also have a finance team that wants to be notified of refunds or failed purchases.
3. Configure your catalog
Stash offers both static and dynamic catalogs. To use a static catalog, you manually enter your items in Stash Studio and update them whenever you want.
Dynamic
To personalize the experience, Stash automatically retrieves the products available for a specific user, along with data on how to position that product on the page, its purchase limits and rules, time availability, and visualizations. To use dynamic catalogs, create an API endpoint that allows Stash to fetch:
- Item assets to display in the shop.
- Enough player data so appropriate items and functionality are shown to players.
- Updates on item availability, time-boxed offers, etc.
Implementing a dynamic catalog means you can use the same catalog for your shop on mobile and web. You don't have to maintain different catalogs per channel because you define the catalog on your end, and Stash pulls the catalog every time the web shop loads. This is sometimes referred to as a unified catalog.
Updated 3 months ago