Search documentation

Find pages, sections, and content across all docs.

WavedashDocs

Paid content

Check what a player owns and open the paywall from your game

Paid Content lets players unlock part of your game with a one-time in-game purchase. You define the locked files, price, and paywall appearance in the Developer Portal (see Monetization); the SDK lets your game check ownership and open the paywall, keyed by the content identifier you set on each offer.

isEntitled and getEntitlements are UI hints; use them to decide what to show, not as the lock itself. Wavedash re-checks ownership when it serves the paid files, so locked content stays protected even if a client-side check is bypassed.

Checking entitlement

isEntitled returns whether the player already owns a content identifier; use it to unlock content on load or to decide whether to show the paywall.

func check_full_version():
    var result = await WavedashSDK.is_entitled("full-version")
    if result.success and result.data:
        unlock_full_version()
bool owned = await Wavedash.SDK.IsEntitled("full-version");
if (owned)
    UnlockFullVersion();
const result = await Wavedash.isEntitled("full-version");
if (result.success && result.data) {
  unlockFullVersion();
}

Listing everything a player owns

getEntitlements returns every content identifier the player owns for your game, so you can gate several items in one call.

func load_entitlements():
    var result = await WavedashSDK.get_entitlements()
    if result.success:
        for id in result.data:
            print("Owns: ", id)
List<string> owned = await Wavedash.SDK.GetEntitlements();
foreach (var id in owned)
    Debug.Log($"Owns: {id}");
const result = await Wavedash.getEntitlements();
if (result.success) {
  for (const id of result.data) console.log("Owns:", id);
}

Opening the paywall

triggerPaywall opens the Wavedash-rendered checkout for a content identifier. It resolves immediately if the player already owns it; otherwise it opens the modal and resolves with whether the purchase completed.

func on_unlock_pressed():
    var result = await WavedashSDK.trigger_paywall("full-version")
    if result.success and result.data:
        unlock_full_version()
bool purchased = await Wavedash.SDK.TriggerPaywall("full-version");
if (purchased)
    UnlockFullVersion();
const result = await Wavedash.triggerPaywall("full-version");
if (result.success && result.data) {
  unlockFullVersion();
}

After a successful purchase, ownership refreshes automatically, so isEntitled returns true and your next request for the paid files is authorized without a reload.

Godot signal alternative. If you prefer signals over await, these calls also emit got_is_entitled, got_entitlements, and paywall_resolved when their response arrives.

Example: gating the full version

Check ownership on load, then open the paywall when the player taps the locked content.

func _ready():
    var result = await WavedashSDK.is_entitled("full-version")
    set_full_version_unlocked(result.success and result.data)

func on_locked_track_pressed():
    var result = await WavedashSDK.trigger_paywall("full-version")
    if result.success and result.data:
        set_full_version_unlocked(true)
async void Start()
{
    bool owned = await Wavedash.SDK.IsEntitled("full-version");
    SetFullVersionUnlocked(owned);
}

public async void OnLockedTrackPressed()
{
    bool purchased = await Wavedash.SDK.TriggerPaywall("full-version");
    if (purchased)
        SetFullVersionUnlocked(true);
}
const owned = await Wavedash.isEntitled("full-version");
setFullVersionUnlocked(owned.success && owned.data);

async function onLockedTrackPressed() {
  const result = await Wavedash.triggerPaywall("full-version");
  if (result.success && result.data) setFullVersionUnlocked(true);
}