Server-Side Reward (Server-to-Server): Allows developers to decide whether to grant rewards to users who watch Rewarded Video ads. When a user finishes watching a Rewarded Video, the developer's server will be notified, and the developer will handle the reward distribution.
Note: To ensure the accuracy of server-side rewards, for third-party ad platforms, it is strongly recommended that developers prioritize using the third-party ad platform's server-side reward callback. For Taku Adx, Direct Offer, and Cross Promotion, developers can directly use Taku's server-side reward callback. You can use the Network Firm ID to determine whether to accept only Taku's server-side reward callback:
Taku Adx Network Firm ID = 66
Taku Direct Offer Network Firm ID = 67
Taku Cross Promotion Network Firm ID = 35
(1) Developers need to configure the callback URL of their own server in the third-party ad platform's backend.
(2) In code, developers pass UserID (unique user ID) and UserCustomData (user-defined data) through the Taku SDK API. These parameters will ultimately be passed to the developer via the callback URL.
(3) When a user finishes watching a Rewarded Video, the ad platform will notify the developer through the configured callback URL, and the developer will decide and grant the reward.
Ad platforms supporting server-side reward are listed below: (Clickable links lead to the ad platform's documentation on server-side reward. For non-clickable links, please log in to the ad platform's backend directly to configure the callback URL.)
(1) Developers need to enable server-side reward on the Rewarded Video Ad Placement in the Taku backend and configure the callback URL.
(2) Developers need to pass UserID (unique user ID) and UserCustomData (user-defined data) in code through the Taku SDK API. These parameters will ultimately be passed to the developer via the callback URL.
(3) When a user finishes watching a Rewarded Video, the Taku platform will notify the developer through the configured callback URL, and the developer will decide and grant the reward.
(1) Developers need to enable server-side reward on the Rewarded Video Ad Placement in the Taku backend and configure the developer's server-side reward Callback URL, as shown below:

