Other methods
There are some other methods in the adjoe SDK which you might find helpful.
| Returns the internal version code of the adjoe SDK, for example |
| Returns the version name of the adjoe SDK, for example |
| Returns |
Payout via SDK
The following information on SDK-side reward handling is only relevant for your integration if you cannot use Server-to-Server Payout. Do not implement these functions if you already successfully followed the steps in the Payout section - it could trigger error messages and unexpected behaviour.
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 rewards which the user has collected, i.e. the value of rewards.available_payout_coins
.
If the user has not accepted the adjoe Terms of Service yet, this operation will fail and reason
will be equal to Adjoe.PAYOUT_TOS_NOT_ACCEPTED
. You might want to forward to Playtime again so that the user can accept the adjoe Terms of Service. This operation will also fail with reason
equal to Adjoe.PAYOUT_UNKNOWN
if the user is blocked by the adjoe services.
Adjoe Parameters
You can pass additional UA and placement parameters when you pay out the rewards:
Retrying the payout
Sometimes, it can happen that the latest rewards haven't been processed yet by the server when you pay out. In this case, the promise rejects with reason
equal to Adjoe.PAYOUT_NOT_ENOUGH_COINS
. To overcome this, you can implement a retry mechanism for the payout, for example with an exponential backoff.
Example:
Further context on Rewards
You can get information about the rewards that the user has collected as well as about how many rewards are available for payout and how many the user has already spent.
To do so call
This operation will fail if the SDK is not initialized, the user has not accepted the adjoe Terms of Service or is blocked by the adjoe services.
Adjoe Parameters
You can pass additional UA and placement parameters when you request the rewards:
Last updated