In order for the user to redeem his collected rewards, they must be paid out. A reward can only be paid out exactly once.
For an easier integration process and a more seamless user experience, we highly recommend using the server-side reward handling as laid out on this page. If you cannot handle the rewards via server and you need to handle them inside the app, please refer to this section instead.
In order to use the server-to-server payout, you need to create an endpoint on your server that we can request in order to notify you of the user's rewards. Once you receive the notification, it will be up to you to deliver it to the user.
We highly recommend using server-to-server payout for rewards due to higher security and better transparency on your end.
For the reward payouts to be successful, you need to set your User ID. Only this will allow you to match the payouts to your users. You can do this by setting the User ID in the Adjoe Options, that are passed to the Adjoe.init
API. More details in the "Initialize the SDK" section.
We will call your endpoint with an HTTP GET
request and the configured parameters:
To ensure that requests come from us, you should calculate the sid
parameter and compare it to the parameter sent in the callback. It is calculated as follows: sid = sha1(concatenate(trans_uuid, user_uuid, currency, coin_amount, device_id, sdk_app_id, s2s_token))
We will supply you with the parameter s2s_token
separately.
Example Endpoint URL:
https://example.com/example?[YourParamName]={user_uuid}&[YourParamName]={sid}&[YourParamName]={coin_amount}&[YourParamName]={currency}&[YourParamName]={trans_uuid}&[YourParamName]={ua_network}&[YourParamName]={ua_channel}&[YourParamName]={ua_subpublisher_encrypted}&[YourParamName]={ua_subpublisher_cleartext}&[YourParamName]={placement}&pubAdId={publisher_sub_id1}
Parameter
Detail
Format
Type
user_uuid
The Id of the user that should get the rewards
string
mandatory
sid
The request signature, which should be used to verify request authenticity. sid
is computed as a SHA1 hash of the request parameters as sid = sha1(concatenate(trans_uuid, user_uuid, currency, coin_amount, device_id, sdk_app_id, s2s_token)).F
or the SID calculation parameters that are not on the endpoint would not be considered for SID calculation. E.g. if {sdk_app_id} were not part of the URL, then the sid would be sid =sha1(concatenate(trans_uuid, user_uuid, currency, coin_amount, device_id, s2s_token))
string
mandatory
coin_amount
The amount of virtual currency the user should get
integer
mandatory
currency
The name of the virtual currency
string
mandatory
trans_uuid
The unique transaction ID
UUID v4
mandatory
device_id
optional device id
string
optional
app_name
URL encoded app name in English
string
optional
sdk_app_id
optional app id of the sdk
string
optional
app_id
optional app id that generate the usage
string
optional
reward_level
optional reward level
string
optional
reward_type
optional reward type
string
optional
ua_network
The network where the user was bought by your app, e.g. adwords, facebook, organic
string
optional
ua_channel
The channel of the campaign in the network where the user was bought, e.g. incent, video
string
optional
ua_subpublisher_encrypted
The encrypted package name or app id of the sub publisher app in the network where the user was bought
string
optional
ua_subpublisher_cleartext
The cleartext package name of app id of the sub publisher app in the network where the user was bought, e.g. com.domain.appName
string
optional
placement
The placement of Playtime inside the your app, e.g. shop
string
optiona
publisher_sub_id1
Value set in the extension object to be returned in the S2S payout URL
string
optional
publisher_sub_id2
Value set in the extension object during the init to be returned in the S2S payout URL
string
optional
publisher_sub_id3
Value set in the extension object during the init to be returned in the S2S payout URL
string
optional
publisher_sub_id4
Value set in the extension object during the init to be returned in the S2S payout URL
string
optional
publisher_sub_id5
Value set in the extension object during the init to be returned in the S2S payout URL
string
optional