myChips SDK
  • Introduction
  • Getting Started
    • Create a Publisher Account
    • Create your App/Site
    • Create an AdUnit
    • Test in Sanbox mode
  • Reward Handling
    • Webhook S2S Postback
    • Validating the Webhook S2S
    • Rejected S2S Webhook Postback
  • Billing
  • Unity
    • Install SDK
    • Reward User
    • FAQ
  • Android
    • Install SDK
    • Reward User
  • React Native
    • Install SDK
    • Reward User
  • RN Expo
    • Install SDK
    • Reward User
  • iOS
    • Install SDK
    • Reward User
  • Flutter
    • Install SDK
    • Reward User
  • iFrame
  • WebView & Direct Link
  • Revenue API
Powered by GitBook
On this page
  1. Unity

Reward User

PreviousInstall SDKNextFAQ

Last updated 18 days ago

There are two options for handling bonuses rewarded through the Offerwall:

1. Fully Managed by MyChips

Attach the UnityEvent OnRewardReceived to your GUI element (very first scene). Within this event, implement the logic to credit the user with the bonus. You will have access to the value of the bonus, allowing you to adjust the reward accordingly.

void Start()
{
    MCOfferwallObject.Instance.OnRewardReceived.AddListener(HandleRewardReceived);
}

private void HandleRewardReceived(RewardDTO reward)
{
   // Add your logic here to handle the reward, using the      
  reward.GetRewardInVirtualCurrency()          
}

2. Server-to-Server (S2S) Postbacks

If you prefer server-to-server communication, MyChips can send a postback to your server with bonus information. The configuration for postbacks is available in your publisher dashboard. This method is useful for validating and securely rewarding users without client-side manipulation.

If you are testing in Sandbox mode, the value of the macro {user_payout} will be 0.