Skip to main content

Server Reward Verification

1. Introduction to server rewards

  • Server reward (S2S): After the user finishes watching the video, the TradPlus server will call back reward information to your server. TradPlus Android SDK >= 7.9 and iOS SDK >= 7.5 are supported.

  • To ensure the accuracy of server incentives, it is recommended that developers give priority to using the server incentive callbacks of third-party advertising platforms. For TradPlus Adx and cross-promotion, TradPlus server incentive callbacks can be used directly.

2. Use third-party advertising platform server rewards

  • 1.Developers need to go to the backend of the third-party advertising platform to set the callback URL address of the developer's own server.
  • 2.The developer passes in user_id (user's unique ID) and custom_data (user-defined data) in the code through the API of Tradplus SDK. These parameters will eventually be notified to the developer through the callback URL.
  • 3.When the user watches the rewarded video, the third-party advertising platform will notify the developer through the set callback URL address, and the developer will make its own judgment and issue the reward.

2.1 List of platforms that support transparent transmission

  • user_id(User Unique ID) You can use the account system or after opening the APP, a UUID is automatically generated to identify the user's unique ID.
  • custom_data(User-defined data) Information must be transmitted according to the requirements of third parties. (Different advertising platforms will have different requirements.)
Advertising platformDocument URLillustrate
MetaAdd rewarded video ads to your Android appNeed to open it with FB
AdmobSet up and test server-side validationLog in to the third-party background and set the callback URL
ApplovinLog in to the third-party background and set the callback URL——
MintegralSet server callbackThird-party backend configuration
IronSourceCustom Parameters for AndroidThird-party backend configuration
UnityAdsServer-to-server redeem callbacksYou need to contact the other party to send GameId and URL. Note that it will not take effect in test mode.
LiftoffServer-to-Server (S2S) CallbacksThird-party background configuration, please note that it does not take effect in test mode
AdColonyServer-Side RewardsThird-party backend configuration
Pangle (pangolin)Server to server callbackFill in the callback URL in the third-party background
AppNextServer-side Postback - Rewarded Video——
OguryServer-side reward callbackFill in the callback URL in the third-party background
HuaweiLog in to the third-party background and set the callback URLFill in the callback URL in the third-party background
Tencent AdvertisingServer side verification instructionsFill in the callback URL in the third-party background
SigmobIncentivized Video Server Side Verification (SSV)Under the [Advertising Scenario] settings of the third-party background, turn on the switch to enable server-side verification.
quick workerDocumentation descriptionFill in the callback URL in the third-party background
BaiduDocumentation descriptionFill in the callback URL in the third-party background
TapTapDocumentation descriptionFill in the callback URL in the third-party background

3. Use TradPlus server rewards

Usage process

  • 1.Developers need to select the server-side reward callback in the rewarded video ad space in the TradPlus backend and set the callback URL address.
  • 2.Developers need to pass in UserID (user's unique ID) and CustomData (user-defined data) in the code through the API of TradPlus SDK. These parameters will eventually be notified to the developer through the callback URL.
  • 3.When the user finishes watching the incentive video, the TradPlus server will notify the developer through the set callback URL address, and the developer will make its own judgment and issue the reward.

Server Access Guide

  • 1.Developers need to turn on server rewards in the rewarded video ad slot in the TradPlus backend and set the callback URL for the developer's server rewards. The example is as follows:

  • 2.The developer’s callback URL example is as follows:

https://www.tp.com/onrewarded?adsource_id={adsource_id}&sign={sign}&trans_id={trans_id}
  • 3.Please refer to the following list and splice the required macros into the callback URL. The TradPlus server will replace these macros with corresponding values ​​and call back to the developer server in GET mode:
parameterillustrate
{adsource_id}Advertising slot ID of third-party advertising network
{app_id}TradPlus App ID
{extra}User-defined business parameters
{network_id}TradPlus third-party advertising network ID
{scene_id}TradPlus advertising scene ID
{sign}Signature information
{trans_id}Unique transaction ID generated by TradPlus
{unit_id}TradPlus ad Unit ID
{user_id}user id
{platform}Application system platform (1 Android, 2 iOS)
{ts}callback timestamp
{package_name}Application package name
{device_ifa}Device ID (Android: gaid, iOS: idfa)
{device_idfv}iOS idfv
{ip}User device IP
{iso_code}country code
{bucket_id}A/B test group ID
{segment_id}Traffic group ID
{channel}channel
{subchannel}Sub-channel
{ilrd}Impression level data for TradPlus SDK callbacks
{reward_name}Reward name
{reward_amount}Number of rewards
  • 4.Sign Signature Rules Description

When developers receive the server reward callback from TradPlus, they can verify the callback parameters through sign.

The TradPlus server generates sign signatures according to the following rules

sign = Sha256(SecretKey:TransId)
parameterillustrateExample
SecretKeySecurity key generated by TradPlus rewarded video ad placementD46C4341E83F33DB0DF2BC42816F21B7
TransIdUnique transaction ID generated by TradPlusa78f36ed-95e5-4049-9647-dfc87e6df0e1
sign = Sha256(D46C4341E83F33DB0DF2BC42816F21B7:a78f36ed-95e5-4049-9647-dfc87e6df0e1)
= db10d4a82a32597a101841988bbee1bf5f3ebca9a512456817e301d89c721270
  • 5.After receiving the server reward callback from TradPlus, the developer needs to return the agreed parameters to the TradPlus server.
parametertypeillustrate
isValidbooleanVerification result
codeintstatus code
messagestringerror message

Note: By default, a json string is returned

Example:

{
"isValid": true,
"code": 0,
"message": "ok"
}
  • 6.If there is no response within 2 seconds after the TradPlus server initiates the server incentive callback, it will be considered a timeout. TradPlus will retry 3 times by default. If it still times out, it will no longer initiate an incentive callback to the developer callback URL.

4. TradPlus SDK access

API settings need to be called before requesting ads. user_id (user's unique ID), custom_data (user-defined data).

4.1 Android access

Must be called before requesting an ad
Map<String, Object> mLocalExtras = new HashMap<>();
mLocalExtras.put("user_id", "123");
mLocalExtras.put("custom_data", "abc");
mTpReward.setCustomParams(mLocalExtras);

mTpReward.loadAd();

4.2 Unity3D access

Must be called before requesting an ad
Dictionary<string, string> rewardedmap = new Dictionary<string, string>();
rewardedmap.Add("user_id","123");
rewardedmap.Add("custom_data", "25");
TradPlus.SetCustomParams(_rewardedVideoAdUnits,rewardedmap);

TradPlus.RequestRewardedVideo("AdUnitId");

5. ILRD parameter description

Data description reference callback information description list