Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Learn how to creat Sub-Accounts to grant access to your dashboard for your colleagues
This checklist is supposed to help you to take care of all important and relevant settings before going live with your rewarded video placement.
Our Advertiser Reporting API allows advertisers to retrieve detailed statistics on their pending, active and historic campaigns including impressions, clicks and conversions.

Learn more about the Offerwall metrics available in our dashboard and how to use them in your reporting
Sandbox Identifiers can be used to test the user and callback flow from initial entering the offerwall until successfully processing a callback.
In this section, you can find step-by-step guidance on how to set up placement and get started.
This checklist is supposed to help you to take care of all important and relevant settings before going live with your Surveywall.
In this page you can find step-by-step instructions on how to get started
This section explains how to remove offers that you do not wish to show to your players. You can exclude individual offers for a specific placement. You can exclude an offer for all of your placements




51.79.101.241
158.69.185.134
158.69.185.154
35.165.166.40
35.166.159.131
52.40.3.140
















Control the user flow when a redirect is failing.
The Static API is recommended only for special integrations, because not all campaigns are available without more sophisticated device match.
Following each of the main points below will help you get the most out of your Rewarded Video integration.











npm install ayet-react-native-sdk-v2<uses-permission android:name="android.permission.INTERNET" /><?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AyetSDKExample">
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.AyetSDKExample">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>cd ios && pod installimport AyetSdkV2 from 'ayet-react-native-sdk-v2';
// Initialize with your placement ID and user identifier
AyetSdkV2.init(YOUR_PLACEMENT_ID, 'USER_EXTERNAL_IDENTIFIER');AyetSdkV2.showOfferwall('YOUR_OFFERWALL_ADSLOT_NAME');AyetSdkV2.showSurveywall('YOUR_SURVEYWALL_ADSLOT_NAME');const offersJson = await AyetSdkV2.getOffers('YOUR_OFFERWALL_API_ADSLOT_NAME');AyetSdkV2.showRewardStatus();AyetSdkV2.setTrackingCustom1('custom1');
AyetSdkV2.setTrackingCustom2('custom2');
AyetSdkV2.setTrackingCustom3('custom3');
AyetSdkV2.setTrackingCustom4('custom4');
AyetSdkV2.setTrackingCustom5('custom5');AyetSdkV2.setAge(25);
AyetSdkV2.setGender(AyetGender.Male);npm install ayet-react-native-sdk-v2<uses-permission android:name="android.permission.INTERNET" /><?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AyetSDKExample">
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.AyetSDKExample">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>cd ios && pod installimport AyetSdkV2 from 'ayet-react-native-sdk-v2';
// Initialize with your placement ID and user identifier
AyetSdkV2.init(YOUR_PLACEMENT_ID, 'USER_EXTERNAL_IDENTIFIER');AyetSdkV2.showSurveywall('YOUR_SURVEYWALL_ADSLOT_NAME');AyetSdkV2.showOfferwall('YOUR_OFFERWALL_ADSLOT_NAME');const offersJson = await AyetSdkV2.getOffers('YOUR_OFFERWALL_API_ADSLOT_NAME');AyetSdkV2.showRewardStatus();AyetSdkV2.setTrackingCustom1('custom1');
AyetSdkV2.setTrackingCustom2('custom2');
AyetSdkV2.setTrackingCustom3('custom3');
AyetSdkV2.setTrackingCustom4('custom4');
AyetSdkV2.setTrackingCustom5('custom5');AyetSdkV2.setAge(25);
AyetSdkV2.setGender(AyetGender.Male);https://your-redirect-destination.com/redirect?user_id={external_identifier}&offer_id={offer_id}&reason_code={reason_code}&reason_message={reason_message}












