# Reward User

#### 1. Fully Managed by MyChips

{% hint style="info" %}
Use this method only if you have selected Self-Managed Currency. If you already support S2S postback please skip this snippet.
{% endhint %}

#### 1.1 Check for new reward at app open and app resume

{% tabs %}
{% tab title="Typescript" %}

<pre class="language-typescript"><code class="lang-typescript">
React.useEffect(() => {
<strong>   //handler for App State Changed
</strong><strong>   const handleAppStateChange = (nextAppState: any) => {
</strong>       if (nextAppState === 'active') {
        
        
        const fetchReward = async () =>{
          return await MCOfferwallSDK.GetReward(ADUNITID)
        } 
        //check for new rewards
        fetchReward().then((reward)=>{
          if(reward){
            console.log(reward.getRewardInVirtualCurrency())
          }
         }).catch()

       }
     };
  
     //subscribe the appstate event change
     const subscription = AppState.addEventListener('change', handleAppStateChange);
    
     return () => {
         //umregister event
         subscription.remove();
     };
 });

</code></pre>

{% endtab %}
{% endtabs %}

#### 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.&#x20;

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