High-Level Flow
Learn the high-level overview of the Stash Pay integration flow, including how a checkout session is created, presented to the player, and confirmed via webhook. Understand the initial setup requirements and failsafe purchase flow that ensures secure transactions.
This article walks through the high-level Stash Pay integration flow. It covers how a checkout session is created, shown to the player, and confirmed via webhook.
Before you start, you need an API key generated in Stash Studio, our developer portal.
If you don't have access to Stash Studio, contact the Stash team. They'll set up your game instance and enable payment processing for you.
Initial setup requirements
Set up Stash Pay instance
To set up Stash Pay, contact the Stash team. After onboarding, you'll receive access to Stash Studio, our developer portal. Your game instance (including payment processing) will be created for you so you can begin the integration.
Get your API key
Once you have your Stash Studio instance all set up, the only prerequisite is creating your first API key. You’ll use this key to call Stash Pay API endpoints.
Interactive Demo
Payment Flow Overview
Requesting Checkout
Request a checkout session via the Stash API. Provide user details and item data.
Get Checkout URL
Receive a customized URL and a unique checkout ID.
Show Checkout
Display the checkout to the player via redirect, popup, or in-app browser.
Finish Purchase
Once the payment is completed, Stash sends a webhook notification to your backend.
Failsafe Purchase Flow
The failsafe purchase flow ensures players are only charged after your game server confirms item delivery.
Stash pre-authorizes payment, holds the funds, and notifies your game server through a webhook. Your server grants the items and confirms fulfillment before Stash finalizes the charge.
How is this guide?
About Stash Pay
Discover Stash Pay - a direct-to-consumer payment system designed for games and apps that offers a modern alternative to traditional in-app purchases. Integrate through browser checkout, in-game popups, websites, or custom shops.
Integrating Stash Pay
Learn how to integrate Stash Pay into your game or app with minimum setup. This guide covers creating checkout links, displaying checkouts in browser or in-app, and handling webhook events for secure payment processing.