GUIDE / UNITY

A web store for a Unity game, step by step

How a Unity game sells packs on the web: your backend signs a player token, the game opens the store with openStore(playerToken) or purchase(sku, token) from a retained GameObject, the return URL comes back through your link handler, and your backend grants on a signed webhook. With the Unity SDK's current status stated plainly (preview, source only) and the fallback that works today.

Updated

A web store for a Unity game is mostly a backend project; the Unity side is a token request, one call, and a URL handler. This page is the whole integration in order, with the current status of the Unity package stated plainly, because that's the first thing a Unity developer should know.

Status first

The Appside Unity package (UPM tarball on the SDK status page) is a preview: source only, not yet compiled and tested inside Unity by us. Its API is the same as the tested SDKs (configure, openStore, purchase, handle), so the integration below is the intended shape. Until we publish a tested status, treat it as a reference and use one of the tested routes for production: the web SDK in a WebView, or the native iOS/Android SDKs through a platform bridge. We'd rather write that here than have you discover it in a build.

The shape

Unity game ──(ask)──▶ your backend ──(signed player token)──▶ Unity game
Unity game ──openStore(token)──▶ platform browser ──▶ web store (signed in)
web store ──order.paid webhook (signed)──▶ your backend ──grant──▶ wallet
web store ──return URL──▶ Unity game ──handle(url)──▶ refresh balance from your backend

1. Your backend: the player token

Behind the game's own login, an endpoint that signs a token for the player: player ID, expiry within five minutes, your key ID, optional attributes for targeting (level, spender tier, country, new player). The public key is registered once in the Studio (reference, explained). Node and Python server SDKs do the signing.

2. Unity: configure, open, handle

Attach the SDK component to a retained GameObject (one that survives scene loads). At startup, configure(storeId, mode, returnURL). When the player taps the store:

// Unity (preview API; see status above)
var token = await Backend.FreshPlayerToken();   // your call, behind your login
await Appside.openStore(token);                  // whole store
// or, for one pack:
await Appside.purchase("voyager", await Backend.FreshPlayerToken());

Each launch needs a fresh token; don't cache it. The store opens in the platform browser, in your game's look, signed in.

3. The return link

Register the exact return URL in Studio → Integration and in your app's link handling (Universal Links on iOS, App Links on Android, deep links). Pass incoming URLs to handle(url). The result tells the game what happened so it can refresh the balance from your backend. It's a hint, not the proof.

4. Your backend: the webhook

The proof is the signed order.paid webhook: verify the signature, grant once per order_id, return 200 (reference). order.refunded reverses with the same ID. If the player closes the browser before returning, the grant still happens, because it never depended on the client.

5. The game reads the balance from your backend

Unity shows what your backend says the wallet holds. Never credit currency in the client from a return URL. That rule is the whole security model, and it's the same one you already follow for in-app purchases if the receipt is validated server-side.

Testing the loop

Use a test card first: buy a pack from your own build, watch the webhook arrive, see the balance move. The quickstart has the Unity snippet next to the other platforms, and the SDK page will say when the Unity package moves from preview to tested.

What's not in this page

Platform rules on where you may show the link (US iOS after the 2025 order, enrolled Google Play developers in the US, other regions separately): see the iOS and Google Play pages. Pricing, tax and refunds: the cost, tax and refund guides.

Create your store free. No card needed to start; 3.9% per successful payment.

Frequently asked questions

Is there a Unity SDK for Appside?

A preview: the Unity package is published as source (a UPM tarball), not yet compiled and tested inside Unity by us. Its API matches the other SDKs (configure, openStore, purchase, handle). We publish that status rather than call it done; until it's verified, the web SDK through a WebView or the platform SDKs through a native bridge are the tested routes.

What does the Unity side have to do?

Very little. Ask your backend for a player token, call openStore or purchase with it, and pass incoming URLs (the return link) to the SDK's handle method so the balance refreshes. The grant never happens in the client.

Where is the player's wallet?

On your backend. The store tells your backend what was paid through a signed webhook; your backend credits the wallet; the game reads the balance from your backend. Unity never holds the truth about currency.

Does this work on both iOS and Android builds?

The store opens in the platform browser (a browser sheet on iOS, Custom Tabs on Android) and returns through a Universal Link or App Link to your return URL. Where you can link from the game depends on the platform rules by region.

What if my game has no backend?

You need one for the web store: something must sign the player token and receive the webhook. A small server is enough; the demo game''s backend is one Node file with SQLite.

Sources

Related

SEE IT YOURSELF

Build your store
before the first call.

Try the live demo ↗Create your store
LET’S TALK

Book a demo

Connect with Oded to arrange a walkthrough of Appside.

Contact Oded on LinkedIn ↗