Skip to main content
The withdrawal itself happens inside the ZBD modal, but your game usually wants to know it happened — to refresh a balance display, fire a celebration, or log the cashout to your own analytics. Two events fire when a player completes a withdrawal: Both fire on every successful withdrawal, so existing integrations that only listen to OnWithdraw keep working unchanged.
OnWithdrawWithData requires Unity SDK v1.1.7 or above.

Subscribing

Always unsubscribe in OnDestroy to avoid holding a reference to a destroyed object.

The payload

ZBDWithdrawalSuccessData is always non-null, but individual fields may be unset — which fields arrive depends on the payout method the player chose.

Always present (when the web app sends them)

Method-specific

The numeric fields are nullable (long?, decimal?) and the strings can be null. Null-check before using them — a method that doesn’t provide a destination, or a web app that omitted a field, will leave them unset rather than zero or empty.

Raw variants

Every parsed field has a raw string counterpart: rawMethod, rawEarningType, amountRaw, usdValueRaw, amountInCurrencyRaw. These carry exactly what the rewards web app sent, before the SDK parsed it into an enum or number. Use them when method or earningType comes back Unknown — a new payout method the SDK doesn’t recognise yet will still have its name in rawMethod, which means your analytics keep working without an SDK upgrade.

What to use it for

  • Refresh your balance display. The player’s balance has changed; re-read it with GetBalance.
  • Celebrate. A completed cashout is the strongest moment in the whole journey — the Player Communication Guide covers making it feel like a level-up rather than a receipt.
  • Log the cashout to your analytics. method and usdValue together tell you which payout options your players actually use and what they’re worth, which is what you need to decide which options to promote.