Reward Unit
In the ZBD Earn SDK, rewards are sent as units. A unit is a configurable value determined by your ZBD Customer Success Manager and can represent different amounts, such as 1 satoshi or $0.10.
For example, if the game is configured so that 1 unit = 1 satoshi, sending 1 reward will send 1 satoshi. Conversely, if the game is set up so that 1 unit = $0.10, sending 1 reward will send the equivalent of $0.10 in satoshis.
Your games config could also be set up so that a unit would represent a point in your game, e.g. sending 1 unit would send 1 “Gem” which is worth $0.10.
Sending Rewards
To send a reward to a user you can call:
ZBDController.Instance.SendReward(1, callback =>
{
if (callback.success)
{
// reward sent
}
else if (callback.maintenance)
{
// Platform is in maintenance mode
Debug.Log("Rewards are temporarily unavailable. Please try again later.");
}
else
{
Debug.LogError("send reward error " + callback.message);
}
});
The SendReward response object contains the following fields:
public class ZBDSendRewardResponse
{
public bool success;
public string message;
public bool needsAuthentication;
public bool maintenance;
public ZBDTransactionData[] data;
}
Maintenance mode can start while players are actively in a session. Even if Init succeeded normally, SendReward can return maintenance = true at any point during gameplay. Always check the maintenance flag on every reward call and display a user-friendly message when it is active. Do not queue or retry rewards during maintenance.
See Handling Maintenance Mode for the full list of affected methods.
For enhanced security and validation, we recommend handling reward distribution from your backend server.
You can learn how to set this up in the Server Rewards Overview section