import AyetSDK @main
struct iosSdkV2DemoAppApp: App {
init() {
AyetSDK.shared.initialize(placementId: YOUR_PLACEMENT_ID, externalIdentifier: "USER_EXTERNAL_IDENTIFIER")
}
var body: some Scene {
WindowGroup {
ContentView()
}
}
}await AyetSDK.shared.showOfferwall(adSlotName: "YOUR_OFFERWALL_ADSLOT_NAME")if let offersJson = await AyetSDK.shared.getOffers(adSlotName: "YOUR_OFFERWALL_API_ADSLOT_NAME") {
print("Offers received: \(offersJson)")
} else {
print("Failed to get offers - null response")
}await AyetSDK.shared.showRewardStatus()await AyetSDK.shared.showSurveywall(adSlotName: "YOUR_SURVEYWALL_ADSLOT_NAME")AyetSDK.shared.setTrackingCustom1("custom1")
AyetSDK.shared.setTrackingCustom2("custom2")
AyetSDK.shared.setTrackingCustom3("custom3")
AyetSDK.shared.setTrackingCustom4("custom4")
AyetSDK.shared.setTrackingCustom5("custom5")AyetSDK.shared.setGender(.male)
AyetSDK.shared.setGender(.female)
AyetSDK.shared.setAge(25)

















