Skip to main content
Every balance and inventory change happens on the server. The client can read state and request a transaction, but it can never write a balance.

Platform wallet

The platform wallet holds the player’s SusaPlay coins, shared across games. Players earn coins by watching rewarded ads, and spend them anywhere on SusaPlay where a developer allows it.

Store catalogue

Items come from the economy config you defined in the Developer Portal. Each item has a money price, and a coin price when you allowed paying with coins:
Disable the coin button while the player’s balance is below coinPrice. These fields need SDK 1.11.0; on older SDKs price carries the coin price.

Spending

The server charges the item’s coin price; your game never sends a price. A spend is refused unless you allowed paying with coins for the item. Grant the item in your game only after Success is true. Never grant optimistically.

Real-money purchases

Checkout is handled by the shell. Your game starts the flow and awaits the outcome — which payment provider takes the money is a platform setting, and your game never names one.
Available top-up packs:
PurchaseResult: A durable item the player already owns is refused before checkout opens: token-failed, with ErrorMessage “Durable item is already owned”. Check the inventory before offering it:
SpendPlatformWallet and ConsumeItem take an optional requestId: retrying with the same one never charges or consumes twice. The purchase call waits up to three minutes — a player has to move through a real checkout. Show a waiting state rather than blocking input.
Entitlements are granted by the payment webhook on the server, not by this return value. If the player closes the tab mid-checkout, the purchase can still complete. Re-read the wallet on the next session rather than assuming a cancelled checkout means no charge.

Sandbox

Every checkout method (StartDirectItemPurchase, StartWalletTopupPurchase) takes a sandbox flag, which requests the test lane:
The server decides whether to grant it. It is granted to platform admins and to a developer on their own games; every other caller transacts live whatever the flag says. A sandbox purchase credits a separate test wallet that never touches the live balance — WalletScope on the result tells you which one you are looking at, so a test purchase is never mistaken for one that failed to credit.

In-app purchases (iOS / Android)

Not supported. SusaPlay runs on WebGL, and the native store receipt-validation path has been removed. Every real-money purchase goes through the browser checkout described above.
An item that cannot be bought with money right now (its price tier is off sale or not set) gives token-failed before checkout opens; check directPurchaseEnabled before showing the button.StartPurchase() is obsolete since SDK 1.11.0. It names no item, and the platform refuses that: use StartDirectItemPurchase(itemId).
SDK 1.5.0 renamed the purchase API off the payment provider: StartXsollaPurchase is now StartPurchase and XsollaPurchaseResult is now PurchaseResult, with no deprecated aliases. A game still using the old names must be updated and rebuilt.