Repository
github.com/stashgg/stash-web
NPM Package
@stashgg/stash-pay
Playground
Live config and callback playground.
Install the SDK
- React component (
@stashgg/stash-pay) - Framework-agnostic API (
@stashgg/stash-pay/vanilla) - Script-tag UMD bundle (
window.StashPay.open(...))
Presentation modes
React component
Use this when checkout state is controlled by your app UI and component lifecycle.Vanilla API
Use this when you want framework-agnostic control.Script-tag UMD (WebGL-friendly)
Use this in plain HTML or embedded game contexts (including Unity WebGL pages).Available parameters
The SDK options are shared across React, vanilla, and UMD integrations (except where noted).For the full and always up-to-date API surface, refer to the package docs on npm: @stashgg/stash-pay.
Open checkout from websites and WebGL shells
For web games and launcher-style web surfaces, keep checkout orchestration at the page shell level:- Request checkout URL from your backend
- Open Stash Pay from React, vanilla API, or UMD bridge
- Handle callbacks for UX updates
- Confirm final purchase state on backend before granting entitlements
Playground and implementation testing
Use the Stash Pay Playground to:- test checkout URL behavior quickly
- validate config changes and visual options
- inspect callback events in real time
Detailed references
- Repository and sample app: stash-web
- SDK package details: @stashgg/stash-pay on npm
- Interactive playground: pay-playground.stashpreview.com
- Backend flow reference: /guides/stash-pay/integration