The ayeT-Studios Publisher Browser Web Offerwall allows you to easily monetize your desktop and mobile traffic and reward your users with virtual currency.
Learn more about the Rewarded Video metrics available in our dashboard and how to use them in your reporting
The Surveywall API provides a solution for publishers to include Surveys into their application/website while maintaining full control over look and feel of the Surveys.
This section explains how to Provide us with Billing information, How to update your billing information, and also where to see your current and historic payments.
This section explains how to Provide us with Billing information, How to update your billing information, and also where to see your current and historic payments.
The Flutter Wrapper lets you easily monetize your app and reward your users with in-app currency. Your users get access to our offers and surveys, allowing them to earn rewards for completing offers.
https://offerwall.ayet.io/offers?adSlot={ADSLOT_ID}&externalIdentifier={YOUR_USER_IDENTIFIER}// Retrieve the GET parameters
$params = $_GET;
// Sort the parameters alphabetically by key
ksort($params, SORT_STRING);
// Build the sorted query string
$sortedQueryString = http_build_query($params, '', '&');
// Compute the HMAC hash using your API key
$apiKey = 'YOUR PUBLISHER API KEY';
$computedHash = hash_hmac('sha256', $sortedQueryString, $apiKey);
// Compare with the header-provided hash
if (isset($_SERVER['HTTP_X_AYETSTUDIOS_SECURITY_HASH']) &&
$_SERVER['HTTP_X_AYETSTUDIOS_SECURITY_HASH'] === $computedHash) {
// Valid signature: process the callback
} else {
// Invalid signature: reject the callback
}import crypto from "crypto";
// Retrieve the GET parameters from the request URL
const url = new URL(request.url);
const params = url.searchParams;
// Sort the parameters alphabetically by key
const sorted = new URLSearchParams(
[...params.entries()].sort(([a], [b]) => a.localeCompare(b))
);
// Build the sorted query string
const sortedQueryString = sorted.toString();
// Compute the HMAC hash using your API key
const apiKey = "YOUR PUBLISHER API KEY";
const computedHash = crypto
.createHmac("sha256", apiKey)
.update(sortedQueryString)
.digest("hex");
// Compare with the header-provided hash
const securityHash = request.headers.get("X-Ayetstudios-Security-Hash");
if (securityHash === computedHash) {
// Valid signature: process the callback
} else {
// Invalid signature: reject the callback
}import hmac
import hashlib
from urllib.parse import urlparse, parse_qs, urlencode
# Retrieve the GET parameters from the request URL
params = parse_qs(urlparse(request.url).query, keep_blank_values=True)
# Sort the parameters alphabetically by key and flatten values
sorted_params = sorted(params.items())
# Build the sorted query string
sorted_query_string = urlencode([(k, v[0]) for k, v in sorted_params])
# Compute the HMAC hash using your API key
api_key = "YOUR PUBLISHER API KEY"
computed_hash = hmac.new(
api_key.encode(), sorted_query_string.encode(), hashlib.sha256
).hexdigest()
# Compare with the header-provided hash
security_hash = request.headers.get("X-Ayetstudios-Security-Hash")
if security_hash == computed_hash:
# Valid signature: process the callback
pass
else:
# Invalid signature: reject the callback
passhttps://your-site.com/postback/?transaction_id=8ee08f32ae611231b0a49d1bd66e9bf193132561&amount=0.10&payout=1.50&user_id=testuser123456&click_id=1234abcd5678021&offer_name=TEST+OFFER transaction_id=8ee08f32ae611231b0a49d1bd66e9bf193132561
amount=0.10
payout=1.50
user_id=testuser123456
click_id=1234abcd5678021
offer_name=TEST OFFERamount=0.10&click_id=1234abcd5678021&offer_name=TEST+OFFER&payout=1.50&transaction_id=8ee08f32ae611231b0a49d1bd66e9bf193132561&user_id=testuser1234569f2228fea0d8e7ce10b2ac36053db14c62a32725866780ada1dec3d62232645f2801e05a91df7b0202e9b780f804f04bdependencies:
ayet_sdk_v2: ^1.0.4<uses-permission android:name="android.permission.INTERNET" /><?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AyetSDKExample">
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.AyetSDKExample">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>flutter config --enable-swift-package-managerimport 'package:ayet_sdk_v2/ayet_sdk_v2.dart';
final sdk = AyetSdkV2();
// Initialize with your placement ID and user identifier
await sdk.init(
placementId: YOUR_PLACEMENT_ID,
externalIdentifier: 'USER_EXTERNAL_IDENTIFIER',
);await sdk.showOfferwall('YOUR_OFFERWALL_ADSLOT_NAME');final offersJson = await sdk.getOffers('YOUR_OFFERWALL_API_ADSLOT_NAME');await sdk.showRewardStatus();await sdk.showSurveywall('YOUR_SURVEYWALL_ADSLOT_NAME');await sdk.setTrackingCustom1('custom1');
await sdk.setTrackingCustom2('custom2');
await sdk.setTrackingCustom3('custom3');
await sdk.setTrackingCustom4('custom4');
await sdk.setTrackingCustom5('custom5');await sdk.setAge(25);
await sdk.setGender(AyetGender.male);
await sdk.setGender(AyetGender.female);dependencies {
implementation("io.ayet:android-sdk-v2:1.0.3")
}<uses-permission android:name="android.permission.INTERNET" /><?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AyetSDKExample">
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.AyetSDKExample">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>import com.ayet.sdk.AyetSdk class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
AyetSdk.init(this, YOUR_PLACEMENT_ID, "USER_EXTERNAL_IDENTIFIER")
setContent {
AyetSDKExampleTheme {
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
MainScreen(modifier = Modifier.padding(innerPadding))
}
}
}
}
}val context = LocalContext.current
AyetSdk.showOfferwall(context, "YOUR_OFFERWALL_ADSLOT_NAME")AyetSdk.getOffers("YOUR_OFFERWALL_API_ADSLOT_NAME") { offersJson ->
if (offersJson != null) {
Log.d("MainActivity", "Offers received: $offersJson")
} else {
Log.w("MainActivity", "Failed to get offers - null response")
}
}val context = LocalContext.current
AyetSdk.showRewardStatus(context)val context = LocalContext.current
AyetSdk.showSurveywall(context, "YOUR_SURVEYWALL_ADSLOT_NAME")AyetSdk.setTrackingCustom1("custom1")
AyetSdk.setTrackingCustom2("custom2")
AyetSdk.setTrackingCustom3("custom3")
AyetSdk.setTrackingCustom4("custom4")
AyetSdk.setTrackingCustom5("custom5")AyetSdk.setGender(Gender.MALE)
AyetSdk.setGender(Gender.FEMALE)
AyetSdk.setAge(25)
import AyetSDK @main
struct iosSdkV2DemoAppApp: App {
init() {
AyetSDK.shared.initialize(placementId: YOUR_PLACEMENT_ID, externalIdentifier: "USER_EXTERNAL_IDENTIFIER")
}
var body: some Scene {
WindowGroup {
ContentView()
}
}
}await AyetSDK.shared.showSurveywall(adSlotName: "YOUR_SURVEYWALL_ADSLOT_NAME")await AyetSDK.shared.showOfferwall(adSlotName: "YOUR_OFFERWALL_ADSLOT_NAME")if let offersJson = await AyetSDK.shared.getOffers(adSlotName: "YOUR_OFFERWALL_API_ADSLOT_NAME") {
print("Offers received: \(offersJson)")
} else {
print("Failed to get offers - null response")
}await AyetSDK.shared.showRewardStatus()AyetSDK.shared.setTrackingCustom1("custom1")
AyetSDK.shared.setTrackingCustom2("custom2")
AyetSDK.shared.setTrackingCustom3("custom3")
AyetSDK.shared.setTrackingCustom4("custom4")
AyetSDK.shared.setTrackingCustom5("custom5")AyetSDK.shared.setGender(.male)
AyetSDK.shared.setGender(.female)
AyetSDK.shared.setAge(25)


https://www.ayetstudios.com/surveys/surveywall_api/{adslotId}?external_identifier={YOUR_USER_IDENTIFIER}&q5=1995-05-31&q6=20500&q7=8&hash=88cd2108b5347d973cf39cdf9053d7dd42704876d8c9a9bd8e2d168259d3ddf7function generateHash($requestParams, $profilingDataValidationHash) {
// Remove the 'hash' parameter
unset($requestParams['hash']);
// Sort parameters by key
ksort($requestParams);
// Build query string
$queryString = http_build_query($requestParams);
// Calculate HMAC-SHA256 hash
$expectedHash = hash_hmac('sha256', $queryString, $profilingDataValidationHash);
return $expectedHash;
}
// Input data
$profilingDataValidationHash = "your-key";
$requestParams = [
"external_identifier" => "testuser1234",
"q5" => "1995-05-31",
"q6" => "20500",
"q7" => "8"
];
echo "https://www.ayetstudios.com/surveys/surveywall_api/1234?external_identifier=testuser1234&q5=1995-05-31&q6=20500&q7=8&hash=" . generateHash($requestParams, $profilingDataValidationHash);













The Web Surveywall by ayeT-Studios allows you to easily monetize your desktop and mobile traffic with surveys that users can complete in exchange for getting a virtual currency reward.
You can bring your own VAST Tag Demand to our Ad Server solution to make direct deals with preferred partners in order to increase your overall eCPMs.


import AyetStudiosSDK
[...]
AyetSdk.sdkInit(appKey: "<your placement identifier from our dashboard>" , userIdentifier: "username (external identifier)" , callback: { available_currency , pending_currency , spent_currency in
print("Available currency: \(available_currency)")
print("Pending currency: \(pending_currency)")
print("Spent currency: \(spent_currency)")
});@IBAction func purchaseInAppItem(_ sender: Any) {
let deductAmount = 5
AyetSdk.deductBalance(amount: deductAmount , deductCallback: {callback in
if (callback.caseInsensitiveCompare("success") == .orderedSame) {
print("Deduct response is successful");
// TODO: activate the purchased content
}
else {
print("Deduct response is unsuccessful");
// this usually means that the user does not have sufficient balance in his account
}
})
} AyetSdk.getAvailableCurrency();
AyetSdk.getPendingCurrency();
AyetSdk.getSpentCurrency(); /AyetSdk.showOfferwall(currentController: self, adslotName: "my offerwall adslot name"); AyetSdk.sdkLogEnable(); https://surveys.ayet.io/surveys?adSlot=ADSLOT_ID&external_identifier={YOUR_USER_IDENTIFIER}https://your-server.com/callback?network=ayetstudios&amount={currency_amount}&external_identifier={external_identifier}&payout_usd={payout_usd}&adslot_id={adslot_id}https://your-server.com/callback?network=ayetstudios&amount=10&external_identifier=username&payout_usd=0.007&adslot_id=16

dependencies {
implementation("io.ayet:android-sdk-v2:1.0.3")
}<uses-permission android:name="android.permission.INTERNET" /><?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AyetSDKExample">
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.AyetSDKExample">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>import com.ayet.sdk.AyetSdk class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
AyetSdk.init(this, YOUR_PLACEMENT_ID, "USER_EXTERNAL_IDENTIFIER")
setContent {
AyetSDKExampleTheme {
Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
MainScreen(modifier = Modifier.padding(innerPadding))
}
}
}
}
}val context = LocalContext.current
AyetSdk.showSurveywall(context, "YOUR_SURVEYWALL_ADSLOT_NAME")val context = LocalContext.current
AyetSdk.showOfferwall(context, "YOUR_OFFERWALL_ADSLOT_NAME")AyetSdk.getOffers("YOUR_OFFERWALL_API_ADSLOT_NAME") { offersJson ->
if (offersJson != null) {
Log.d("MainActivity", "Offers received: $offersJson")
} else {
Log.w("MainActivity", "Failed to get offers - null response")
}
}val context = LocalContext.current
AyetSdk.showRewardStatus(context)AyetSdk.setTrackingCustom1("custom1")
AyetSdk.setTrackingCustom2("custom2")
AyetSdk.setTrackingCustom3("custom3")
AyetSdk.setTrackingCustom4("custom4")
AyetSdk.setTrackingCustom5("custom5")AyetSdk.setGender(Gender.MALE)
AyetSdk.setGender(Gender.FEMALE)
AyetSdk.setAge(25)
dependencies:
ayet_sdk_v2: ^1.0.4<uses-permission android:name="android.permission.INTERNET" /><?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AyetSDKExample">
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.AyetSDKExample">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>flutter config --enable-swift-package-managerimport 'package:ayet_sdk_v2/ayet_sdk_v2.dart';
final sdk = AyetSdkV2();
// Initialize with your placement ID and user identifier
await sdk.init(
placementId: YOUR_PLACEMENT_ID,
externalIdentifier: 'USER_EXTERNAL_IDENTIFIER',
);await sdk.showSurveywall('YOUR_SURVEYWALL_ADSLOT_NAME');await sdk.showOfferwall('YOUR_OFFERWALL_ADSLOT_NAME');final offersJson = await sdk.getOffers('YOUR_OFFERWALL_API_ADSLOT_NAME');await sdk.showRewardStatus();await sdk.setTrackingCustom1('custom1');
await sdk.setTrackingCustom2('custom2');
await sdk.setTrackingCustom3('custom3');
await sdk.setTrackingCustom4('custom4');
await sdk.setTrackingCustom5('custom5');await sdk.setAge(25);
await sdk.setGender(AyetGender.male);
await sdk.setGender(AyetGender.female);https://your-server.com/callback?network=ayetstudios&amount={currency_amount}&external_identifier={external_identifier}&payout_usd={payout_usd}https://your-server.com/callback?network=ayetstudios&amount=360&external_identifier=username&payout_usd=0.36https://your-server.com/callback?network=ayetstudios&amount={currency_amount}&external_identifier={external_identifier}&payout_usd={payout_usd}https://your-server.com/callback?network=ayetstudios&amount=360&external_identifier=username&payout_usd=0.36



