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
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
Raw variants
Every parsed field has araw 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.
methodandusdValuetogether 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.