Skip to content

About

📦 Stash Pay in-app purchases and Stash webshop authentication for native games and apps.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

385 Commits

Folders and files

Repository files navigation

Stash Native Lint Build & Deploy

Stash Native logo

Stash Native adds Stash Pay checkout and Stash webshop account linking to native iOS and Android games and apps. For web pages and web apps, use stash-web.

Documentation: stashgg.github.io/stash-native

Game Engine Wrappers

Unity and Unreal Engine games use these wrappers instead of installing Stash Native directly.

Engine Repository
Unity Unity stash-unity
Unreal Engine Unreal Engine stash-unreal

Installation

Prebuilt packages are on GitHub Releases. The core package covers the Checkout Card and In-Game Browser. QR Code Linking needs the optional StashNativeCodeLink module.

iOS 15 or later. In Xcode, choose File > Add Package Dependencies, enter https://github.com/stashgg/stash-native.git, and add the StashNative library. Without Swift Package Manager, embed StashNative.xcframework.

Android API 21 or later. Copy the AAR into app/libs/ and add it with its dependencies:

dependencies {
    implementation files('libs/StashNative-<tag>.aar')
    implementation 'androidx.core:core:1.12.0'
    implementation 'androidx.webkit:webkit:1.11.0'
    implementation 'androidx.window:window:1.4.0'
    implementation 'androidx.window:window-java:1.4.0'
}

Optional browser dependency: Package Installation. Scanner module setup: QR Code Linking.

Checkout Card

Checkout card on iPhone, unfolded iPhone Duo, and iPad

Shows Stash Pay checkout in a native card over the game. The card fits phones, tablets, foldables, and split screen.

// iOS
StashNative.sharedInstance().openCard(withURL: checkoutURL, from: self, config: nil)
// Android
StashNative.getInstance().openCard(activity, checkoutUrl, null);

Docs: Checkout Card

In-Game Browser

Checkout in Safari View Controller on iPhone and Chrome Custom Tabs on Android

Opens checkout or webshop links in Safari View Controller (iOS) or Chrome Custom Tabs (Android) without leaving the game.

// iOS
StashNative.sharedInstance().openBrowser(withURL: url, from: self)
// Android
StashNative.getInstance().openBrowser(activity, url);

Docs: In-Game Browser

QR Code Linking

QR code scanners on iPhone and Android

Links a player's Stash webshop account by scanning the QR code the webshop shows. Needs the optional StashNativeCodeLink module.

// iOS
StashNative.sharedInstance().openScanner(from: self, config: nil)
// Android
StashNative.getInstance().openScanner(activity, null);

Docs: QR Code Linking

Sample Apps

Open the iOS sample in Xcode, or run ./gradlew :sample:installDebug from Android/. To try the card without a checkout link, open https://test.stashpreview.com. Docs: Sample Apps

Versioning and Support

Releases follow Semantic Versioning; see the changelog. Integration guides are on docs.stash.gg. Questions: developers@stash.gg.

About

📦 Stash Pay in-app purchases and Stash webshop authentication for native games and apps.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages