Rewarded Video Callbacks

Adding your Callback URL

To handle video conversions with S2S Callbacks, first make sure your callback URL is setup correctly in your publisher placement. To do so, navigate to Placements / Apps, edit your placement and set the Callback Url to your server's postback url:

Also make sure that "Send S2S Callbacks" for video views is enabled for your Rewarded Video AdSlot in "AdSlot Details" > "Overview".

If this is the callback url you set for your placement:

https://your-server.com/callback?network=ayetstudios&amount={currency_amount}&external_identifier={external_identifier}&payout_usd={payout_usd}&adslot_id={adslot_id}

A typical conversion callback sent by our server will look like this:

https://your-server.com/callback?network=ayetstudios&amount=10&external_identifier=username&payout_usd=0.007&adslot_id=16

This assumes you set externalIdentifier to username when calling AyetVideoSdk.init(...), the currency amount per view was set to 10 in your rewarded video adslot #16 and the delivered video had an eCPM of $7.00.

Hint: If you send callbacks from multiple different adslots (e.g. rewarded_video and offerwall) make sure to pass and validate {adslot_id} in your callback URL to determine if the conversion was a normal offer or a rewarded video.

Important: Your server must always reply with an HTTP 200 status code to our postbacks. Otherwise we will resend the postback 12 times over a span of one hour before giving up.

Available Macros for Callback URLs:

Note: If the parsing capabilities of your callback endpoint are limited, each of the parameters below is also available in a sanitized version. By suffixing any of the parameters below with _sanitized (for example {external_identifier_sanitized}), any character that is not in 0-9 a-z A-Z - _ will be removed. Whitespaces will be replaced by underscores.

Important: To ensure each conversion is granted only once to your users, always use {transaction_id}. Occasional callback resends may occur for various reasons. Utilizing {transaction_id} prevents granting conversions more than once.

VariableTypeDescription

{transaction_id}

string

Unique transaction id - use for duplicate checks.

{payout_usd}

float

The actual conversion payout in USD.

{currency_amount}

float

The amount of currency the user earned (taken from your offerwall currency configuration).

{external_identifier}

string

The user identifier (EXTERNAL IDENTIFIER) originally passed in the web offerwall link

{user_id}

integer

Our internal id for this offerwall user

{placement_identifier}

string

The placement_identifier for which the conversion occured

{adslot_id}

int

The ID of the adslot for which the conversion occured

{sub_id}

string

The ID of the Placement for which the conversion occured [PL-1...n]

{ip}

string

Converting device's IP address if known, 0.0.0.0 otherwise

{offer_id}

int

Offer ID of the converting offer

{offer_name}

string

Name / title of the converting offer

{device_uuid}

string

ayeT-Studios internal device identificator

{device_make}

string

Device manufacturer

{device_model}

string

Device model

{advertising_id}

string

Device advertising id (GAID/IDFA) if known, otherwise empty

{sha1_android_id}

string

Device sha1 hashed android id if known, otherwise empty

{sha1_imei}

string

Device sha1 hashed imei if known, otherwise empty

{currency_identifier}

string

Shows virtual currency name as set in adslot.

{currency_conversion_rate}

decimal

Shows currency conversion rate used to calculate user currency for the given conversion.

{custom_1}

string

Custom parameter to pass variables to the conversion callbacks

{custom_2}

string

Custom parameter to pass variables to the conversion callbacks

{custom_3}

string

Custom parameter to pass variables to the conversion callbacks

{custom_4}

string

Custom parameter to pass variables to the conversion callbacks

{custom_5}

string

Custom parameter to pass variables to the conversion callbacks

Last updated