Example of a developer's Callback URL:
https://www.takuad.com/onrewardedverify?user_id={user_id}&trans_id={trans_id}&reward_amount={reward_amount}&reward_name={reward_name}&placement_id={placement_id}&extra_data={extra_data}&network_firm_id={network_firm_id}&adsource_id={adsource_id}&scenario_id={scenario_id}&sign={sign}&ilrd={ilrd}
(2) Taku will request the developer's Callback URL via GET method, appending the following parameters:
user_id={user_id}&trans_id={trans_id}&reward_amount={reward_amount}&reward_name={reward_name}&placement_id={placement_id}&extra_data={extra_data}&network_firm_id={network_firm_id}&adsource_id={adsource_id}&scenario_id={scenario_id}&sign={sign}&ilrd={ilrd}
(3) The placeholders for the developer's custom callback URL information are as follows. Note:
| Parameter | Description | Remarks |
|---|---|---|
| {user_id} | User ID | Set by the developer via the Taku SDK API |
| {extra_data} | User business parameters | Set by the developer via the Taku SDK API |
| {trans_id} | Trans ID generated by the Taku server, globally unique | It is strongly recommended that developers verify whether a reward has already been issued for the trans_id on their server before granting the reward, to avoid issuing duplicate rewards for the same trans_id (corresponds to getShowId() in the client-side impression callback). |
| {reward_name} | Reward name | Configured in the developer backend (supports configuration at Ad Placement or Ad Scene level) |
| {reward_amount} | Reward amount | Configured in the developer backend (supports configuration at Ad Placement or Ad Scene level) |
| {placement_id} | Taku Ad Placement ID | - |
| {network_firm_id} | Ad Platform ID in Taku Mediation | [Special Note] 1). If you need to use server-side reward and also use Taku Adx, Direct Offer, or Cross Promotion: For third-party ad platforms, it is recommended to prioritize using the third-party ad platform's server-side reward callback. For Taku Adx, Direct Offer, and Cross Promotion, you can use Taku's server-side reward callback. 2). You can use the Network Firm ID to determine whether to accept only Taku's server-side reward callback: 1. Taku Adx Network Firm ID = 66 2. Taku Direct Offer Network Firm ID = 67 3. Taku Cross Promotion Network Firm ID = 35 View Taku Ad Platform ID List |
| {adsource_id} | Taku Ad Source ID | - |
| {scenario_id} | Taku Ad Scene ID | Set by the developer via the Taku SDK API |
| {package_name} | Developer app package name or Bundle ID | Obtained by Taku SDK from the developer's app package name or Bundle ID |
| {platform} | System platform, Android or iOS | Returned as the following enum: 1: Android, 2: iOS |
| {ilrd} | Impression-level data called back by Taku SDK. The data is a JSON string. | Supported by Taku SDK v5.7.78 and above. Taku SDK provides impression-level data to developers when calling back the Rewarded Video OnReward event. Refer to specific data format Note: The ilrd parameter is only for behavioral data analysis reference and cannot be directly used as the basis for reward distribution. |
| {sign} | Signature information | Refer to the signature rules description |
(4) sign Signature Rules Description
When receiving Taku's server-side reward callback, developers can verify the callback parameters using the sign.
sign =MD5("trans_id="+trans_id+"&placement_id="+placement_id+"&adsource_id="+adsource_id+"&reward_amount="+reward_amount+"&reward_name="+reward_name+"&sec_key="+sec_key)
If the callback URL includes the {ilrd} parameter, the following sign signature rule must be used:
sign =MD5("trans_id="+trans_id+"&placement_id="+placement_id+"&adsource_id="+adsource_id+"&reward_amount="+reward_amount+"&reward_name="+reward_name+"&sec_key="+sec_key+"&ilrd="+ilrd)
(5) sign Signature Example
| Parameter | Example |
|---|---|
| trans_id | xxxxxxxxxxxxxxxx |
| placement_id | b5b449fb3d89d7 |
| adsource_id | 56789 |
| reward_amount | 1 |
| reward_name | coin |
| sec_key | cyvmwmzrqts7csphhexpqxqxxgljfisb |
| ilrd | abc |
sign signature example:
sign=MD5(trans_id=xxxxxxxxxxxxxxxx&placement_id=b5b449fb3d89d7&adsource_id=56789&reward_amount=1&reward_name=coin&sec_key=cyvmwmzrqts7csphhexpqxqxxgljfisb&ilrd=abc)
(6) After the developer's callback URL receives Taku's server-side reward callback, it must return a status code of 200 or 601 or 602 to the Taku server. After Taku receives a success or failure status code, it will not resend the server-side reward callback.
Special note: The callback data may sometimes be very large (especially when ilrd is included). Developers should ensure that the GET callback URL length limit is removed, otherwise the developer's server may return a 414 error (for example, when using nginx, which has a default length limit).
| Return Status Code | Description |
|---|---|
| 200 | Success |
| 601 | Signature verification failed |
| 602 | Other failure |
If there is no response within 2 seconds after the Taku server initiates the server-side reward callback, it is considered a timeout. After a timeout, Taku will retry sending the reward callback at intervals (e.g., 2 seconds, 4 seconds, 8 seconds, etc.). If Taku has retried a maximum of 5 times and still times out, it will no longer send the reward callback to the developer's callback URL.
To support developers granting different rewards in different Rewarded Video ad scenes, Taku allows developers to set different reward names and reward amounts for different ad scenes. The specific usage flow is as follows:
(1) Enable the server-side reward callback for the Rewarded Video Ad Placement and receive the Taku callback's Ad Scene ID {scenario_id} in the callback URL.
(2) Set the reward amount and reward name under the ad scene in the Taku backend, as shown below:

(3) When receiving Taku's server-side reward callback, the developer grants different rewards based on the Ad Scene ID {scenario_id}.
To reduce the time developers spend manually configuring server-side reward callback rules, Taku allows developers to quickly reuse server-side reward callback rules. The steps are as follows:
(1) In the Advanced Features dropdown menu, go to Server-Side Callback.
(2) Create a Callback Rule, edit it, and save the rule.

(3) When creating or editing an Ad Placement, enable the server-side callback toggle and select the corresponding rule to quickly reuse that rule.

