Integration overview
Stash Webshop integration has three core components. You can implement them in any order, but start with account linking to simplify the integration process. 1. Setup account linking- Implement account linking methods.
- Set up your login provider (Apple, Google, Facebook, custom JWT/OIDC).
- Static (Managed Catalog): Set up in Stash Studio. Use this option for stable catalogs.
- Real-time Catalog: Sync the catalog in real time from your game server.
- Authorizes the payment and holds the funds.
- Calls your backend to grant items, or delivers a webhook after the charge, depending on how the shop is configured.
- Captures the charge only after your backend grants, when the shop grants through
ConfirmPayment. - Uses signed webhooks for secure, reliable communication.
Setup account linking
Stash Webshop supports two authentication methods — Direct Sign-in (SSO) in the browser, and Account Linking via deep links and QR codes for passwordless login through the game client. Pick the method that fits your players, configure one or more identity providers in Stash Studio, then implement the chosen flow.Authentication Methods
Compare Direct Sign-in (SSO) and Account Linking and choose which to implement.
Authentication Providers
Configure Apple, Google, Facebook, Game Center, Play Games, Cognito, or custom JWT/OIDC.
Account Linking Setup
Deep link scheme, game client handling, and session-code API call.
Catalog and assets setup
Stash Webshop supports two catalog approaches. Pick the one that matches your team’s workflow and infrastructure.- Managed catalog
- Real-time catalog
Recommended for new integrations — configure and launch your webshop entirely in Stash Studio with no code required. Best for stable catalogs that don’t change frequently per player.Setup:For full configuration details, see the Managed Catalog guide.
1
In Stash Studio, select your game.
2
Navigate toWebshop→Products.
3
Create and configure your products with images, descriptions, and pricing.
4
Organize products into sections and set visibility rules.
Processing events
Stash Webshop notifies your backend about a purchase in one of two ways, fixed when the shop is configured.Granting through ConfirmPayment
This is the failsafe pattern, and the only one where your server can reject a purchase.
1
Authorization: Stash authorizes the payment. The funds are held, not taken.
2
Item granting: Stash calls
ConfirmPaymenton your server, which validates the purchase and grants the items.3
Capture: Stash captures the charge, but only after your server returns success. A decline or a failed call means no capture and no charge.
4
Notification: Stash queues a
PURCHASE_SUCCEEDEDwebhook once the capture request is accepted.Granting from the webhook
1
Authorization and capture: Stash authorizes the payment and captures it.
2
Notification: Stash queues a
PURCHASE_SUCCEEDEDwebhook.3
Item granting: your backend consumes the event and grants the items.
PURCHASE_SUCCEEDED, where the source field is "Cart" for Webshop purchases.
Stash Webshop also emits optional analytics events (
LOGGED_IN, MUTATE_CART, VIEW_ITEM, VIEW_CATALOG_SECTION, VIEW_CHECKOUT_PAGE, VIEW_PRODUCT_DETAIL_PAGE, CART_BUTTON_CLICK, BUY_NOW_ITEM_CLICK, PAY_BUTTON_CLICK, OPEN_PAYMENT, FREE_ITEM_REDEEMED) that you can subscribe to for cart-abandonment tracking, product interest, and free-item claims. Most carry checkoutSessionId, which ties a browsing session’s events to its purchase (see Webshop session). See the Webhook List for full payload schemas.Configuring webhooks
Configure your webhook endpoint URL and authentication in Stash Studio under Settings → Webhooks, then implement a listener that verifies the signature and grants items idempotently. See the webhook guides for full implementation details:- Webhooks Overview — configure webhooks in Stash Studio
- Webhook Listener — create a listener and verify signatures
- Webhook List — all event types and payload structures
- Webhook Retries — retry behavior and idempotent handlers
Testing your integration
To test your Stash Webshop integration, use test card numbers that work with Stash’s test environment. These test cards allow you to complete transactions without creating real charges, making it safe to test your integration repeatedly.Environment Requirements:
- Test/Development/Staging: Use test cards only. Test cards work in test environments and will be rejected in production.
- Production: Use real, live payment cards only. Real cards are required for production transactions and will be rejected in test environments.
- Use test cards in your development and staging environments only
- Verify that webhooks are received correctly for test transactions
- Test the complete purchase flow from catalog browsing to item granting
- Confirm that your server properly verifies and grants items after test purchases
- Test account linking flows with different authentication providers
- Always verify you’re using the correct environment (test vs production) before processing transactions
Next steps
After you complete the core steps, add features to improve your webshop:- UI customization: Customize the webshop appearance in Stash Studio to match your brand.
- Advanced analytics: Track KPIs and player behavior in Stash Studio dashboard.
- Loyalty programs: Set up promotions and rewards with web-exclusive offers and promo codes.
- Performance optimization: Run load tests and optimize your deployment with Stash Studio monitoring tools.