Payout
In order for the user to redeem his collected rewards, they must be paid out. A reward can only be paid out exactly once.
There are two methods to pay out the rewards: via server-to-server payout or via the SDK. The two methods are mutually exclusive. You can only use either server-to-server payout or the SDK payout. Please discuss with your account manager which method to use.
Server-to-server payout
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.
Endpoint structure
We will call your endpoint with an HTTP GET
request and the configured parameters:
Parameter | Detail | format |
| The Id of the user that should get the rewards | UUID v4 |
| The request signature, which should be used to verify request authenticity. | string |
| The amount of virtual currency the user should get | integer |
| The name of the virtual currency | string |
| The unique transaction ID | UUID v4 |
| optional device id | string |
| URL encoded app name in English | string |
| optional app id of the sdk | string |
| optional app id that generate the usage | string |
| optional sub id one passed from SDK to track the request | string |
| optional sub id two passed from SDK to track the request | string |
| optional reward level | string |
| optional reward type | string |
Security
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]={sdk_sub_id1}&[YourParamName]={sdk_sub_id2}
Via SDK
If you cannot handle the payout requests via an endpoint on your server, we can also handle the reward payouts inside the SDK itself.
To pay out the rewards that the user has collected from partner apps directly in the SDK, call
This method always pays out all coins which the user has collected, i.e. the value of adjoeRewardsEvent.getAvailablePayoutCoins()
.
If the user has not accepted the adjoe Terms of Service yet, this operation will fail and event.getReason()
will be equal to AdjoePayoutEvent.REASON_TOS_NOT_ACCEPTED
. You might want to display the offerwall again so that the user can accept the adjoe Terms of Service.
This operation will also fail with event.getReason()
equal to AdjoePayoutEvent.REASON_UNKNOWN
if the user is blocked by the adjoe services.
Adjoe Parameters
You can pass additional UA and placement parameters when you launch Playtime:
Last updated