<activity
android:name="com.ayetstudios.publishersdk.OfferwallActivity"
android:configChanges="orientation|screenSize">
<intent-filter android:label="offer">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="offer" android:host="com.example.myapplication" /> <!-- Replace with your lower case package name -->
</intent-filter>
</activity>
<activity android:name="com.ayetstudios.publishersdk.VideoActivity" android:configChanges="orientation|screenSize" /> <meta-data android:name="AYET_APP_KEY" android:value="xxxxxxxxxxxxxxxx" /><uses-permission android:name="android.permission.INTERNET" /> <!-- mandatory permission -->
<uses-permölmission android:name="android.permission.READ_PHONE_STATE" /> <!-- optional -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <!-- optional -->
This is an example for a complete AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myapplication"> <!-- Replace with your lower case package name -->
<uses-permission android:name="android.permission.INTERNET" /> <!-- mandatory permission -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> <!-- optional -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <!-- optional -->
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
android:name=".MainActivity"
android:label="@string/app_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<!-- Publisher SDK Specific-->
android:name="com.ayetstudios.publishersdk.OfferwallActivity"
android:configChanges="orientation|screenSize">
<intent-filter android:label="offer">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="offer" android:host="com.example.myapplication" /> <!-- Replace with your lower case package name -->
<activity android:name="com.ayetstudios.publishersdk.VideoActivity" android:configChanges="orientation|screenSize"></activity>
<meta-data android:name="AYET_APP_KEY" android:value="xxxxxxxxxxxxxxxx" />
<!-- End of: Publisher SDK Specific-->@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
AyetSdk.init(getApplication(), "username (external identifier)", new UserBalanceCallback() { // UserBalanceCallback is optional if you want to manage balances on your servers
@Override
public void userBalanceChanged(SdkUserBalance sdkUserBalance) {
Log.d("AyetSdk" , "userBalanceChanged - available balance: "+sdkUserBalance.getAvailableBalance()); // this is the new total available balance for the user
}
@Override
public void userBalanceInitialized(SdkUserBalance sdkUserBalance) {
Log.d("AyetSdk" , "SDK initialization successful");
Log.d("AyetSdk" , "userBalanceInitialized - available balance: "+sdkUserBalance.getAvailableBalance()); // this is the total available balance for the user
Log.d("AyetSdk" , "userBalanceInitialized - spent balance: "+sdkUserBalance.getSpentBalance()); // this is the total amount spent with "AyetSdk.deductUserBalance(..)"
Log.d("AyetSdk" , "userBalanceInitialized - pending balance: "+sdkUserBalance.getPendingBalance()); // this is the amount currently pending for conversion (e.g. user still has offer requirements to meet)
}
@Override
public void initializationFailed() {
Log.d("AyetSdk", "initializationFailed - please check APP API KEY & internet connectivity");
}
});
setContentView(R.layout.activity_main);
} if (AyetSdk.isInitialized()) {
Log.d("AyetSdk" , "SDK is ready");
} else {
Log.d("AyetSdk" , "SDK is NOT ready");
} mPurchaseInAppItemButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
int amount=100;
AyetSdk.deductUserBalance(getApplication(), amount, new DeductUserBalanceCallback() {
@Override
public void success() {
Log.d("AyetSdk" , "deductUserBalance - successful, new available balance: "+AyetSdk.getAvailableBalance());
// TODO: activate the purchased content
}
@Override
public void failed() {
Log.d("AyetSdk" , "deductUserBalance - failed");
// this usually means that the user does not have sufficient balance in his account
}
});
}
});AyetSdk.showOfferwall(getApplication(), "offerwall adslot name");-keep class com.ayetstudios.publishersdk.messages.** {*;}
-keep public class com.ayetstudios.publishersdk.AyetSdk
-keepclassmembers class com.ayetstudios.publishersdk.AyetSdk {
public *;
}
-keep public interface com.ayetstudios.publishersdk.interfaces.UserBalanceCallback { *; }
-keep public interface com.ayetstudios.publishersdk.interfaces.DeductUserBalanceCallback { *; }
-keep class com.ayetstudios.publishersdk.models.VastTagReqData { *; }
<script src="https://cdn.ayet.io/offerwall/js/ayetvideosdk.min.js"></script> var placementId=3; // This is the numeric id of your web placement
var externalIdentifier="{your user identifier}";
var optionalParameter=null; // or a string(32)
AyetVideoSdk.init(placementId, externalIdentifier, optionalParameter).then(function() {
console.log("finished initialization!");
});/* An error occured when trying to play a video ad. After this callback, no video is being rendered and a new ad has to be requested first: */
AyetVideoSdk.callbackError = function(e) {console.log("callbackError: "+JSON.stringify(e));};
/* After this callback, a video will start playing: */
AyetVideoSdk.callbackPlaying = function() {console.log("callbackPlaying");};
/* After this callback, playing the video is finished and the player is closed: */
AyetVideoSdk.callbackComplete = function() {console.log("callbackComplete");};
/* This callback is sent once a second while a video is being played: */
AyetVideoSdk.callbackProgress = function(remainingSeconds) {console.log("callbackProgress: "+Math.round(remainingSeconds)+"s remaining");};
/* This callback is sent if a video has been completed and the impression has gone through fraud checks (see "Rewarding Users" for more details): */
AyetVideoSdk.callbackRewarded = function(details) {appendLog("callbackRewarded: "+JSON.stringify(details));};AyetVideoSdk.requestAd(
'{your_rewarded_video_adslot_name}',
function() { // success callback function
console.log("requestAd successful");
},
function(msg) { // error callback function
appendLog("requestAd failed: "+msg);
}
); /* Play the ad in a pre-defined div (consult your account manager to determine if size & location is appropriate for all demand partners): */
AyetVideoSdk.playInPageAd('video_div');
/* Play the ad full size (100% of your page viewport): */
AyetVideoSdk.playFullsizeAd();
/* Play the ad fullscreen (this temporarily switches the browser to fullscreen mode): */
AyetVideoSdk.playFullscreenAd();/* This example assumes an ad was requested a longer time ago and we're unsure if the bid expired already */
if (AyetVideoSdk.isAdAvailable()) {
AyetVideoSdk.playInPageAd('{your_html_video_div_id}');
} else {
/* Either abort and notify the user or request and play a fresh ad: */
AyetVideoSdk.requestAd(
'{your_rewarded_video_adslot_name}',
function() { // success callback function
AyetVideoSdk.playInPageAd('{your_html_video_div_id}');
},
function(msg) { // error callback function
appendLog("requestAd failed: "+msg);
}
);
}/* Interrupt a playing ad and destroy the player (to play another ad later, a new call to AyetVideoSdk.requestAd is required) */
AyetVideoSdk.destroy();/* This callback is sent if a video has been completed and the impression has gone through fraud checks: */
AyetVideoSdk.callbackRewarded = function(details) {appendLog("callbackRewarded: "+JSON.stringify(details));};
/* Example output:
callbackRewarded: {"status":"success","rewarded":true,"externalIdentifier":"your user identifier","currency":10,"conversionId":"aef8cd370cfe-video-u94-adbcec159f76","signature":"f98c35ae4facef42dce5b31f6a5f9f0e8819b8ec"}
*/
/* Example output if custom parameters were set:
callbackRewarded: {"status":"success","rewarded":true,"externalIdentifier":"your user identifier","currency":10,"conversionId":"aef8cd370cfe-video-u94-adbcec159f76","custom_1":"bar", "custom_3":"foo","signature":"e35d78be4facef42dce5b31f6a5f9f0e8821c3de"}
*/$signature = hash_hmac('sha1',
$response['externalIdentifier'] .
$response['currency'] .
$response['conversionId'] .
(isset($response['custom_1']) ? isset($response['custom_1'] : '') .
(isset($response['custom_2']) ? isset($response['custom_2'] : '') .
(isset($response['custom_3']) ? isset($response['custom_3'] : '') .
(isset($response['custom_4']) ? isset($response['custom_4'] : '') .
(isset($response['custom_5']) ? isset($response['custom_5'] : '')
, $user->publisher->user->api_key);/* Example of setting custom parameters: */
AyetVideoSdk.setCustomParameter("custom_1", "bar");
AyetVideoSdk.setCustomParameter("custom_3", "foo");
/* Example of unsetting custom parameter: */
AyetVideoSdk.setCustomParameter("custom_1", null);