Stash API
Explore Stash API Endpoints
Generate loyalty URL
Generates a loyalty URL for the authenticated user. This URL provides access to the user's loyalty program and rewards.
Approve custom login
Used to approve custom login requests using JWT authentication (For exampe Apple ID, Google or other JWT based login providers). This is a server-side endpoint and should not be called from the client.
Approve Apple Game Center login
Approves authentication using Apple Game Center. Validates the player's Game Center credentials and logs in the user into the webshop.
Approve Facebook login
Approves authentication using Facebook. Validates the player's Facebook credentials and logs in the user into the webshop.
Approve Google Play login
Approves authentication using Google Play Games. Validates the player's Google Play credentials and logs in the user into the webshop.
Generate loyalty URL
Generates a loyalty URL for the authenticated user. This URL provides access to the user's loyalty program and rewards.
Save authentication tokens temporarily
Allows game backends to save access and refresh tokens temporarily, returning a short code challenge that can be passed via launcher deeplinks.
Link
Link Apple Game Center
Link Google Play
Generate quick pay URL (server)
Generates a quick payment URL for server-side operations. This endpoint is used internally for creating payment links with user information.
Force Logout user
Logs out a user by invalidating their session. This endpoint is typically called when a user signs out of the game or switches to another account.
Generate authenticated URL
Generates an authenticated URL for a specific target (home or loyalty) for a user. This endpoint is used for server-side URL generation.
Get payment event by ID
Retrieves payment details by ID. Returns information about items, pricing, and payment status. This is a server-side endpoint and should not be called from the client.
Get user preferences
Retrieves the payment channel preference for a specific user. Returns 404 NotFound if no preference is set.
Set user preferences
Creates or updates the payment channel preference for a user. This is a server-side endpoint and should not be called from the client.
List available plans for a shop
Get plan by code
Get plan by ID
List subscriptions for a player
Validate subscription access (for game server-to-server calls)
Get subscription by ID
Cancel a subscription
Get subscription history
Reactivate a cancelled subscription
Game Server APIs
APIs you can expose on your game backend server to power a WebShop via Dynamic Catalog, and/or StashPay checkout links.
Get product catalog
Retrieves the complete product catalog including all purchasable items, offer chains, and non-purchasable display items organized in rows.
Get offer details
Retrieves detailed information about a specific offer, including reward details and tabbed content with structured data tables for each item.
Get player by ID
Retrieves an existing player by ID. Returns player information including profile data and in-game currency balance.
Cancel pending payment
Step 2B: Cancels a pending purchase that was previously registered. IMPORTANT: Always expects HTTP 200 OK response with inline error codes in the body.
Confirm payment completion
Step 2A: Confirms and completes a pending purchase that was previously registered. IMPORTANT: Expects HTTP error status (3xx, 4xx, 5xx) codes for failed purchases.
Register payment intent
Step 1: Registers a purchase intent with the game backend. The game backend is expected to reserve inventory for the purchase. IMPORTANT: Always expects HTTP 200 OK response with inline error codes in the body.
How is this guide?