Map localMap = new HashMap<>();
localMap.put(ATAdConst.KEY.USER_ID, "test_user_id");
localMap.put(ATAdConst.KEY.USER_CUSTOM_DATA, "test_user_data");
mRewardVideoAd.setLocalExtra(localMap);
mRewardVideoAd.load();
[[ATAdManager sharedManager] loadADWithPlacementID:placementId extra:@{kATAdLoadingExtraMediaExtraKey:@"test_user_data", kATAdLoadingExtraUserIDKey:@"test_user_id"} delegate:self];
Dictionary jsonmap = new Dictionary();
jsonmap.Add(ATConst.USERID_KEY, "test_user_id");
jsonmap.Add(ATConst.USER_EXTRA_DATA, "test_user_data");
ATRewardedVideo.Instance.loadVideoAd(placementId, jsonmap);
cocos2d::ValueMap extra;
extra[ATCocosSdk::KEY_USER_ID] = "test_user_id";
extra[ATCocosSdk::KEY_MEDIA_EXT] = "test_user_data";
ATCocosSdk::loadRewardedVideoAd(placementId, extra);
var setting = {};
setting[ATRewardedVideoJSSDK.userIdKey] = "test_user_id";
setting[ATRewardedVideoJSSDK.userDataKey] = "test_user_data";
ATRewardedVideoJSSDK.loadRewardedVideo(placementId, setting);
var setting = {};
settings[ATRewardedVideoRNSDK.userIdKey] = "test_user_id";
settings[ATRewardedVideoRNSDK.userDataKey] = "test_user_data";
ATRewardedVideoRNSDK.loadAd(placementId, settings);
Note: The ilrd parameter is only for behavioral data analysis reference and cannot be directly used as the basis for reward distribution. If you need to use impression revenue data for reward share calculations, please use impression revenue data. Reference documents: Impression Ad Source eCPM Encryption, Ad Impression Server-Side Callback (S2S)
| Variable | Type | Description |
|---|---|---|
| network_firm_id | int | Gets the Ad Platform corresponding ID, used to distinguish ad platforms. |
| adsource_id | string | Gets the Ad Source ID. You can query specific Network information by Ad Source ID in the developer backend or via Taku Open API. |
| adsource_index | int | Gets the current Ad Source's position in the WaterFall (starting from 0). |
| adsource_price | dounble | Gets the ECPM, the unit can be obtained via "currency". |
| adsource_isheaderbidding | int | Whether it is a Header Bidding Ad Source, 1: Yes, 2: No. |
| id | string | Gets the unique ID generated for each ad impression. |
| publisher_revenue | double | Gets the impression revenue. |
| currency | string | Gets the currency unit, e.g., "USD". |
| country | string | Gets the country code, e.g., "CN". |
| adunit_id | string | Gets the Taku Ad Placement ID. |
| adunit_format | string | Gets the ad type, including: "Native", "RewardedVideo", "Banner", "Interstitial", "Splash". |
| precision | string | Gets the ECPM precision. "publisher_defined": The eCPM defined by the developer for the Ad Source in the Taku backend (cross-promotion eCPM also falls under this type). "estimated": Taku's estimated eCPM (auto eCPM). "exact": Header Bidding real-time bidding eCPM. |
| network_type | string | Gets the Network type. "Network": Third-party ad platform. "Cross_Promotion": Cross promotion. "Adx": Taku Adx. |
| network_placement_id | string | Gets the Network's Ad Placement ID. |
| ecpm_level | int | Gets the Ad Source's eCPM tier, Header Bidding Ad Sources default to 0. |
| segment_id | int | Gets the Traffic Group ID. |
| scenario_id | string | Gets the Ad Scene ID, only supported for Rewarded Video & Interstitial (starting from v5.7.20, Native & Banner are also supported). |
| scenario_reward_name | string | Gets the Ad Scene reward name, only supported for Rewarded Video. |
| scenario_reward_number | int | Gets the Ad Scene reward amount, only supported for Rewarded Video. |
| sub_channel | string | Gets the sub-channel information. |
| channel | string | Gets the channel information. |
| custom_rule | Dictionary | Gets the JSON string of custom rules at the Placement + App level. |
| user_load_extra_data | string | Gets the custom parameters passed during Load, corresponding to getLocalExtra(). |
| show_custom_ext | show_custom_ext | Gets the custom parameters passed during Show, corresponding to getShowCustomExt(). |
(1) What is the difference between Taku's server-side reward callback and third-party platforms' callbacks?
If using Taku ADX, Cross Promotion, Direct Offer ads, etc., configuring the server-side reward callback in Taku will be more accurate. Third-party platform server-side reward callbacks will be more accurate when going through the respective third-party platform.