> This is part 1 of 2 of the full documentation (pages 1–100 of 158).
> The content is paginated: fetch every part to see all of it.
> Next part: https://docs.ayetstudios.com/v/llms-full.txt/1
> Page index: https://docs.ayetstudios.com/v/llms.txt

> Agents can also search and read this documentation through its [MCP server](https://docs.ayetstudios.com/v/~gitbook/mcp).

# Product Docs


# Dashboard Setup


# Account


# Creating an Account

In this page you can find step-by-step instructions on how to get started

## 1.Access the Dashboard

To create an account click the following link:

{% embed url="<https://www.ayetstudios.com/account/login>" %}

## 2.Create Account

Once you have clicked the link shown above, click on **"Create Account"**.

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FsczLzxOrj28QN2PhAkBY%2F1.jpg?alt=media&amp;token=7fc215cb-8e59-4eaf-b003-1d6b851c0104" alt=""><figcaption></figcaption></figure>

## 3.Publisher Account

**Select:** Publisher (Monetize your apps) from the drop-down menu.

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FJB70MrLrsE4cB04Bi0zH%2F2.jpg?alt=media&amp;token=53514b54-c6d9-4c9c-9194-d3b15def5181" alt=""><figcaption></figcaption></figure>

## 4. Fill in the Information

First, you have to chose if you are business or Person, and then fill in the rest of the information. Enter company and/or your name, last name, address, country and email.

{% hint style="info" %}
You can edit / change this information.
{% endhint %}

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2Fx7tu10356LyeGUCRfOU3%2F3.jpg?alt=media&amp;token=b89f87ba-7453-4f8d-b932-bbcc31d93d4a" alt=""><figcaption></figcaption></figure>

## 5. Sign up

You have to read through and agree to the [Advertiser Terms](https://www.ayetstudios.com/advertiser-terms) or [Publisher Terms](https://www.ayetstudios.com/publisher-terms) and [Privacy Policy](https://www.ayetstudios.com/privacy-policy)

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2F80C2ehlaX830g11VAWSy%2F4.jpg?alt=media&amp;token=ce24d572-a112-49cd-acd6-263ab88f346a" alt=""><figcaption></figcaption></figure>


# Personal Information

This page shows you how to fill out or update your personal / company information

{% hint style="info" %}
You can change and update your personal information.
{% endhint %}

## 1. Log into your account

To access your Publisher account click on the following link:

{% embed url="<https://www.ayetstudios.com/account/login>" %}

## 2. Account Settings

On the left-hand side of the screen:

* Click on **"Account Settings"**
* Click on **"Personal/Company Information"**

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FbTrdWnboZ9Li9oE7cQ9y%2F5.jpg?alt=media&amp;token=fd182deb-e896-4a8c-b040-767799ec0bd1" alt=""><figcaption></figcaption></figure>

## 3.Fill out / update all of the fields

First, you have to chose if you are business or Person, and then fill in the rest of the information. Enter company and/or your name, last name, address, country and email.

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FafOlHBGyXnURK9LR9ZD8%2F6.jpg?alt=media&amp;token=d60f70f5-2869-4a43-829b-cd44fe18da32" alt=""><figcaption></figcaption></figure>

## 4. Update

Once you are done filling out all of the provided fields, click on **"Update Personal/Additional Information"**

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FqoKVGwHbPDESFeDxKXBQ%2F7.jpg?alt=media&amp;token=2f0403d8-7314-4a7f-9756-9cba4681012c" alt=""><figcaption></figcaption></figure>


# Payments & Billing

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.

## Update Billing Information

{% hint style="danger" %}
You have to provide the correct billing information during the integration process
{% endhint %}

### 1. Log into your Publisher account

{% embed url="<https://www.ayetstudios.com/account/login>" %}

### 2. Access Account Settings

Under Account setting - (in the bottom right corner of the screen) click on "Billing Setting"

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FJuE665D8NyKZNN9bHxqt%2Fpicture.jpg?alt=media&amp;token=5115fcbe-ef17-4390-9a92-a57702d0213b" alt=""><figcaption></figcaption></figure>

### 3. Select your preferred method

In the **“Payout Method and Currency”** section activate the drop-down list and chose your preferred payout method and currency.

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FDS7W7Vy18kfEW1wV2Y0X%2Fpicture(1).jpg?alt=media&amp;token=ba08c1c9-4c76-48b7-aad0-583c5c87fb24" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Note: Each payment method has a different minimum payout threshold (The minimum payout threshold is shown next to the preferred payout method).
{% endhint %}

Example: If you chose PayPal as the preferred payout method, we will make payments to you that are a minimum of 25$. If you do not reach the minimum threshold in the current month, the amount earned will be transferred to the next.

### 4. Update Billing Information

Once you have filled out all of the required fields, click on **"Update Billing Information"**

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FPDoRMOEpME00RHMoelMi%2F10.jpg?alt=media&amp;token=d138aad3-9bdb-4214-bb62-d38717a26a61" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you want to update your existing billing information please inform us at: <billing@ayetstudios.com>
{% endhint %}

## Credit Notes

Whenever a payout is due - we issue a credit note. You can see the current (pending) credit note in the dashboard.

The current billing cycle includes all accumulated earnings and deductions since the last credit note has been created. If the sum of these positions is greater or equal the threshold for the selected payout method, a credit note is generated.

**To check your credit note:**

### 1. Log into your Publisher account

{% embed url="<https://www.ayetstudios.com/account/login>" %}

### 2. Access Account Settings

Under Account setting - (in the bottom right corner of the screen) - click on **"Payments"**

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FI9Gx2jmzZQW7H9YfolpF%2F11.jpg?alt=media&amp;token=d1581821-6af9-4303-a570-92d9b01c7391" alt=""><figcaption></figcaption></figure>

### **3. Current Billing Cycle**

In this section, you can find Overview of your earnings for each one of your placement(s) in the current billing cycle.

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FqpHwooMToV32X6OaxPzU%2F12.jpg?alt=media&amp;token=933ea995-6937-4e87-9f70-e5f4d7cf658c" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Once the payout threshold is made - we will make the payment.**
{% endhint %}

## Payments

Whenever a payout threshold is reached - we issue the payout. You can see all the payouts made out to you in the dashboard.

### 1. Log into your Publisher account

{% embed url="<https://www.ayetstudios.com/account/login>" %}

### 2. Access Account Settings

Under Account setting - (in the bottom right corner of the screen) - click on **"Payments"**

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2F9dUfO863vdrBE68yncUy%2F13.jpg?alt=media&amp;token=1b9e87a1-61c0-450e-a57f-49c0567fe992" alt=""><figcaption></figcaption></figure>

### 2. Credit Notes

**"Under Credit Notes"** you can find all payments made out to you.

You can download the credit notes, and check the status of all historic payouts.

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2Fs6MbnPEQwK0vJfyEJgfR%2F14.jpg?alt=media&amp;token=342c4395-e857-4ec7-9a41-25fece104967" alt=""><figcaption></figcaption></figure>

**You can sort the credit notes by status (for example "Paid") by selecting it in the field "Status".**

**You can also download the credit notes, by clicking on "Download" in a row or the respective credit note.**


# Creating Sub-Accounts

Learn how to create Sub-Accounts to grant access to your dashboard for your colleagues

## 1. Log into your account

To access your Publisher account click on the following link:

{% embed url="<https://www.ayetstudios.com/account/login>" %}

## 2. Navigate to Sub-Acocunts

On the left-hand side of the screen:

* Click on **"Sub-Accounts"**
* Click on **"Create Sub-Account"** on the top right

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FajBSeB7m3tvW64kjOH0J%2FSub-Account-Creation.png?alt=media&amp;token=af41c3e8-4f87-4c20-9142-67ab562722d8" alt=""><figcaption></figcaption></figure>

## 3. Fill in the Information

* Add the email address of your colleague
* Add First & Last Name of your colleague
* Click **"Create"**

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FdkyF5JB7Ahw8cTiiBtMm%2FSub-Account-Creation-II.png?alt=media&amp;token=194fee0c-c892-4ba3-bea5-bd7f0dcc3f3c" alt=""><figcaption></figcaption></figure>

## 4. Tell your colleague to finish the setup

* Your colleague will receive an email from ayeT-Studios with instructions to reset their password
* After completing the process, they will be able to log into their account


# Placements


# What is a Placement?

A Placement is meant to represent your app or website. It indicates the platform that your owned & operated asset is build for and running on.

A Placement can be one of the following:

* Android App
* iOS App
* Website
* Network / API

For example, you create a separate Placement for your Android App and a separate Placement for your IOS app.

{% hint style="info" %}
**React Native Example**

If you created an app via React Native and you compile your production version for both Android and IOS, you would ideally set up the following placement on ayeT-Studios:

* Android App
* iOS App
  {% endhint %}

{% hint style="danger" %}
Once you create a Placement, you cannot change the platform type
{% endhint %}

While creating a Placement, you also set up the AdSlot, which you select based on the type of integration or ad format you want to use.

Follow the link below to read about AdSlots.

{% content-ref url="/pages/4FgIVILLi0iPh1UfDG2Z" %}
[What is an AdSlot?](https://docs.ayetstudios.com/v/product-docs/dashboard-setup/adslots/what-is-an-adslot)
{% endcontent-ref %}


# Creating a Placement

In this section, you can find step-by-step guidance on how to set up placement and get started.

## 1. Log in to the dashboard

{% embed url="<https://www.ayetstudios.com/account/login>" %}

## 2. Placements / Apps

On the left-hand side of the screen click on **"Placements / Apps"**

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FXn4R0XrHEeRS2lp10CQC%2F15.jpg?alt=media&amp;token=9411de1f-6792-49f0-8792-21cbba38479c" alt=""><figcaption></figcaption></figure>

## 3. + Add application / Placement

In the upper-right corner of the screen - click on **"+ Add Application / Placement"**

## **4. Select the Placement type**

**In this step you select the type of platform you want to integrate.**

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FE8dtjpFKX46L38d8qE9i%2F16.jpg?alt=media&amp;token=2f95e24a-ea42-4e74-879d-02c8fd06d7ca" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
**Once you have created a Placement - you cannot change the placement type**
{% endhint %}

## 5. Fill in the information

For example: Creating a new **Android App placement**

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FE8dtjpFKX46L38d8qE9i%2F16.jpg?alt=media&amp;token=2f95e24a-ea42-4e74-879d-02c8fd06d7ca" alt=""><figcaption></figcaption></figure>

## **6. Select your preferred Adslot**

Adslot is the HTML markup that defines where an ad appears. You chose adslot type based on the integration (for example Rewarded Video). (The adslot ID is relevant in integration).

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FONqUq6bD2X81qGtfU208%2F18.jpg?alt=media&amp;token=83cfdfc2-8cd2-47ec-a1a4-5f80186baf83" alt=""><figcaption></figcaption></figure>

## **7. Fil in the Adslot information**

* The name of your currency;
* Adjust the conversion rate;
* Currency decimal places.

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2F7NR2AzYlot4bAUXvm5m6%2F19.jpg?alt=media&amp;token=3818e754-d4dc-441e-8ba5-2e03af3d32ab" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**You can customize your virtual currency:**
{% endhint %}

{% content-ref url="/pages/xDdOvS6OpXlB24IhM3CW" %}
[Design Settings](https://docs.ayetstudios.com/v/product-docs/dashboard-setup/adslots/design-settings)
{% endcontent-ref %}

## 8. Create Placement

Once you are done filling out the information - click on "Create Placement"

{% hint style="info" %}
If the button is not clickable - some information is missing
{% endhint %}


# Callbacks Settings

## 1. Offerwall Callbacks

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}

## 2. Rewarded Video Callbacks

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}


# Securing Callbacks

## 1. Offerwall Securing Callbacks

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}

## 2. Rewarded Video Securing Callbacks

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}


# AdSlots


# What is an AdSlot?

An AdSlot is a combination of type of ad, integration and placement of the ad on your website or within your app.

There is a number of AdSlot Types that you can choose from, dependent on if you added an Android App, an iOS App or a Website. AdSlot Types include:

* Offerwall
* Rewarded Video
* Offerwall API
* Static API
* Web Surveywall

{% hint style="info" %}
You can add 1+n AdSlots for each Placement you created, giving you the room to slice and dice setups within your App or on your Website.
{% endhint %}

{% hint style="danger" %}
The AdSlot ID is relevant for most of the integrations on the ayeT-Studios platform.
{% endhint %}

The beauty of AdSlots are that you can add n+1 AdSlots to for each of your Placements.

That way you can for example have two offerwalls within your Android App. Each Offerwall can then carry its own virtual currency and its own design.

You can also create more complex setups to run 10 or more offerwalls within your app, while aggregating data.

The same is true for Rewarded Video setups. You can for example add one Website and five AdSlots to have users unlock boosters for AdSlot 1, decrease waiting time for AdSlot 2 and get bonus coins for AdSlot 3.

{% hint style="danger" %}
Before creating an AdSlot, you have to create a Placement for your App or Website first.
{% endhint %}

Read more about how to create a Placement:

{% content-ref url="/pages/H8Nj8r9iKKM8y76JCOU7" %}
[Creating a Placement](https://docs.ayetstudios.com/v/product-docs/dashboard-setup/placements/creating-a-placement)
{% endcontent-ref %}

Once you have created your first Placement and AdSlot, you can easily add additional AdSlots to your placement.


# Currency Settings

## For Offerwall

### 1. Log into the dashboard

{% embed url="<https://www.ayetstudios.com/account/login>" %}

### 2. Chose the Placement

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FXn4R0XrHEeRS2lp10CQC%2F15.jpg?alt=media&amp;token=9411de1f-6792-49f0-8792-21cbba38479c" alt=""><figcaption></figcaption></figure>

In the central part of the screen, all of your Placements will be shown - Locate the Placement which you want to customize

### 3. Edit Adslot

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FetnDywvL4DMVXpjTZugp%2F20.jpg?alt=media&amp;token=b9599abb-4cc8-4eb3-acee-9744e77f0129" alt=""><figcaption></figcaption></figure>

### 4. Currency Setup

In the pop-up window click on **"Overview".**

In this section you can adjust:

* The name of your currency(s);
* Adjust the conversion rate;
* Chose a minimum Offer Payout

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FyI0fZiGc6Wf2C9Rqkbl4%2F21.jpg?alt=media&amp;token=e44ac79b-05f2-4dcf-bf5e-124674645ea5" alt=""><figcaption><p>You set the Currency Conversion Rate depending on how much you want to reward the user for each $1 you earn.<br><br>For example, if $1 = 1000 Coins on your end and you want to set a 40% share for the users, you need to fill-in in the conversion rate field: $1 = 400<br>(40% from 1000 = 400)</p></figcaption></figure>

## For Rewarded Video

### 1. Log into the dashboard

{% embed url="<https://www.ayetstudios.com/account/login>" %}

### 2.Chose the Placement

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FXn4R0XrHEeRS2lp10CQC%2F15.jpg?alt=media&amp;token=9411de1f-6792-49f0-8792-21cbba38479c" alt=""><figcaption></figcaption></figure>

In the central part of the screen, all of your Placements will be shown - Locate the Placement which you want to customize

### 3. Edit Adslot

Once you have located the Placement you want to customize - click on **"Edit Adslot" -** on the Rewarder Video Adslot of the Placement.

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FD6nKH5cw3UJ6TwvBRsDg%2F22.jpg?alt=media&amp;token=7ab7fbc7-bf19-48f4-ac00-cdc32ab41a4f" alt=""><figcaption></figcaption></figure>

### 4. Currency Setup In the pop-up window click on **"Overview".**

In this section you can adjust:

* Rewarded Video Caps (per user / device);
* Video Volume;
* The name of your currency(s);
* Currency Per Completed View (optional).


# Design Settings

{% hint style="success" %}
You can customize the Offerwall to your liking
{% endhint %}

## Custom Theme

### 1. Log into the dashboard

{% embed url="<https://www.ayetstudios.com/account/login>" %}

### 2. Chose the Placement

In the left-hand side of at the top of the screen - click on "Placements / Apps"

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FXn4R0XrHEeRS2lp10CQC%2F15.jpg?alt=media&amp;token=9411de1f-6792-49f0-8792-21cbba38479c" alt=""><figcaption></figcaption></figure>

In the central part of the screen, all of your Placements will be shown - Locate the Placement which you want to customize

### 3. Edit Adslot

Once you have located the Placement you want to customize - click on **"Edit Adslot" -** on the Offerwall Adslot of the Placement.

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2F6EShvIc7i8ANSabnH7GM%2F23.jpg?alt=media&amp;token=7c3b751a-5ff4-4596-951a-d261030d9fd9" alt=""><figcaption></figcaption></figure>

### 4. Offerwall Design

In the pop-up window click on **"Offerwall Design"**.

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FwnRA6ZQ8ZUrByarxb6bQ%2F24.jpg?alt=media&amp;token=91b69bd8-fc69-48ed-aff1-89f0500a69ad" alt=""><figcaption></figcaption></figure>

### 5. Customize

{% hint style="info" %}
The changes you make are displayed in the Offerwall Preview
{% endhint %}

From the drop-down menu you can select different types of themes. You have predefined themes, but you can also make a custom theme. You can select the colors you preferer.

<div align="left"><figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2F3mxgjHNzD6rxtGczNMxm%2F25.jpg?alt=media&amp;token=39ccdaad-aa95-439c-8869-d03e692aeb1d" alt=""><figcaption></figcaption></figure></div>

## Custom Banner

### 1. Log into the dashboard

{% embed url="<https://www.ayetstudios.com/account/login>" %}

### 2. Chose the Placement

In the left-hand side of at the top of the screen - click on "Placements / Apps"

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FXn4R0XrHEeRS2lp10CQC%2F15.jpg?alt=media&amp;token=9411de1f-6792-49f0-8792-21cbba38479c" alt=""><figcaption></figcaption></figure>

In the central part of the screen, all of your Placements will be shown - Locate the Placement which you want to customize

### 3. Edit Adslot

Once you have located the Placement you want to customize - click on **"Edit Adslot" -** on the Offerwall Adslot of the Placement.

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2F6EShvIc7i8ANSabnH7GM%2F23.jpg?alt=media&amp;token=7c3b751a-5ff4-4596-951a-d261030d9fd9" alt=""><figcaption></figcaption></figure>

### 4. Offerwall Design

In the pop-up window click on **"Offerwall Design"**.

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FwnRA6ZQ8ZUrByarxb6bQ%2F24.jpg?alt=media&amp;token=91b69bd8-fc69-48ed-aff1-89f0500a69ad" alt=""><figcaption></figcaption></figure>

### 5. Customize

{% hint style="info" %}
The changes you make are displayed in the Offerwall Preview
{% endhint %}

On top of the Offerwall you can add your custom banner / image

* Chose if you like to upload a Portrait Image or Landscape image
* Next to the respective image type you chose - click on **"Chose File"**
* Locate and upload the file you want
* Click on **"Save"**

{% hint style="info" %}
For Portrait Image - we recommend 1080px x (120px to 350px)

For Landscape Image - we recommend 1920px x (70px to 200 px)
{% endhint %}

<div align="left"><figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FLagfKwMfNd2LVtuK6yfG%2F26.jpg?alt=media&amp;token=5fb626bf-ee45-4e94-a792-a0a215cbcda2" alt=""><figcaption></figcaption></figure></div>

## Custom Coin

### 1. Log into the dashboard

{% embed url="<https://www.ayetstudios.com/account/login>" %}

### 2. Chose the Placement

In the left-hand side of at the top of the screen - click on "Placements / Apps"

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FXn4R0XrHEeRS2lp10CQC%2F15.jpg?alt=media&amp;token=9411de1f-6792-49f0-8792-21cbba38479c" alt=""><figcaption></figcaption></figure>

In the central part of the screen, all of your Placements will be shown - Locate the Placement which you want to customize

### 3. Edit Adslot

Once you have located the Placement you want to customize - click on **"Edit Adslot" -** on the Offerwall Adslot of the Placement.

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2F6EShvIc7i8ANSabnH7GM%2F23.jpg?alt=media&amp;token=7c3b751a-5ff4-4596-951a-d261030d9fd9" alt=""><figcaption></figcaption></figure>

### 4. Offerwall Design

In the pop-up window click on **"Offerwall Design"**.

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FwnRA6ZQ8ZUrByarxb6bQ%2F24.jpg?alt=media&amp;token=91b69bd8-fc69-48ed-aff1-89f0500a69ad" alt=""><figcaption></figcaption></figure>

### 5. Customize

You can customize your virtual coin as you wish. You can choose a color of your liking, but also upload your designed coin.

* Select Theme - from the drop-down menu click on "Customize"
* Select Custom Coin - From the drop-down menu click on "Upload Custom Image"

<div align="left"><figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2F6Tb1Q8RcztEXfu5Cgkdu%2F27.jpg?alt=media&amp;token=93f1ea54-1cf4-4c56-930e-23f70fb58f11" alt=""><figcaption></figcaption></figure></div>

* To upload the image click on "Choose File"

{% hint style="info" %}
We recommend using image 50px x 50px
{% endhint %}

<div align="left"><figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2F3kR3wURHvRLiyn5Aqdst%2F28.jpg?alt=media&amp;token=7c4868ce-ade8-481a-8913-c03617a7aad3" alt=""><figcaption></figcaption></figure></div>

{% hint style="success" %}
Click on "Save"
{% endhint %}


# Offerwall


# Web Integrations


# Web Offerwall

The ayeT-Studios Publisher Browser Web Offerwall allows you to easily monetize your desktop and mobile traffic and reward your users with virtual currency.

## Eligible Placement & AdSlot Combinations <a href="#eligible-placement-and-adslot-combinations" id="eligible-placement-and-adslot-combinations"></a>

The below table shows all Placement & AdSlot Type combinations that allow you to utilize the Web Offerwall integration.

| Placement Type | AdSlot Type | Eligible Integration Type |
| -------------- | ----------- | ------------------------- |
| Website        | Offerwall   | Web Offerwall             |

{% hint style="danger" %}
If you integrate the Web Offerwall while using a different Placement & AdSlot combination in the ayeT-Studios dashboard, you won't be able to initialize the Offerwall.
{% endhint %}

## Utilization for Desktop, Mobile Web & In-App <a href="#utilization-for-desktop-mobile-web-and-in-app" id="utilization-for-desktop-mobile-web-and-in-app"></a>

Technically, the Offerwall has to be implemented by opening a new browser tab or loading the Offerwall link inside an iframe.

This type of Web Offerwall is intended to be called directly in an actual browser and is not very well suited for webview (in-app) integration. For this type of integration, please take a look at our seamless In-App integrations by checking out our available SDKs, Wrappers and Plugins.

{% hint style="info" %}
The **Web Offerwall** can nevertheless be used in-app if you follow a few guidelines

* Your placement has to be a "Website" placement
* You have link out of your app to open the Web Offerwall in a mobile browser

Please follow the Integration Best Practises.
{% endhint %}

### Integration Best Practices <a href="#integration-best-practises" id="integration-best-practises"></a>

| Platform   | Integration Best Practise                                                                                       | Offers                                                                                                                                                                 |
| ---------- | --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Desktop    | Open the web offerwall in a new tab or iframe.                                                                  | The web Offerwall shows web and mobile offers to the user. Users can send mobile offers to their mobile devices.                                                       |
| Mobile Web | Open the web offerwall in a new tab or iframe.                                                                  | The web offerwall adjusts its layout if users access via a mobile device. I.e. for accessing via an Android device, users will see elibile Android offers to complete. |
| In-App     | Create a button in your app that leads users into their mobile browser and into the ayeT-Studios Web Offerwall. | The web offerwall shows mobile offers according the the user's device only.                                                                                            |

## Getting Started

Before you start with the integration, make sure you:

* [x] Create an Account
* [x] Add a Placement
* [x] Add an AdSlot

You will find more details here:

{% content-ref url="/pages/W7CE6bNya8L7RoaXXY21" %}
[Dashboard Setup](https://docs.ayetstudios.com/v/product-docs/dashboard-setup)
{% endcontent-ref %}

## Your Browser Offerwall Link - Mandatory Parameters <a href="#your-browser-offerwall-link-mandatory-parameters" id="your-browser-offerwall-link-mandatory-parameters"></a>

The URL template for our web offerwall looks like this:

```
https://offerwall.ayet.io/offers?adSlot={ADSLOT_ID}&externalIdentifier={YOUR_USER_IDENTIFIER}
```

To retrieve the URL for one of your web offerwall adslots, click on "Edit" next to an AdSlot under *Placements / Apps* and retrieve the *Integration URL* in the modal.

URL Parameters:

<table><thead><tr><th width="230">Parameter</th><th width="121.33333333333331">Mandatory</th><th>Description</th></tr></thead><tbody><tr><td>externalIdentifier</td><td>yes</td><td>Your identifier for the calling user - this is mandatory, has to be minimum 3 characters and allows you to attribute our Server2Server conversion callbacks to a specific user (returned in {uid})</td></tr><tr><td>custom_1</td><td>no</td><td><p>Custom parameter you can pass to the Offerwall Entry Link in the form of: &#x26;custom_1={YOUR_CUSTOM_PARAMETER}</p><p>You can get this variable back via conversion callbacks</p></td></tr><tr><td>custom_2</td><td>no</td><td><p>Custom parameter you can pass to the Offerwall Entry Link in the form of: &#x26;custom_2={YOUR_CUSTOM_PARAMETER}</p><p>You can get this variable back via conversion callbacks</p></td></tr><tr><td>custom_3</td><td>no</td><td><p>Custom parameter you can pass to the Offerwall Entry Link in the form of: &#x26;custom_3={YOUR_CUSTOM_PARAMETER}</p><p>You can get this variable back via conversion callbacks</p></td></tr><tr><td>custom_4</td><td>no</td><td><p>Custom parameter you can pass to the Offerwall Entry Link in the form of: &#x26;custom_4={YOUR_CUSTOM_PARAMETER}</p><p>You can get this variable back via conversion callbacks</p></td></tr><tr><td>custom_5</td><td>no</td><td><p>Custom parameter you can pass to the Offerwall Entry Link in the form of: &#x26;custom_5={YOUR_CUSTOM_PARAMETER}</p><p>You can get this variable back via conversion callbacks</p></td></tr></tbody></table>

## Conversion Callbacks & Currency Handling <a href="#conversion-callbacks-and-currency-handling" id="conversion-callbacks-and-currency-handling"></a>

Learn about:

* Setting up callbacks
* IP Whitelists
* Securing callbacks using HMAC Security Hash
* Testing callbacks

Click on the link below:

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}


# SDK Integrations (deprecated)


# Android SDK

The Android SDK allows you to easily monetize your app and reward your users with in-app currency. Your users get access to our offerwalls, allowing them to earn currency for completing offers.

{% hint style="info" %}

### Updates History

**2024-08-16: v3.6** - Removed documentation for deprecated "Native Offer Feed" functionality. Recommended replacement is client or server side "Offerwall API".

**2022-04-12: v3.6** - Updated SDK to Android Api 30 (Android 11) and restored compliance with updated privacy requirements

**2022-02-11: v3.5.2** - Removed Rewarded Video from documentation

**2020-08-11: v3.5.1** - Updated documentation to introduce new parameters to differentiate chargebacks from conversions

**2020-07-29: v3.5** - Improved UI / handling, removed deprecated INSTALL\_REFERRER, performance improvements and bug fixes

**2019-08-20: v3.4** - Updated Android SDK to support decimal places in payouts (currency amount) for native offers

**2019-07-19: v3.3** - Updated Android SDK and documentation to reflect the adslot changes 2019-06-21: v3.2 - Native Offer Feed functionality

**2019-02-01: v3.1** - Fixed conversion tracking issues under certain conditions (application lifecycle monitoring improved)

**2018-11-29: v3.0** - Full support for API 26+ build targets, bugfixes, simplified use & improved handling under poor network conditions

**2018-07-02: v2.1** - Fixed video ad orientation & resolution issues on Android 8.1

**2018-06-18: v2.0** - Video Ads & Rewarded Video Ads 2017-11-01: v1.1 - Fixed incompatibilities with present GSON dependencies 2017-10-29: v1.0 - Initial Release of our Publisher SDK (Android)
{% endhint %}

## Eligible Placement & AdSlot Combinations <a href="#eligible-placement-and-adslot-combinations" id="eligible-placement-and-adslot-combinations"></a>

The table below shows all Placement & AdSlot Type combinations that allow you to utilize the Android SDK integration.

| Placement Type | AdSlot Type | Eligible Integration Type |
| -------------- | ----------- | ------------------------- |
| Android App    | Offerwall   | Android SDK               |

{% hint style="danger" %}
If you integrate the Android SDK while using a different Placement & AdSlot combination in the ayeT-Studios dashboard, you won't be able to initialize the Offerwall.
{% endhint %}

## Getting Started

Before you start with the integration, make sure you have:

* [x] Created an Account
* [x] Added a placement
* [x] Added an AdSlot

You will find more details here:

{% content-ref url="/pages/W7CE6bNya8L7RoaXXY21" %}
[Dashboard Setup](https://docs.ayetstudios.com/v/product-docs/dashboard-setup)
{% endcontent-ref %}

{% hint style="info" %}
Make sure to use the correct package name that you intend to use for your final app.

Or create a test placement with a different package name that matches the package name of your test app.

If package name of your placement and your actual app don't match, you can't initialize the Offerwall.
{% endhint %}

## User Balance

The integration is simple and allows both managed and unmanaged user balances / currencies.

A **managed user balance** / currency is a user balance that is stored on our servers. We store user information and the amount of virtual currency a user owns. You can use balance listeners to manage the amount of currency each user has on our servers.

{% hint style="info" %}
We don't recommend a managed user balance!

Managed user balances don't work well alongside additional rewarded ad integrations.
{% endhint %}

An **unmanaged user balance** / currency is a user balance that is stored on your servers. You receive callbacks and handle user wallets yourself.

{% hint style="info" %}
This form of user balance is recommended.

You will find additional information about callbacks at the end of the Adndroid SDK documentation.
{% endhint %}

## Download the Library

You can download the lastest version of our publisher library here:

{% embed url="<https://www.ayetstudios.com/ayetpublisher3.6.jar>" %}

## Add the library to your Android Studio project <a href="#add-the-library-to-your-android-studio-project" id="add-the-library-to-your-android-studio-project"></a>

Copy the downloaded jar library to your Android Studio project (in the app/libs/ folder). Go to "Module Settings" (F12 or right-click your app in the Project View) and check the dependencies tab to make sure the library is added as a file dependency and set to "Compile":

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2Fs50nkfeXABoYuLkUHpdA%2F29.jpg?alt=media&amp;token=fd8d08a8-d562-4756-aa7e-fe7b38b298be" alt=""><figcaption></figcaption></figure>

Afterwards open your **AndroidManifest.xml** and add our offerwall activity to your application scope:

```xml
<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" />	
```

Another **AndroidManifest.xml** requirement is your AYET\_APP\_KEY which you can fetch from our publisher dashboard in your placement or adslot details - add it to the application scope as well:

```xml
<meta-data android:name="AYET_APP_KEY" android:value="xxxxxxxxxxxxxxxx" />
```

Also make sure to check your permissions in the **AndroidManifest.xml**:

```xml
<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-->
```

## Initialize the SDK & Managed User Balances <a href="#initialize-the-sdk-and-managed-user-balances" id="initialize-the-sdk-and-managed-user-balances"></a>

In this step, we are going to initialize the SDK in the main activity. We also use callbacks to track the user's account balance - this is optional and not required if you're planning to manage user balances on your own servers.

{% hint style="info" %}
**Attention:** The **username** or **external identifier** passed in the init call (e.g. username, hashed email address, etc.) will be accessible in the conversion callbacks through the ***{external\_identifier}*** parameter.
{% endhint %}

```php
@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 you want to make sure the SDK has been initialized and is ready to display the Offerwall or video ads, you can use the following function:

```javascript
if (AyetSdk.isInitialized()) {
    Log.d("AyetSdk" , "SDK is ready");
} else {
    Log.d("AyetSdk" , "SDK is NOT ready");
}	
```

If you want to **spend user currency**, for example if the user clicks a "purchaseInAppItem" button, you can utilize the **deductUserBalance** function:

```javascript
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
            }
        });
    }
});
```

## Show the Offerwall

Showing the offerwall for an offerwall adslot is straight-forward, you can simply call **showOfferwall** from any Activity:

```javascript
AyetSdk.showOfferwall(getApplication(), "offerwall adslot name");
```

**showOfferwall** starts the offerwall activity for the adslot you pass as second parameter and displays available tasks for the user to complete.

## Proguard Rules / Release Builds <a href="#proguard-rules-release-builds" id="proguard-rules-release-builds"></a>

If you're going to use **Proguard** in your release build to obfuscate your application, make sure to add the following rules to your **proguard-rules.pro** files:

```
-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 { *; }
```

{% hint style="info" %}
It's always highly recommended to test your release builds before publishing them on Google Play to verify that they behave as intended!
{% endhint %}

## Conversion Callbacks & Currency Handling <a href="#conversion-callbacks-and-currency-handling" id="conversion-callbacks-and-currency-handling"></a>

Learn about:

* Setting up callbacks
* IP Whitelists
* Securing callbacks using HMAC Security Hash
* Testing callbacks

Click on the link below:

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}


# iOS SDK

The iOS SDK allows you to easily monetize your app and reward your users with in-app currency. Your users get access to our offerwalls, allowing them to earn currency for completing offers.

{% hint style="info" %}

### Updates History

**2024-08-02: v1.7.2** - Updated documentation to replace plist.info new Xcode 13 Info settings, and add up-to-date Xcode screenshots.

**2020-08-11: v1.7.1** - Updated documentation to introduce new parameters to differentiate chargebacks from conversions

**2020-07-29: v1.7** - Updated iOS SDK to xcframework, support for Xcode 12, Swift 5.x, iOS 11+, dropped ARMv7 support

**2019-10-20: v1.6** - Updated iOS SDK to Xcode 11, iOS 13 SDK, Swift 5.1, full binary support

**2019-07-19: v1.5** - Updated iOS SDK with adslot changes, recompiled with Swift 5, re-added x86\_64 (simulator) support

**2018-09-29: v1.4.2** - Updated iOS SDK to Xcode 10 and Swift 4.2, stripped debug symbols

**2018-07-09: v1.4.1** - Removed Simulator Code from iOS SDK, fixed iTunes validation issues with Xcode 9+

**2018-05-07: v1.4** - Framework recompiled with Swift 4.1

**2018-03-08: v1.3** - You are able to use logs now in order to locate implementation problems

**2018-01-20: v1.2** - Added functions that provide current user balances

**2017-12-06: v1.0** - Initial Release of our Publisher SDK (iOS)
{% endhint %}

## Eligible Placement & AdSlot Combinations <a href="#eligible-placement-and-adslot-combinations" id="eligible-placement-and-adslot-combinations"></a>

The below table shows all Placement & AdSlot Type combinations that allow you to utilize the Android SDK integration.

| Placement Type | AdSlot Type | Eligible Integration Type |
| -------------- | ----------- | ------------------------- |
| iOS App        | Offerwall   | iOS SDK                   |

{% hint style="danger" %}
If you integrate the iOS SDK while using a different Placement & AdSlot combination in the ayeT-Studios dashboard, you won't be able to initialize the Offerwall.
{% endhint %}

## Getting Started

Before you start with the integration, make sure you have:

* [x] Created an Adslot
* [x] Added a Placement
* [x] Added an AdSlot

You will find more details here:

{% content-ref url="/pages/W7CE6bNya8L7RoaXXY21" %}
[Dashboard Setup](https://docs.ayetstudios.com/v/product-docs/dashboard-setup)
{% endcontent-ref %}

{% hint style="info" %}
Make sure to use the correct package name that you intend to use for your final app.

Or create a test placement with a different package name that matches the package name of your test app.

If package name of your placement and your actuall app don't match, you can't initialize the Offerwall.
{% endhint %}

## Download the Library

You can download the lastest version of our publisher library here:

{% file src="/files/80t56vv5APs1HC0FM72G" %}

## Add the library to your Xcode project <a href="#add-the-library-to-your-xcode-project" id="add-the-library-to-your-xcode-project"></a>

Unzip the downloaded xcframework archive file, preferably somewhere in your project root.

Navigate to your project root in the Project Navigator, select **General** tab and then expand **Frameworks, Libraries, and Embedded Content**.

Click on the **+** sign and add the archive to your project (using select files), then make sure the Embed option is set to *Embed & Sign*. The final configuration should look like this:

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2F77gLBPYZIfAdEH3kxq1J%2FQzjCnMZ.png?alt=media&amp;token=23d6640b-6c78-442c-a472-78c0b36542ae" alt=""><figcaption></figcaption></figure>

Then, still in your project root in the Project Navigator, select **Info** tab and expand **Custom iOS Target Properties**. Right click and select **Add Row**, and add **App Transport Security Settings**. Then click on the newly added row, select **Add Row** again, and add the **Allow Arbitrary Loads** option. Make sure this is set to **YES**:

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FWJ1YYW2EWVlu63NNuZsK%2FpT3Xgtk.png?alt=media&amp;token=cf278e4f-4c6a-46df-a85e-729398f6931f" alt=""><figcaption></figcaption></figure>

## Initialize the SDK & Managed User Balances <a href="#initialize-the-sdk-and-managed-user-balances" id="initialize-the-sdk-and-managed-user-balances"></a>

You'll need to initialize ayeT SDK before being able to use it. A good place to do this is the application:didFinishLaunchingWithOptions: method in your application delegate:

```swift
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)")
});
```

If you want to spend user currency, for example if the user clicks a button assigned to a **purchaseInAppItem** function, you can utilize the **deductBalance** function:

```swift
@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
        }
    })

}	         
```

{% hint style="info" %}
The status string will be "success" if the balance deduction was successful or "failed" if something went wrong (e.g. insufficient user balance).
{% endhint %}

{% hint style="warning" %}
**Attention:** The username or external identifier passed in the init call (e.g. username, hashed email address, etc.) will be accessible in the conversion callbacks through the *{external\_identifier}* parameter.
{% endhint %}

## Check User Balances (Managed Currency Handling) <a href="#check-user-balances-managed-currency-handling" id="check-user-balances-managed-currency-handling"></a>

After initializing the SDK, you can check the current user balances anywhere in your code:

```swift
AyetSdk.getAvailableCurrency();

AyetSdk.getPendingCurrency();

AyetSdk.getSpentCurrency();	  
```

## Show the Offerwall

Showing the offerwall is straight-forward, you can simply call **showOfferwall** from your UIViewController:

```swift
/AyetSdk.showOfferwall(currentController: self, adslotName: "my offerwall adslot name");	  
```

{% hint style="info" %}
**showOfferwall** starts our offerwall activity for the given adslot and displays available tasks for the user to complete.
{% endhint %}

## Logs

If you want to see logs in Xcode debug area, simply call **sdkLogEnable** before initializing sdk.

```swift
AyetSdk.sdkLogEnable();	  
```

## Conversion Callbacks & Currency Handling <a href="#conversion-callbacks-and-currency-handling" id="conversion-callbacks-and-currency-handling"></a>

Learn about:

* Setting up callbacks
* IP Whitelists
* Securing callbacks using HMAC Security Hash
* Testing callbacks

Click on the link below:

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}


# SDK Integrations (v2)


# Android SDK (v2)

The Android SDK allows you to 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.

{% hint style="info" %}

### Updates History

**2025-12-02: v1.0.0** - Release the Android SDK v2
{% endhint %}

## Eligible Placement & AdSlot Combinations <a href="#eligible-placement-and-adslot-combinations" id="eligible-placement-and-adslot-combinations"></a>

The table below shows all Placement & AdSlot Type combinations that allow you to utilize the Android SDK integration.

| Placement Type | AdSlot Type   |
| -------------- | ------------- |
| Android        | Offerwall     |
| Android        | Surveywall    |
| Android        | Offerwall API |

{% hint style="danger" %}
If you integrate the Android SDK while using a different Placement & AdSlot combination in the ayeT-Studios dashboard, you won't be able to initialize the SDK.
{% endhint %}

## Demo App

{% embed url="<https://github.com/ayetstudios/android-sdk-v2-demo-app>" %}

## Getting Started

Before you start with the integration, make sure you have:

* [x] Created an Account
* [x] Added a Placement
* [x] Added an AdSlot

You can find more details here:

{% content-ref url="/pages/W7CE6bNya8L7RoaXXY21" %}
[Dashboard Setup](https://docs.ayetstudios.com/v/product-docs/dashboard-setup)
{% endcontent-ref %}

{% hint style="warning" %}
Make sure to use the correct package name that you intend to use for your final app. Alternatively, create a test placement with a different package name that matches the package name of your test app.

If package name of your placement and your actual app don't match, you can't initialize the SDK.
{% endhint %}

## Adding the SDK Dependency

To add the SDK to your project, simply update your `build.gradle.kts` file to add the following dependency:

```kts
dependencies {
    implementation("io.ayet:android-sdk-v2:1.0.3")
}
```

Once this has been added, sync your project to apply the changes:

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FcMiTl7nsBsKw0MkeOgXy%2Fimage.png?alt=media&amp;token=576dafef-344b-47b0-a7c0-2397aefc4043" alt=""><figcaption></figcaption></figure>

## Add the internet permission to AndroidManifest <a href="#add-the-library-to-your-android-studio-project" id="add-the-library-to-your-android-studio-project"></a>

Add the following tag to your `AndroidManifest.xml` , just before the `application` tag:

```xml
<uses-permission android:name="android.permission.INTERNET" />
```

Example of completed `AndroidManifest.xml`:

```xml
<?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 and initialize the SDK <a href="#initialize-the-sdk-and-managed-user-balances" id="initialize-the-sdk-and-managed-user-balances"></a>

In this step, we will import and initialize the SDK in the main activity.

{% hint style="info" %}
**Note:** The `externalIdentifier` passed in the init call is the user's identifier on your end. This will be accessible in the conversion callbacks through the `{external_identifier}` parameter. The `placementId` is the unique ID assigned to your placement when it's created through our dashboard.
{% endhint %}

First, import the library:

```kt
import com.ayet.sdk.AyetSdk                
```

Then, call the `AyetSdk.init` method:

```kt
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))
                }
            }
        }
    }
}
```

## Show the Offerwall

To show the offerwall, simply call the `showOfferwall` method:

```kt
val context = LocalContext.current
AyetSdk.showOfferwall(context, "YOUR_OFFERWALL_ADSLOT_NAME")
```

{% hint style="info" %}
The `YOUR_OFFERWALL_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Offerwall** adslots.
{% endhint %}

## Conversion Callbacks & Currency Handling <a href="#conversion-callbacks-and-currency-handling" id="conversion-callbacks-and-currency-handling"></a>

Learn about:

* Setting up callbacks
* IP Whitelists
* Securing callbacks using HMAC Security Hash
* Testing callbacks

Click on the link below:

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}

## Additional Methods

## Fetch Offers

To fetch a list of all offers in JSON format, simply call the `getOffers` method:

```kt
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")
    }
}
```

{% hint style="info" %}
The `YOUR_OFFERWALL_API_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Offerwall API** adslots.
{% endhint %}

## Show Reward Status

The Reward Status page allows users to see their clicked and in-progress offers and allows users to request support / submit tickets. The reward status is also part of the offerwall and the surveywall. To show the reward status page stand-alone, simply call the `showRewardStatus` method:

```kt
val context = LocalContext.current
AyetSdk.showRewardStatus(context)
```

## Show the Surveywall

To show the surveywall, simply call the `showSurveywall` method:

```kt
val context = LocalContext.current
AyetSdk.showSurveywall(context, "YOUR_SURVEYWALL_ADSLOT_NAME")
```

{% hint style="info" %}
The `YOUR_SURVEYWALL_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Surveywall** adslots.
{% endhint %}

## Set custom parameters

Set custom parameters for callbacks. Set up to 5 custom parameters.

```kt
AyetSdk.setTrackingCustom1("custom1")
AyetSdk.setTrackingCustom2("custom2")
AyetSdk.setTrackingCustom3("custom3")
AyetSdk.setTrackingCustom4("custom4")
AyetSdk.setTrackingCustom5("custom5")
```

{% hint style="info" %}
Note: Custom parameters must also be added to your callback URL to receive them in your S2S callbacks.
{% endhint %}

More information here:

{% content-ref url="/pages/4uQiMxtgnAayAHR8ZeXt" %}
[Offerwall Callbacks](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing/callbacks/offerwall-callbacks)
{% endcontent-ref %}

## Set Age and Gender

Additionally, you may optionally pass user age and gender to us. This can help us match users to the best and most appropriate offers for them.

```kt
AyetSdk.setGender(Gender.MALE)
AyetSdk.setGender(Gender.FEMALE)
AyetSdk.setAge(25)
```

## Notes

* When calling certain SDK methods, `context` must be passed. When passing `context` from `onCreate` for example, this will simply be `this`. If calling from elsewhere, the context will need to be provided from `LocalContext.current`.


# iOS SDK (v2)

The iOS SDK allows you to 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.

{% hint style="info" %}

### Updates History

**2025-12-02: v1.0.0** - Release the iOS SDK v2
{% endhint %}

## Eligible Placement & AdSlot Combinations <a href="#eligible-placement-and-adslot-combinations" id="eligible-placement-and-adslot-combinations"></a>

The table below shows all Placement & AdSlot Type combinations that allow you to utilize the iOS SDK integration.

| Placement Type | AdSlot Type   |
| -------------- | ------------- |
| iOS            | Offerwall     |
| iOS            | Surveywall    |
| iOS            | Offerwall API |

{% hint style="danger" %}
If you integrate the iOS SDK while using a different Placement & AdSlot combination in the ayeT-Studios dashboard, you won't be able to initialize the SDK.
{% endhint %}

## Demo App

{% embed url="<https://github.com/ayetstudios/ios-sdk-v2-demo-app>" %}

## Getting Started

Before you start with the integration, make sure you have:

* [x] Created an Account
* [x] Added a Placement
* [x] Added an AdSlot

You can find more details here:

{% content-ref url="/pages/W7CE6bNya8L7RoaXXY21" %}
[Dashboard Setup](https://docs.ayetstudios.com/v/product-docs/dashboard-setup)
{% endcontent-ref %}

{% hint style="warning" %}
Make sure to use the correct package name that you intend to use for your final app. Alternatively, create a test placement with a different package name that matches the package name of your test app.

If package name of your placement and your actual app don't match, you can't initialize the SDK.
{% endhint %}

## Adding the SDK Dependency

To integrate the iOS SDK into your project, add the package dependency to your app.

In Xcode, with your project open, click **File** and **Add Package Dependencies...**

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FepEcJYJiYNv0AZwq9vin%2Fimage.png?alt=media&amp;token=be1b7002-1ae7-4412-89cf-c13baf76aa56" alt=""><figcaption></figcaption></figure>

Enter the repository URL (`https://github.com/ayetstudios/ios-sdk-v2-repo`) in the search bar and click **Add Package**:

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2Fh9FWojJ0sknTZMPV7o6H%2Fimage.png?alt=media&amp;token=9a296c01-c634-47d6-93b0-47dae1285da5" alt=""><figcaption></figcaption></figure>

Select the target for your app, then click **Add Package** again:

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FXbaj2oRshGOIOQZ2DDdS%2Fimage.png?alt=media&amp;token=b9ef3199-27cb-4ff3-86a7-42cbf5b75297" alt=""><figcaption></figcaption></figure>

## Import and initialize the SDK <a href="#initialize-the-sdk-and-managed-user-balances" id="initialize-the-sdk-and-managed-user-balances"></a>

In this step, we will import and initialize the SDK in the app.

{% hint style="info" %}
**Note:** The `externalIdentifier` passed in the init call is the user's identifier on your end. This will be accessible in the conversion callbacks through the `{external_identifier}` parameter. The `placementId` is the unique ID assigned to your placement when it's created through our dashboard.
{% endhint %}

First, import the library:

```swift
import AyetSDK           
```

Then, call the `AyetSDK.shared.initialize` method:

```swift
@main
struct iosSdkV2DemoAppApp: App {
    init() {
        AyetSDK.shared.initialize(placementId: YOUR_PLACEMENT_ID, externalIdentifier: "USER_EXTERNAL_IDENTIFIER")
    }

    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}
```

## Show the Offerwall

To show the offerwall, simply call the `showOfferwall` method:

```swift
await AyetSDK.shared.showOfferwall(adSlotName: "YOUR_OFFERWALL_ADSLOT_NAME")
```

{% hint style="info" %}
The `YOUR_OFFERWALL_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Offerwall** adslots.
{% endhint %}

## Conversion Callbacks & Currency Handling <a href="#conversion-callbacks-and-currency-handling" id="conversion-callbacks-and-currency-handling"></a>

Learn about:

* Setting up callbacks
* IP Whitelists
* Securing callbacks using HMAC Security Hash
* Testing callbacks

Click on the link below:

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}

## Additional Methods

## Fetch Offers

To fetch a list of all offers in JSON format, simply call the `getOffers` method:

```kt
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")
}
```

{% hint style="info" %}
The `YOUR_OFFERWALL_API_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Offerwall API** adslots.
{% endhint %}

## Show Reward Status

The Reward Status page allows users to see their clicked and in-progress offers and allows users to request support / submit tickets. The reward status is also part of the offerwall and the surveywall. To show the reward status page stand-alone, simply call the `showRewardStatus` method:

```swift
await AyetSDK.shared.showRewardStatus()
```

## Show the Surveywall

To show the surveywall, simply call the `showSurveywall` method:

<pre class="language-swift"><code class="lang-swift"><strong>await AyetSDK.shared.showSurveywall(adSlotName: "YOUR_SURVEYWALL_ADSLOT_NAME")
</strong></code></pre>

{% hint style="info" %}
The `YOUR_SURVEYWALL_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Surveywall** adslots.
{% endhint %}

## Set custom parameters

Set custom parameters for callbacks. Set up to 5 custom parameters.

```swift
AyetSDK.shared.setTrackingCustom1("custom1")
AyetSDK.shared.setTrackingCustom2("custom2")
AyetSDK.shared.setTrackingCustom3("custom3")
AyetSDK.shared.setTrackingCustom4("custom4")
AyetSDK.shared.setTrackingCustom5("custom5")
```

{% hint style="info" %}
Note: Custom parameters must also be added to your callback URL to receive them in your S2S callbacks.
{% endhint %}

More information here:

{% content-ref url="/pages/4uQiMxtgnAayAHR8ZeXt" %}
[Offerwall Callbacks](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing/callbacks/offerwall-callbacks)
{% endcontent-ref %}

## Set Age and Gender

Additionally, you may optionally pass user age and gender to us. This can help us match users to the best and most appropriate offers for them.

```swift
AyetSDK.shared.setGender(.male)
AyetSDK.shared.setGender(.female)
AyetSDK.shared.setAge(25)
```


# SDK Wrappers (v2)


# Flutter Wrapper (v2)

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.

{% hint style="info" %}

### Updates History

**2025-12-19: v1.0.0** - Release the Flutter Wrapper for V2 of the SDK
{% endhint %}

## Eligible Placement & AdSlot Combinations <a href="#eligible-placement-and-adslot-combinations" id="eligible-placement-and-adslot-combinations"></a>

The table below shows all Placement & AdSlot Type combinations that allow you to utilize the Flutter integration.

| Placement Type | AdSlot Type   |
| -------------- | ------------- |
| Android/iOS    | Offerwall     |
| Android/iOS    | Surveywall    |
| Android/iOS    | Offerwall API |

{% hint style="danger" %}
If you integrate the Flutter wrapper while using a different Placement & AdSlot combination in the ayeT-Studios dashboard, you won't be able to initialize the SDK.
{% endhint %}

## Demo App

{% embed url="<https://github.com/ayetstudios/flutter_sdk_v2_demo_app>" %}

## Getting Started

Before you start with the integration, make sure you have:

* [x] Created an Account
* [x] Added a Placement
* [x] Added an AdSlot

You can find more details here:

{% content-ref url="/pages/W7CE6bNya8L7RoaXXY21" %}
[Dashboard Setup](https://docs.ayetstudios.com/v/product-docs/dashboard-setup)
{% endcontent-ref %}

{% hint style="warning" %}
Make sure to use the correct package name that you intend to use for your final app. Alternatively, create a test placement with a different package name that matches the package name of your test app.

If package name of your placement and your actual app don't match, you can't initialize the SDK. Note that your package name may be different on iOS and Android for the same Flutter app.
{% endhint %}

## Adding the SDK Dependency

Add to your pubspec.yaml:

```yaml
dependencies:
  ayet_sdk_v2: ^1.0.4
```

Once this has been added, run `flutter pub get` to fetch the package.

### Android Setup <a href="#add-the-library-to-your-android-studio-project" id="add-the-library-to-your-android-studio-project"></a>

Add the following tag to your `AndroidManifest.xml` , just before the `application` tag:

```xml
<uses-permission android:name="android.permission.INTERNET" />
```

Example of completed `AndroidManifest.xml`:

```xml
<?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>
```

### iOS Setup

Enable Swift Package Manager:

```
flutter config --enable-swift-package-manager
```

Then run `flutter build ios` to fetch dependencies.

## Import and initialize the SDK <a href="#initialize-the-sdk-and-managed-user-balances" id="initialize-the-sdk-and-managed-user-balances"></a>

```dart
import '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',
);
```

The `externalIdentifier` is your user's ID, accessible in conversion callbacks via `{external_identifier}`. The `placementId` is found in your dashboard.

## Show the Offerwall

To show the offerwall, simply call the `showOfferwall` method:

```dart
await sdk.showOfferwall('YOUR_OFFERWALL_ADSLOT_NAME');
```

{% hint style="info" %}
The `YOUR_OFFERWALL_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Offerwall** adslots.
{% endhint %}

## Conversion Callbacks & Currency Handling <a href="#conversion-callbacks-and-currency-handling" id="conversion-callbacks-and-currency-handling"></a>

Learn about:

* Setting up callbacks
* IP Whitelists
* Securing callbacks using HMAC Security Hash
* Testing callbacks

Click on the link below:

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}

## Additional Methods

## Fetch Offers

To fetch a list of all offers in JSON format, simply call the `getOffers` method:

```dart
final offersJson = await sdk.getOffers('YOUR_OFFERWALL_API_ADSLOT_NAME');
```

{% hint style="info" %}
The `YOUR_OFFERWALL_API_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Offerwall API** adslots.
{% endhint %}

## Show Reward Status

The Reward Status page allows users to see their clicked and in-progress offers and allows users to request support / submit tickets. The reward status is also part of the offerwall and the surveywall. To show the reward status page stand-alone, simply call the `showRewardStatus` method:

```dart
await sdk.showRewardStatus();
```

## Show the Surveywall

To show the surveywall, simply call the `showSurveywall` method:

```dart
await sdk.showSurveywall('YOUR_SURVEYWALL_ADSLOT_NAME');
```

{% hint style="info" %}
The `YOUR_SURVEYWALL_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Surveywall** adslots.
{% endhint %}

## Set custom parameters

Set custom parameters for callbacks. Set up to 5 custom parameters.

```dart
await sdk.setTrackingCustom1('custom1');
await sdk.setTrackingCustom2('custom2');
await sdk.setTrackingCustom3('custom3');
await sdk.setTrackingCustom4('custom4');
await sdk.setTrackingCustom5('custom5');
```

{% hint style="info" %}
Note: Custom parameters must also be added to your callback URL to receive them in your S2S callbacks.
{% endhint %}

More information here:

{% content-ref url="/pages/4uQiMxtgnAayAHR8ZeXt" %}
[Offerwall Callbacks](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing/callbacks/offerwall-callbacks)
{% endcontent-ref %}

## Set Age and Gender

Additionally, you may optionally pass user age and gender to us. This can help us match users to the best and most appropriate offers for them.

```dart
await sdk.setAge(25);
await sdk.setGender(AyetGender.male);
await sdk.setGender(AyetGender.female);
```


# React Native Wrapper (v2)

The React Native 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.

{% hint style="info" %}

### Updates History

**2026-04-15: v1.0.0** - Release the React Native Wrapper for V2 of the SDK
{% endhint %}

## Eligible Placement & AdSlot Combinations <a href="#eligible-placement-and-adslot-combinations" id="eligible-placement-and-adslot-combinations"></a>

The table below shows all Placement & AdSlot Type combinations that allow you to utilize the React Native integration.

| Placement Type | AdSlot Type   |
| -------------- | ------------- |
| Android/iOS    | Offerwall     |
| Android/iOS    | Surveywall    |
| Android/iOS    | Offerwall API |

{% hint style="danger" %}
If you integrate the React Native wrapper while using a different Placement & AdSlot combination in the ayeT-Studios dashboard, you won't be able to initialize the SDK.
{% endhint %}

## Getting Started

Before you start with the integration, make sure you have:

* [x] Created an Account
* [x] Added a Placement
* [x] Added an AdSlot

You can find more details here:

{% content-ref url="/pages/W7CE6bNya8L7RoaXXY21" %}
[Dashboard Setup](https://docs.ayetstudios.com/v/product-docs/dashboard-setup)
{% endcontent-ref %}

{% hint style="warning" %}
Make sure to use the correct package name that you intend to use for your final app. Alternatively, create a test placement with a different package name that matches the package name of your test app.

If package name of your placement and your actual app don't match, you can't initialize the SDK. Note that your package name may be different on iOS and Android for the same React Native app.
{% endhint %}

## Installation

Run the installation command:

```zsh
npm install ayet-react-native-sdk-v2
```

### Android Setup <a href="#add-the-library-to-your-android-studio-project" id="add-the-library-to-your-android-studio-project"></a>

Add the following tag to your `AndroidManifest.xml` , just before the `application` tag:

```xml
<uses-permission android:name="android.permission.INTERNET" />
```

Example of completed `AndroidManifest.xml`:

```xml
<?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>
```

### iOS Setup

Install pods:

```zsh
cd ios && pod install
```

## Import and initialize the SDK <a href="#initialize-the-sdk-and-managed-user-balances" id="initialize-the-sdk-and-managed-user-balances"></a>

```typescript
import AyetSdkV2 from 'ayet-react-native-sdk-v2';

// Initialize with your placement ID and user identifier
AyetSdkV2.init(YOUR_PLACEMENT_ID, 'USER_EXTERNAL_IDENTIFIER');
```

The `externalIdentifier` is your user's ID, accessible in conversion callbacks via `{external_identifier}`. The `placementId` is found in your dashboard.

## Show the Offerwall

To show the offerwall, simply call the `showOfferwall` method:

```typescript
AyetSdkV2.showOfferwall('YOUR_OFFERWALL_ADSLOT_NAME');
```

{% hint style="info" %}
The `YOUR_OFFERWALL_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Offerwall** adslots.
{% endhint %}

## Conversion Callbacks & Currency Handling <a href="#conversion-callbacks-and-currency-handling" id="conversion-callbacks-and-currency-handling"></a>

Learn about:

* Setting up callbacks
* IP Whitelists
* Securing callbacks using HMAC Security Hash
* Testing callbacks

Click on the link below:

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}

## Additional Methods

## Show the Surveywall

To show the surveywall, simply call the `showSurveywall` method:

```typescript
AyetSdkV2.showSurveywall('YOUR_SURVEYWALL_ADSLOT_NAME');
```

{% hint style="info" %}
The `YOUR_SURVEYWALL_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Surveywall** adslots.
{% endhint %}

## Fetch Offers

To fetch a list of all offers in JSON format, simply call the `getOffers` method:

```typescript
const offersJson = await AyetSdkV2.getOffers('YOUR_OFFERWALL_API_ADSLOT_NAME');
```

{% hint style="info" %}
The `YOUR_OFFERWALL_API_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Offerwall API** adslots.
{% endhint %}

## Show Reward Status

The Reward Status page allows users to see their clicked and in-progress offers and allows users to request support / submit tickets. The reward status is also part of the offerwall and the surveywall. To show the reward status page stand-alone, simply call the `showRewardStatus` method:

```typescript
AyetSdkV2.showRewardStatus();
```

## Set custom parameters

Set custom parameters for callbacks. Set up to 5 custom parameters.

```typescript
AyetSdkV2.setTrackingCustom1('custom1');
AyetSdkV2.setTrackingCustom2('custom2');
AyetSdkV2.setTrackingCustom3('custom3');
AyetSdkV2.setTrackingCustom4('custom4');
AyetSdkV2.setTrackingCustom5('custom5');
```

{% hint style="info" %}
Note: Custom parameters must also be added to your callback URL to receive them in your S2S callbacks.
{% endhint %}

More information here:

{% content-ref url="/pages/4uQiMxtgnAayAHR8ZeXt" %}
[Offerwall Callbacks](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing/callbacks/offerwall-callbacks)
{% endcontent-ref %}

## Set Age and Gender

Additionally, you may optionally pass user age and gender to us. This can help us match users to the best and most appropriate offers for them.

```typescript
AyetSdkV2.setAge(25);
AyetSdkV2.setGender(AyetGender.Male);
```


# Plugins & Wrappers


# Unity

The ayeT-Studios Unity SDK allows you to easily monetize your app and reward your users with in-app currency. Your users get access to our offerwall, allowing them to earn virtual currency.

{% hint style="info" %}

### Updates History

**2022-04-25: v1.8** - Updated to latest Android & iOS SDKs, fixed some warnings, based on Unity

**2021 2020-06-11: v1.7.1** - Updated documentation to introduce new parameters to differentiate chargebacks from conversions

**2020-07-29: v1.7** - Updated to latest Android & iOS SDKs, based on Unity 2019 LTS **2019-07-19: v1.6** - Updated wrapper & SDKs with adslot changes, recompiled iOS SDK with Swift 5

**2019-02-01: v1.5** - Fixed conversion tracking issues under certain conditions (application lifecycle monitoring improved)

**2018-12-04: v1.4** - Updated to Android SDK 3.0 - support for API 26+ build targets, bugfixes & improved handling under poor network conditions

**2018-09-29: v1.3** - Updated iOS SDK to Xcode 10 and Swift 4.2, stripped debug symbols

**2018-07-09: v1.2** - Removed Simulator Code from iOS SDK, fixed iTunes validation issues with Xcode 9+

**2018-07-02: v1.1** - Updated Unity SDK (iOS) to Unity 2018 / Swift 4.1 / XCode 9.4, added post-install script for automatic XCode configuration

**2018-01-20: v1.0** - Initial Release of our Publisher SDK (Unity)
{% endhint %}

## Eligible Placement & AdSlot Combinations <a href="#eligible-placement-and-adslot-combinations" id="eligible-placement-and-adslot-combinations"></a>

The below table shows all Placement & AdSlot Type combinations that allow you to utilize the Unity SDK integration.

| Placement Type | AdSlot Type | Eligible Integration Type |
| -------------- | ----------- | ------------------------- |
| Android App    | Offerwall   | Unity SDK                 |
| iOS App        | Offerwall   | Unity SDK                 |

{% hint style="danger" %}
If you integrate the Unity SDK while using a different Placement & AdSlot combination in the ayeT-Studios dashboard, you won't be able to initialize the Offerwall.
{% endhint %}

## Getting Started

Before you start with the integration, make sure you have:

* [x] Created an Account
* [x] Added a Placement
* [x] Added an AdSlot

You will find more details here:

{% content-ref url="/pages/W7CE6bNya8L7RoaXXY21" %}
[Dashboard Setup](https://docs.ayetstudios.com/v/product-docs/dashboard-setup)
{% endcontent-ref %}

{% hint style="success" %}
You have to create separate placements and AdSlots for each platform you intend to build on.

* Create one Placement and AdSlot for your Android App.
* Create one Placement and AdSlot for your iOS App.
  {% endhint %}

{% hint style="danger" %}
The minimum required OS version is iOS 11.0 (and Swift 5.x ABI) and Android 5.1+.
{% endhint %}

## Download the SDK

You can download the lastest version of our publisher package here:

{% file src="/files/7IpVEkaoTPKrcocwIywH" %}

## Add The Package To Your Unity Project <a href="#add-the-package-to-your-unity-project" id="add-the-package-to-your-unity-project"></a>

Open your Unity Project

1. Assets -> Import Package -> Custom Package
2. Select the AyetUnityPlugin\_vVersion.unitypackage file
3. Press the "Import" button to complete the process

## \*Android Specific: Update Or Create AndroidManifest.xml File <a href="#android-specific-update-or-create-androidmanifest.xml-file" id="android-specific-update-or-create-androidmanifest.xml-file"></a>

If you're planning to build against Android, please make sure you have an AndroidManifest.xml file in Assets/Plugins/Android/. If no AndroidManifest exists, you can check out the following template: [Appendix: AndroidManifest.xml Template.](#android-xml-template)

Add these app permissions to the manifest:

```xml
<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 -->
```

Add our Offerwall activity to your scope:

```xml
<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" />	    
```

## Initialize The SDK & Managed User Balances <a href="#initialize-the-sdk-and-managed-user-balances" id="initialize-the-sdk-and-managed-user-balances"></a>

{% hint style="info" %}
In this step, we are going to initialize the SDK. We also use callbacks to track the user's account balance - this is optional and not required if you're planning to manage user balances on your own servers.
{% endhint %}

{% hint style="warning" %}
**Attention:** The username or external identifier passed in the init call (e.g. username, hashed email address, etc.) will be accessible in the conversion callbacks through the *{external\_identifier}* parameter.
{% endhint %}

First, the SDK needs to be initialized like this (APP\_KEY is the placement identifier you can find in your dashboard in the android or ios placement details):

```
#if UNITY_IOS
AyetSdk.init ("<YOUR_IOS_PLACEMENT_APP_KEY>", "<username (external identifier)>", this);
#endif
#if UNITY_ANDROID
AyetSdk.init ("<YOUR_ANDROID_PLACEMENT_APP_KEY>", "<username (external identifier)>", this);
#endif
```

Implement the **SdkUserBalance** interface in order to get notified when user balance changes occur:

```
public void userBalanceInitialized (int available_currency, int pending_currency, int spent_currency){
        Debug.Log("Your::Script::userBalanceInitialized => available_currency: " + available_currency.ToString() + "  pending_currency: "+pending_currency.ToString() + "  spent_currency: " + spent_currency.ToString() );
}
```

**userBalanceInitialized** is triggered after calling **AyetSdk.init()**.

```
public void userBalanceChanged (int available_currency, int pending_currency, int spent_currency){
        Debug.Log("YourScript::userBalanceChanged => available_currency: " + available_currency.ToString() + "  pending_currency: "+pending_currency.ToString() + "  spent_currency: " + spent_currency.ToString() );
}
```

**userBalanceChanged** is triggered if the user balance changes while running the app.

If you want to spend user currency, for example if the user clicks a "purchaseInAppItem" button, you can utilize the **deductUserBalance** function:

```
AyetSdk.deductUserBalance (<DEDUCT_AMOUNT>, this);
```

Implement the SdkDeductCallback interface in order to get notified if a deduction succeeded:

```
public void deductSuccess (){
    Debug.Log ("YourScript::deductSuccess");
}
public void deductFailed (){
    Debug.Log ("YourScript::deductFailed");
}
```

## Check User Balances (Managed Currency Handling) <a href="#check-user-balances-managed-currency-handling" id="check-user-balances-managed-currency-handling"></a>

After initializing the SDK, you can check the current user balances anywhere in your code:

```
AyetSdk.getAvailableCurrency();
AyetSdk.getPendingCurrency ();
AyetSdk.getSpentCurrency ();
```

## Show the Offerwall

```
AyetSdk.showOfferwall("your offerwall adslot name");
```

showOfferwall starts our offerwall activity and displays available tasks for the user to complete.

## Unity Example Script

```
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ExampleScript : MonoBehaviour , SdkUserBalance  , SdkDeductCallback  {

    public void userBalanceInitialized (int available_currency, int pending_currency, int spent_currency){

        Debug.Log("ExampleScript::userBalanceInitialized => available_currency: " + available_currency.ToString() + "  pending_currency: "+pending_currency.ToString() + "  spent_currency: " + spent_currency.ToString() );
    }

    public void userBalanceChanged (int available_currency, int pending_currency, int spent_currency){

        Debug.Log("ExampleScript::userBalanceChanged => available_currency: " + available_currency.ToString() + "  pending_currency: "+pending_currency.ToString() + "  spent_currency: " + spent_currency.ToString() );
    }

    public void deductSuccess (){

        Debug.Log ("ExampleScript::deductSuccess");
    }

    public void deductFailed (){

        Debug.Log ("ExampleScript::deductFailed");
    }

    void Start () {
    }

    void Update () {

        if (Input.touchCount == 1) {

            Touch touch = Input.touches [0];

            if (touch.phase == TouchPhase.Ended) {

                if (Input.GetTouch (0).position.y > (Screen.height/2)) {
                    //sdk initialization
                    AyetSdk.init ("abcde123abcde123abcde123", "user_id_123", this);

                } else {

                    if (Input.GetTouch (0).position.x < (Screen.width/3)) {
                        //show offerwall
                        AyetSdk.showOfferwall("offerwall adslot name");
                    }
                    else if(Input.GetTouch (0).position.x > ((Screen.width/3)*2)){
                        //show user current balance
                        Debug.Log ("ExampleScript  Available currency: " + AyetSdk.getAvailableCurrency());
                        Debug.Log ("ExampleScript  Pending currency: " + AyetSdk.getPendingCurrency ());
                        Debug.Log ("ExampleScript  Spent currency: " + AyetSdk.getSpentCurrency ());
                    }
                    else {
                        int amount = 1;
                        //deduct balance
                        AyetSdk.deductUserBalance (amount, this);
                    }
                }
            }
        }

    }
}
```

## Proguard Rules / Release Builds <a href="#proguard-rules-release-builds" id="proguard-rules-release-builds"></a>

If you're going to use **Proguard** in your release build to obfuscate your application, make sure to add the following rules to your **proguard-rules.pro** files:

```xml
-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 { *; }
```

{% hint style="info" %}
It's always highly recommended to test your release builds before publishing them on Google Play to verify that they behave as intended!
{% endhint %}

## Conversion Callbacks & Currency Handling <a href="#conversion-callbacks-and-currency-handling" id="conversion-callbacks-and-currency-handling"></a>

Learn about:

* Setting up callbacks
* IP Whitelists
* Securing callbacks using HMAC Security Hash
* Testing callbacks

Click on the link below:

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}

## Appendix: Assets/Plugins/Android/AndroidManifest.xml Template <a href="#android-xml-template" id="android-xml-template"></a>

```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 -->
	android:versionCode="1" android:versionName="1.0" xmlns:tools="http://schemas.android.com/tools" android:installLocation="preferExternal">

    <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />

    <application android:theme="@style/UnityThemeSelector" android:icon="@drawable/app_icon" android:label="@string/app_name">
        <activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
        </activity>

        <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>

    </application>
    <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 -->
</manifest>	                
```


# React Native

This covers the ayeT-Studios React Native Publisher SDK. This npm package is a wrapper for our web offerwall that allows effortless integration in react native apps.

## Eligible Placement & AdSlot Combinations <a href="#eligible-placement-and-adslot-combinations" id="eligible-placement-and-adslot-combinations"></a>

The table below shows all Placement & AdSlot Type combinations that allow you to utilize the React Native SDK integration.

| Placement Type | AdSlot Type | Eligible Integration Type |
| -------------- | ----------- | ------------------------- |
| Website        | Offerwall   | React Native SDK          |

{% hint style="danger" %}
If you integrate the React Native SDK while using a different Placement & AdSlot combination in the ayeT-Studios dashboard, you won't be able to initialize the Offerwall.
{% endhint %}

## Getting Started

Before you start with the integration, make sure you have:

* [x] Created an Account
* [x] Added a Placement
* [x] Added an AdSlot

You will find more details here:

{% content-ref url="/pages/W7CE6bNya8L7RoaXXY21" %}
[Dashboard Setup](https://docs.ayetstudios.com/v/product-docs/dashboard-setup)
{% endcontent-ref %}

{% hint style="success" %}
When working on multiple platforms, we recommend a single "Website" placement and a separate "Offerwall" adslot for each.

This allows better targeting, offer control and individual reporting and history & earnings for every user are available cross-platform:

* One "Offerwall" adslot for your Website.
* One "Offerwall" adslot for the associated React Native Android App.
* One "Offerwall" adslot for the associated React Native iOS App.
  {% endhint %}

## Integration Docs

{% embed url="<https://www.npmjs.com/package/ayetsdk>" %}

## Example App

You can check out our example app here:

{% embed url="<https://github.com/ayetstudios/ayetstudios_react_native_sdk_demo>" %}
AyeT-Studios React Native SDK Example App
{% endembed %}

## Conversion Callbacks & Currency Handling <a href="#conversion-callbacks-and-currency-handling" id="conversion-callbacks-and-currency-handling"></a>

Learn about:

* Setting up callbacks
* IP Whitelists
* Securing callbacks using HMAC Security Hash
* Testing callbacks

Click on the link below:

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}


# Flutter

The Flutter SDK allows you to easily monetize your app or website. Your users get access to our offerwall, allowing them to earn currency for completing offers.

This is a non-official Flutter SDK and is NOT supported by ayeT-Studios, but built by the community. You are integrating this SDK at your own risk.

## Eligible Placement & AdSlot Combinations <a href="#eligible-placement-and-adslot-combinations" id="eligible-placement-and-adslot-combinations"></a>

The below table shows all Placement & AdSlot Type combinations that allow you to utilize the Flutter SDK integration.

| Placement Type | AdSlot Type | Eligibile Integration Type |
| -------------- | ----------- | -------------------------- |
| Android App    | Offerwall   | Flutter SDK                |
| iOS App        | Offerwall   | Flutter SDK                |
| Website        | Offerwall   | Flutter SDK                |

{% hint style="danger" %}
If you integrate the Flutter SDK while using a different Placement & AdSlot combination in the ayeT-Studios dashboard, you won't be able to initialize the Offerwall.
{% endhint %}

## Getting Started

Before you start with the integration, make sure you:

* [x] Created an Account
* [x] Added a Placement
* [x] Added an AdSlot

You will find more details here:

{% content-ref url="/pages/W7CE6bNya8L7RoaXXY21" %}
[Dashboard Setup](https://docs.ayetstudios.com/v/product-docs/dashboard-setup)
{% endcontent-ref %}

{% hint style="success" %}
You have to create separate placements and AdSlots for each platform you intend to build on.

* Create one Placement and AdSlot for your Website.
* Create one Placement and AdSlot for your Android App.
* Create one Placement and AdSlot for your iOS App.
  {% endhint %}

## Flutter Package <a href="#conversion-callbacks-and-currency-handling" id="conversion-callbacks-and-currency-handling"></a>

{% embed url="<https://github.com/ayetstudios/ayetstudios_flutter_sdk>" %}

## Conversion Callbacks & Currency Handling <a href="#conversion-callbacks-and-currency-handling" id="conversion-callbacks-and-currency-handling"></a>

Learn about:

* Setting up callbacks
* IP Whitelists
* Securing callbacks using HMAC Security Hash
* Testing callbacks

Click on the link below:

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}


# API Integrations


# Offerwall API

The Offerwall API provides a solution for publishers who want to include an Offerwall in their application/website but have control over the presentation of the offers.

## Eligible Placement & AdSlot Combinations <a href="#eligible-placement-and-adslot-combinations" id="eligible-placement-and-adslot-combinations"></a>

The table below shows all Placement & AdSlot Type combinations that allow you to utilize the Offerwall API integration.

| Placement Type | AdSlot Type   | Eligible Integration Type |
| -------------- | ------------- | ------------------------- |
| Android App    | Offerwall API | Offerwall API             |
| iOS App        | Offerwall API | Offerwall API             |
| Website        | Offerwall API | Offerwall API             |

{% hint style="danger" %}
If you integrate the Offerwall API while using a different Placement & AdSlot combination in the ayeT-Studios dashboard, you won't be able to make correct API requests.
{% endhint %}

## Getting Started

Before you start with the integration, make sure you:

* [x] Created an Account
* [x] Added a Placement
* [x] Added an AdSlot

You will find more details here:

{% content-ref url="/pages/W7CE6bNya8L7RoaXXY21" %}
[Dashboard Setup](https://docs.ayetstudios.com/v/product-docs/dashboard-setup)
{% endcontent-ref %}

## Technical Offerwall API Documentation <a href="#technical-offerwall-api-documentation" id="technical-offerwall-api-documentation"></a>

For API Calls, all offers matching the parameters provided will be returned and can be displayed to the user.

The Offerwall API supports both server and client-side calls.

Follow the link below to get to the detailed technical documentation.

{% content-ref url="/pages/1M6A2DQ82YJTMQpj9FUT" %}
[Publisher API Reference](https://docs.ayetstudios.com/v/product-docs/publisher-api-reference)
{% endcontent-ref %}

## Conversion Callbacks & Currency Handling <a href="#conversion-callbacks-and-currency-handling" id="conversion-callbacks-and-currency-handling"></a>

Learn about:

* Setting up callbacks
* IP Whitelists
* Securing callbacks using HMAC Security Hash
* Testing callbacks

Click on the link below:

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}


# Static API

The Static API is recommended only for special integrations, because not all campaigns are available without more sophisticated device match.

{% hint style="success" %}
If integrated, it should be called each 15-30 minutes to make sure our campaigns are still available, did not run into daily caps or changed targeting / bid.
{% endhint %}

{% hint style="danger" %}
The "Static API key" for requests is adslot specific and available in the adslot details once approved by your account manager.
{% endhint %}

## Eligible Placement & AdSlot Combinations <a href="#eligible-placement-and-adslot-combinations" id="eligible-placement-and-adslot-combinations"></a>

The table below shows all Placement & AdSlot Type combinations that allow you to utilize the Static API integration.

| Placement Type | AdSlot Type | Eligible Integration Type |
| -------------- | ----------- | ------------------------- |
| Website        | Static API  | Static API                |
| Android App    | Static API  | Static API                |
| iOS App        | Static API  | Static API                |
| API / Network  | Static API  | Static API                |

{% hint style="danger" %}
If you integrate the Offerwall API while using a different Placement & AdSlot combination in the ayeT-Studios dashboard, you won't be able to make correct API requests.
{% endhint %}

## Getting Started

Before you start with the integration, make sure you:

* [x] Created an Account
* [x] Added a Placement
* [x] Added an AdSlot

You will find more details here:

{% content-ref url="/pages/W7CE6bNya8L7RoaXXY21" %}
[Dashboard Setup](https://docs.ayetstudios.com/v/product-docs/dashboard-setup)
{% endcontent-ref %}

## Technical Documentation: Static API <a href="#technical-documentation-static-api" id="technical-documentation-static-api"></a>

API calls return a list of currently running campaigns on our platform which suit your adslot configuration. Can be filtered by additional parameters.

{% hint style="info" %}
**Note:** To pass custom parameters from clicks to conversion callbacks, the tracking\_link parameter in offer objects can be extended with \&custom\_1=... to \&custom\_5=...
{% endhint %}

Follow the link below to get to the detailed technical documentation.

{% content-ref url="/pages/1M6A2DQ82YJTMQpj9FUT" %}
[Publisher API Reference](https://docs.ayetstudios.com/v/product-docs/publisher-api-reference)
{% endcontent-ref %}

## Reward Status API

In order to keep track of user progress, please refer to the Reward Status API.

The Reward Status API provides publishers with detailed information about a user’s reward progress across all campaigns they have interacted with.

Follow the link to learn more about the Reward Status API.

{% content-ref url="/pages/1M6A2DQ82YJTMQpj9FUT" %}
[Publisher API Reference](https://docs.ayetstudios.com/v/product-docs/publisher-api-reference)
{% endcontent-ref %}

## Conversion Callbacks & Currency Handling <a href="#conversion-callbacks-and-currency-handling" id="conversion-callbacks-and-currency-handling"></a>

Learn about:

* Setting up callbacks
* IP Whitelists
* Securing callbacks using HMAC Security Hash
* Testing callbacks

Click on the link below:

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}


# Reporting

Learn more about the Offerwall metrics available in our dashboard and how to use them in your reporting

<table><thead><tr><th width="154.33333333333331">Group</th><th width="178">Metric</th><th>Description</th></tr></thead><tbody><tr><td><strong>Revenue &#x26; Costs</strong></td><td>Revenue</td><td><em>The publisher's net revenue from completed offers.</em></td></tr><tr><td>​</td><td>AdServer Fees</td><td><em>This is the amount deducted from the revenue for the AdServer service.</em><br><em>(*equals 0 if AdServer is not used)</em></td></tr><tr><td><strong>Delivery</strong></td><td>DAU</td><td><em>Unique Users per calendar day using the offerwall.</em></td></tr><tr><td></td><td>Offerwall Requests</td><td><em>Total non-unique requests to the Offerwall (counts users multiple times if they enter the offerwall several times a day).</em></td></tr><tr><td></td><td>Unique Offerwall Requests</td><td><em>Unique requests to the Offerwall by users (including users that churned by not accepting the privacy policy).</em></td></tr><tr><td>​</td><td>Unique Offerwall Entries</td><td><em>Unique entries to the Offerwall by users (consisting of users which are accepting the privacy policy or have accepted it already in the past).</em></td></tr><tr><td><strong>Interactions</strong></td><td>Impressions</td><td><em>An impression is registered once a user opens the Offerwall (no time delay).</em></td></tr><tr><td>​</td><td>Clicks</td><td><em>This equals the number of offers which were started.</em></td></tr><tr><td>​</td><td>Conversions</td><td><em>A conversion is registered once an offer is completed.</em></td></tr><tr><td><strong>Performance</strong></td><td>EPC</td><td>The average Earnings per Click calculated from the Revenue divided by the amount of clicks.</td></tr><tr><td></td><td>eCPM</td><td>The average CPM (Cost per Thousand) calculated from Revenue divided by Offerwall Requests times 1000.</td></tr><tr><td></td><td>ARPDAU</td><td>The Average Revenue per Daily Active User.</td></tr></tbody></table>


# Surveywall


# Web Integrations

Here are the articles in this section:

{% content-ref url="/pages/Dak24fWpF4P1y4UicQ3S" %}
[Web Surveywall](https://docs.ayetstudios.com/v/product-docs/surveywall/web-integrations/web-surveywall)
{% endcontent-ref %}


# Web Surveywall

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.

## Eligible Placement & AdSlot Combinations <a href="#eligible-placement-and-adslot-combinations" id="eligible-placement-and-adslot-combinations"></a>

The below table shows all Placement & AdSlot Type combinations that allow you to utilize the Web Surveywall integration.

| Placement Type | AdSlot Type    | Eligible Integration Type |
| -------------- | -------------- | ------------------------- |
| Website        | Web Surveywall | Web Surveywall            |

{% hint style="danger" %}
If you integrate the Web Surveywall while using a different Placement & AdSlot combination in the ayeT-Studios dashboard, you won't be able to initialize the Surveywall.
{% endhint %}

## Utilization for Desktop, Mobile Web & In-App <a href="#utilization-for-desktop-mobile-web-and-in-app" id="utilization-for-desktop-mobile-web-and-in-app"></a>

Technically, the Surveywall has to be implemented by opening a new browser tab or loading the Surveywall link inside an iframe.

This type of Web Surveywall is intended to be called directly in an actual browser and is not very well suited for webview (in-app) integration.

For in-app integrations, please take a look at our seamless In-App integrations by checking out our available SDKs, Wrappers and Plugins.

{% hint style="info" %}
The **Web Surveywall** can nevertheless be used in-app if you follow a few guidelines

* Your placement has to be a "Website" placement
* You have to link out of your app to open the Web Surveywall in a mobile browser

Please follow the Integration Best Practises.
{% endhint %}

### Integration Best Practices <a href="#integration-best-practises" id="integration-best-practises"></a>

| Platform   | Integration Best Practise                                                                                        | Surveys                                                                                                                                                                                                       |
| ---------- | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Desktop    | Open the web surveywall in a new tab or iframe.                                                                  | The web surveywall shows surveys to the user.                                                                                                                                                                 |
| Mobile Web | Open the web surveywall in a new tab or iframe.                                                                  | The web surveywall adjusts its layout if users access via a mobile device. E.g. for accessing via an Android device, users will see a single column layout as oposed to a two-column layout like for desktop. |
| In-App     | Create a button in your app that leads users into their mobile browser and into the ayeT-Studios Web Surveywall. | The web surveywall shows eligible surveys to the user in a mobile optimized layout.                                                                                                                           |

## Getting Started

Before you start with the integration, make sure you:

* [x] Create an Account
* [x] Add a Placement
* [x] Add an AdSlot

You will find more details here:

{% content-ref url="/pages/W7CE6bNya8L7RoaXXY21" %}
[Dashboard Setup](https://docs.ayetstudios.com/v/product-docs/dashboard-setup)
{% endcontent-ref %}

## Your Web Survewall Link - Mandatory Parameters <a href="#your-browser-offerwall-link-mandatory-parameters" id="your-browser-offerwall-link-mandatory-parameters"></a>

The URL template for our web surveywall looks like this:

```
https://surveys.ayet.io/surveys?adSlot=ADSLOT_ID&external_identifier={YOUR_USER_IDENTIFIER}
```

To retrieve the URL for one of your web surveywall adslots, click on "Edit" next to an AdSlot under *Placements / Apps* and retrieve the *Integration URL* in the modal.

URL Parameters:

<table><thead><tr><th width="230">Parameter</th><th width="121.33333333333331">Mandatory</th><th>Description</th></tr></thead><tbody><tr><td>external_identifier</td><td>yes</td><td>Your identifier for the calling user - this is mandatory and allows you to attribute our Server2Server conversion callbacks to a specific user (returned in {uid})</td></tr><tr><td>custom_1</td><td>no</td><td><p>Custom parameter you can pass to the Surveywall Entry Link in the form of: &#x26;custom_1={YOUR_CUSTOM_PARAMETER}</p><p>You can get this variable back via conversion callbacks</p></td></tr><tr><td>custom_2</td><td>no</td><td><p>Custom parameter you can pass to the Surveywall Entry Link in the form of: &#x26;custom_2={YOUR_CUSTOM_PARAMETER}</p><p>You can get this variable back via conversion callbacks</p></td></tr><tr><td>custom_3</td><td>no</td><td><p>Custom parameter you can pass to the Surveywall Entry Link in the form of: &#x26;custom_3={YOUR_CUSTOM_PARAMETER}</p><p>You can get this variable back via conversion callbacks</p></td></tr><tr><td>custom_4</td><td>no</td><td><p>Custom parameter you can pass to the Surveywall Entry Link in the form of: &#x26;custom_4={YOUR_CUSTOM_PARAMETER}</p><p>You can get this variable back via conversion callbacks</p></td></tr><tr><td>custom_5</td><td>no</td><td><p>Custom parameter you can pass to the Surveywall Entry Link in the form of: &#x26;custom_5={YOUR_CUSTOM_PARAMETER}</p><p>You can get this variable back via conversion callbacks</p></td></tr></tbody></table>

## Conversion Callbacks & Currency Handling <a href="#conversion-callbacks-and-currency-handling" id="conversion-callbacks-and-currency-handling"></a>

Learn about:

* Setting up callbacks
* IP Whitelists
* Securing callbacks using HMAC Security Hash
* Testing callbacks

Click on the link below:

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}


# SDK Integrations (v2)


# Android SDK (v2)

The Android SDK allows you to 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.

{% hint style="info" %}

### Updates History

**2025-12-02: v1.0.0** - Release the Android SDK v2
{% endhint %}

## Eligible Placement & AdSlot Combinations <a href="#eligible-placement-and-adslot-combinations" id="eligible-placement-and-adslot-combinations"></a>

The table below shows all Placement & AdSlot Type combinations that allow you to utilize the Android SDK integration.

| Placement Type | AdSlot Type   |
| -------------- | ------------- |
| Android        | Offerwall     |
| Android        | Surveywall    |
| Android        | Offerwall API |

{% hint style="danger" %}
If you integrate the Android SDK while using a different Placement & AdSlot combination in the ayeT-Studios dashboard, you won't be able to initialize the SDK.
{% endhint %}

## Demo App

{% embed url="<https://github.com/ayetstudios/android-sdk-v2-demo-app>" %}

## Getting Started

Before you start with the integration, make sure you have:

* [x] Created an Account
* [x] Added a Placement
* [x] Added an AdSlot

You can find more details here:

{% content-ref url="/pages/W7CE6bNya8L7RoaXXY21" %}
[Dashboard Setup](https://docs.ayetstudios.com/v/product-docs/dashboard-setup)
{% endcontent-ref %}

{% hint style="warning" %}
Make sure to use the correct package name that you intend to use for your final app. Alternatively, create a test placement with a different package name that matches the package name of your test app.

If package name of your placement and your actual app don't match, you can't initialize the SDK.
{% endhint %}

## Adding the SDK Dependency

To add the SDK to your project, simply update your `build.gradle.kts` file to add the following dependency:

```kts
dependencies {
    implementation("io.ayet:android-sdk-v2:1.0.3")
}
```

Once this has been added, sync your project to apply the changes:

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FcMiTl7nsBsKw0MkeOgXy%2Fimage.png?alt=media&amp;token=576dafef-344b-47b0-a7c0-2397aefc4043" alt=""><figcaption></figcaption></figure>

## Add the internet permission to AndroidManifest <a href="#add-the-library-to-your-android-studio-project" id="add-the-library-to-your-android-studio-project"></a>

Add the following tag to your `AndroidManifest.xml` , just before the `application` tag:

```xml
<uses-permission android:name="android.permission.INTERNET" />
```

Example of completed `AndroidManifest.xml`:

```xml
<?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 and initialize the SDK <a href="#initialize-the-sdk-and-managed-user-balances" id="initialize-the-sdk-and-managed-user-balances"></a>

In this step, we will import and initialize the SDK in the main activity.

{% hint style="info" %}
**Note:** The `externalIdentifier` passed in the init call is the user's identifier on your end. This will be accessible in the conversion callbacks through the `{external_identifier}` parameter. The `placementId` is the unique ID assigned to your placement when it's created through our dashboard.
{% endhint %}

First, import the library:

```kt
import com.ayet.sdk.AyetSdk                
```

Then, call the `AyetSdk.init` method:

```kt
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))
                }
            }
        }
    }
}
```

## Show the Surveywall

To show the surveywall, simply call the `showSurveywall` method:

```kt
val context = LocalContext.current
AyetSdk.showSurveywall(context, "YOUR_SURVEYWALL_ADSLOT_NAME")
```

{% hint style="info" %}
The `YOUR_SURVEYWALL_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Surveywall** adslots.
{% endhint %}

## Conversion Callbacks & Currency Handling <a href="#conversion-callbacks-and-currency-handling" id="conversion-callbacks-and-currency-handling"></a>

Learn about:

* Setting up callbacks
* IP Whitelists
* Securing callbacks using HMAC Security Hash
* Testing callbacks

Click on the link below:

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}

## Additional Methods

## Show the Offerwall

To show the offerwall, simply call the `showOfferwall` method:

```kt
val context = LocalContext.current
AyetSdk.showOfferwall(context, "YOUR_OFFERWALL_ADSLOT_NAME")
```

{% hint style="info" %}
The `YOUR_OFFERWALL_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Offerwall** adslots.
{% endhint %}

## Fetch Offers

To fetch a list of all offers in JSON format, simply call the `getOffers` method:

```kt
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")
    }
}
```

{% hint style="info" %}
The `YOUR_OFFERWALL_API_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Offerwall API** adslots.
{% endhint %}

## Show Reward Status

The Reward Status page allows users to see their clicked and in-progress offers and allows users to request support / submit tickets. The reward status is also part of the offerwall and the surveywall. To show the reward status page stand-alone, simply call the `showRewardStatus` method:

```kt
val context = LocalContext.current
AyetSdk.showRewardStatus(context)
```

## Set custom parameters

Set custom parameters for callbacks. Set up to 5 custom parameters.

```kt
AyetSdk.setTrackingCustom1("custom1")
AyetSdk.setTrackingCustom2("custom2")
AyetSdk.setTrackingCustom3("custom3")
AyetSdk.setTrackingCustom4("custom4")
AyetSdk.setTrackingCustom5("custom5")
```

{% hint style="info" %}
Note: Custom parameters must also be added to your callback URL to receive them in your S2S callbacks.
{% endhint %}

More information here:

{% content-ref url="/pages/4uQiMxtgnAayAHR8ZeXt" %}
[Offerwall Callbacks](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing/callbacks/offerwall-callbacks)
{% endcontent-ref %}

## Set Age and Gender

Additionally, you may optionally pass user age and gender to us. This can help us match users to the best and most appropriate offers for them.

```kt
AyetSdk.setGender(Gender.MALE)
AyetSdk.setGender(Gender.FEMALE)
AyetSdk.setAge(25)
```

## Notes

* When calling certain SDK methods, `context` must be passed. When passing `context` from `onCreate` for example, this will simply be `this`. If calling from elsewhere, the context will need to be provided from `LocalContext.current`.


# iOS SDK (v2)

The iOS SDK allows you to 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.

{% hint style="info" %}

### Updates History

**2025-12-02: v1.0.0** - Release the iOS SDK v2
{% endhint %}

## Eligible Placement & AdSlot Combinations <a href="#eligible-placement-and-adslot-combinations" id="eligible-placement-and-adslot-combinations"></a>

The table below shows all Placement & AdSlot Type combinations that allow you to utilize the iOS SDK integration.

| Placement Type | AdSlot Type   |
| -------------- | ------------- |
| iOS            | Offerwall     |
| iOS            | Surveywall    |
| iOS            | Offerwall API |

{% hint style="danger" %}
If you integrate the iOS SDK while using a different Placement & AdSlot combination in the ayeT-Studios dashboard, you won't be able to initialize the SDK.
{% endhint %}

## Demo App

{% embed url="<https://github.com/ayetstudios/ios-sdk-v2-demo-app>" %}

## Getting Started

Before you start with the integration, make sure you have:

* [x] Created an Account
* [x] Added a Placement
* [x] Added an AdSlot

You can find more details here:

{% content-ref url="/pages/W7CE6bNya8L7RoaXXY21" %}
[Dashboard Setup](https://docs.ayetstudios.com/v/product-docs/dashboard-setup)
{% endcontent-ref %}

{% hint style="warning" %}
Make sure to use the correct package name that you intend to use for your final app. Alternatively, create a test placement with a different package name that matches the package name of your test app.

If package name of your placement and your actual app don't match, you can't initialize the SDK.
{% endhint %}

## Adding the SDK Dependency

To integrate the iOS SDK into your project, add the package dependency to your app.

In Xcode, with your project open, click **File** and **Add Package Dependencies...**

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FepEcJYJiYNv0AZwq9vin%2Fimage.png?alt=media&amp;token=be1b7002-1ae7-4412-89cf-c13baf76aa56" alt=""><figcaption></figcaption></figure>

Enter the repository URL (`https://github.com/ayetstudios/ios-sdk-v2-repo`) in the search bar and click **Add Package**:

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2Fh9FWojJ0sknTZMPV7o6H%2Fimage.png?alt=media&amp;token=9a296c01-c634-47d6-93b0-47dae1285da5" alt=""><figcaption></figcaption></figure>

Select the target for your app, then click **Add Package** again:

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FXbaj2oRshGOIOQZ2DDdS%2Fimage.png?alt=media&amp;token=b9ef3199-27cb-4ff3-86a7-42cbf5b75297" alt=""><figcaption></figcaption></figure>

## Import and initialize the SDK <a href="#initialize-the-sdk-and-managed-user-balances" id="initialize-the-sdk-and-managed-user-balances"></a>

In this step, we will import and initialize the SDK in the app.

{% hint style="info" %}
**Note:** The `externalIdentifier` passed in the init call is the user's identifier on your end. This will be accessible in the conversion callbacks through the `{external_identifier}` parameter. The `placementId` is the unique ID assigned to your placement when it's created through our dashboard.
{% endhint %}

First, import the library:

```swift
import AyetSDK           
```

Then, call the `AyetSDK.shared.initialize` method:

```swift
@main
struct iosSdkV2DemoAppApp: App {
    init() {
        AyetSDK.shared.initialize(placementId: YOUR_PLACEMENT_ID, externalIdentifier: "USER_EXTERNAL_IDENTIFIER")
    }

    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}
```

## Show the Surveywall

To show the surveywall, simply call the `showSurveywall` method:

<pre class="language-swift"><code class="lang-swift"><strong>await AyetSDK.shared.showSurveywall(adSlotName: "YOUR_SURVEYWALL_ADSLOT_NAME")
</strong></code></pre>

{% hint style="info" %}
The `YOUR_SURVEYWALL_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Surveywall** adslots.
{% endhint %}

## Conversion Callbacks & Currency Handling <a href="#conversion-callbacks-and-currency-handling" id="conversion-callbacks-and-currency-handling"></a>

Learn about:

* Setting up callbacks
* IP Whitelists
* Securing callbacks using HMAC Security Hash
* Testing callbacks

Click on the link below:

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}

## Additional Methods

## Show the Offerwall

To show the offerwall, simply call the `showOfferwall` method:

```swift
await AyetSDK.shared.showOfferwall(adSlotName: "YOUR_OFFERWALL_ADSLOT_NAME")
```

{% hint style="info" %}
The `YOUR_OFFERWALL_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Offerwall** adslots.
{% endhint %}

## Fetch Offers

To fetch a list of all offers in JSON format, simply call the `getOffers` method:

```kt
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")
}
```

{% hint style="info" %}
The `YOUR_OFFERWALL_API_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Offerwall API** adslots.
{% endhint %}

## Show Reward Status

The Reward Status page allows users to see their clicked and in-progress offers and allows users to request support / submit tickets. The reward status is also part of the offerwall and the surveywall. To show the reward status page stand-alone, simply call the `showRewardStatus` method:

```swift
await AyetSDK.shared.showRewardStatus()
```

## Set custom parameters

Set custom parameters for callbacks. Set up to 5 custom parameters.

```swift
AyetSDK.shared.setTrackingCustom1("custom1")
AyetSDK.shared.setTrackingCustom2("custom2")
AyetSDK.shared.setTrackingCustom3("custom3")
AyetSDK.shared.setTrackingCustom4("custom4")
AyetSDK.shared.setTrackingCustom5("custom5")
```

{% hint style="info" %}
Note: Custom parameters must also be added to your callback URL to receive them in your S2S callbacks.
{% endhint %}

More information here:

{% content-ref url="/pages/4uQiMxtgnAayAHR8ZeXt" %}
[Offerwall Callbacks](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing/callbacks/offerwall-callbacks)
{% endcontent-ref %}

## Set Age and Gender

Additionally, you may optionally pass user age and gender to us. This can help us match users to the best and most appropriate offers for them.

```swift
AyetSDK.shared.setGender(.male)
AyetSDK.shared.setGender(.female)
AyetSDK.shared.setAge(25)
```


# SDK Wrappers (v2)


# Flutter Wrapper (v2)

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.

{% hint style="info" %}

### Updates History

**2025-12-19: v1.0.0** - Release the Flutter Wrapper for V2 of the SDK
{% endhint %}

## Eligible Placement & AdSlot Combinations <a href="#eligible-placement-and-adslot-combinations" id="eligible-placement-and-adslot-combinations"></a>

The table below shows all Placement & AdSlot Type combinations that allow you to utilize the Flutter integration.

| Placement Type | AdSlot Type   |
| -------------- | ------------- |
| Android/iOS    | Offerwall     |
| Android/iOS    | Surveywall    |
| Android/iOS    | Offerwall API |

{% hint style="danger" %}
If you integrate the Flutter wrapper while using a different Placement & AdSlot combination in the ayeT-Studios dashboard, you won't be able to initialize the SDK.
{% endhint %}

## Demo App

{% embed url="<https://github.com/ayetstudios/flutter_sdk_v2_demo_app>" %}

## Getting Started

Before you start with the integration, make sure you have:

* [x] Created an Account
* [x] Added a Placement
* [x] Added an AdSlot

You can find more details here:

{% content-ref url="/pages/W7CE6bNya8L7RoaXXY21" %}
[Dashboard Setup](https://docs.ayetstudios.com/v/product-docs/dashboard-setup)
{% endcontent-ref %}

{% hint style="warning" %}
Make sure to use the correct package name that you intend to use for your final app. Alternatively, create a test placement with a different package name that matches the package name of your test app.

If package name of your placement and your actual app don't match, you can't initialize the SDK. Note that your package name may be different on iOS and Android for the same Flutter app.
{% endhint %}

## Adding the SDK Dependency

Add to your pubspec.yaml:

```yaml
dependencies:
  ayet_sdk_v2: ^1.0.4
```

Once this has been added, run `flutter pub get` to fetch the package.

### Android Setup <a href="#add-the-library-to-your-android-studio-project" id="add-the-library-to-your-android-studio-project"></a>

Add the following tag to your `AndroidManifest.xml` , just before the `application` tag:

```xml
<uses-permission android:name="android.permission.INTERNET" />
```

Example of completed `AndroidManifest.xml`:

```xml
<?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>
```

### iOS Setup

Enable Swift Package Manager:

```
flutter config --enable-swift-package-manager
```

Then run `flutter build ios` to fetch dependencies.

## Import and initialize the SDK <a href="#initialize-the-sdk-and-managed-user-balances" id="initialize-the-sdk-and-managed-user-balances"></a>

```dart
import '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',
);
```

The `externalIdentifier` is your user's ID, accessible in conversion callbacks via `{external_identifier}`. The `placementId` is found in your dashboard.

## Show the Surveywall

To show the surveywall, simply call the `showSurveywall` method:

```dart
await sdk.showSurveywall('YOUR_SURVEYWALL_ADSLOT_NAME');
```

{% hint style="info" %}
The `YOUR_SURVEYWALL_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Surveywall** adslots.
{% endhint %}

## Conversion Callbacks & Currency Handling <a href="#conversion-callbacks-and-currency-handling" id="conversion-callbacks-and-currency-handling"></a>

Learn about:

* Setting up callbacks
* IP Whitelists
* Securing callbacks using HMAC Security Hash
* Testing callbacks

Click on the link below:

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}

## Additional Methods

## Show the Offerwall

To show the offerwall, simply call the `showOfferwall` method:

```dart
await sdk.showOfferwall('YOUR_OFFERWALL_ADSLOT_NAME');
```

{% hint style="info" %}
The `YOUR_OFFERWALL_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Offerwall** adslots.
{% endhint %}

## Fetch Offers

To fetch a list of all offers in JSON format, simply call the `getOffers` method:

```dart
final offersJson = await sdk.getOffers('YOUR_OFFERWALL_API_ADSLOT_NAME');
```

{% hint style="info" %}
The `YOUR_OFFERWALL_API_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Offerwall API** adslots.
{% endhint %}

## Show Reward Status

The Reward Status page allows users to see their clicked and in-progress offers and allows users to request support / submit tickets. The reward status is also part of the offerwall and the surveywall. To show the reward status page stand-alone, simply call the `showRewardStatus` method:

```dart
await sdk.showRewardStatus();
```

## Set custom parameters

Set custom parameters for callbacks. Set up to 5 custom parameters.

```dart
await sdk.setTrackingCustom1('custom1');
await sdk.setTrackingCustom2('custom2');
await sdk.setTrackingCustom3('custom3');
await sdk.setTrackingCustom4('custom4');
await sdk.setTrackingCustom5('custom5');
```

{% hint style="info" %}
Note: Custom parameters must also be added to your callback URL to receive them in your S2S callbacks.
{% endhint %}

More information here:

{% content-ref url="/pages/4uQiMxtgnAayAHR8ZeXt" %}
[Offerwall Callbacks](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing/callbacks/offerwall-callbacks)
{% endcontent-ref %}

## Set Age and Gender

Additionally, you may optionally pass user age and gender to us. This can help us match users to the best and most appropriate offers for them.

```dart
await sdk.setAge(25);
await sdk.setGender(AyetGender.male);
await sdk.setGender(AyetGender.female);
```


# React Native Wrapper (v2)

The React Native 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.

{% hint style="info" %}

### Updates History

**2026-04-15: v1.0.0** - Release the React Native Wrapper for V2 of the SDK
{% endhint %}

## Eligible Placement & AdSlot Combinations <a href="#eligible-placement-and-adslot-combinations" id="eligible-placement-and-adslot-combinations"></a>

The table below shows all Placement & AdSlot Type combinations that allow you to utilize the React Native integration.

| Placement Type | AdSlot Type   |
| -------------- | ------------- |
| Android/iOS    | Offerwall     |
| Android/iOS    | Surveywall    |
| Android/iOS    | Offerwall API |

{% hint style="danger" %}
If you integrate the React Native wrapper while using a different Placement & AdSlot combination in the ayeT-Studios dashboard, you won't be able to initialize the SDK.
{% endhint %}

## Getting Started

Before you start with the integration, make sure you have:

* [x] Created an Account
* [x] Added a Placement
* [x] Added an AdSlot

You can find more details here:

{% content-ref url="/pages/W7CE6bNya8L7RoaXXY21" %}
[Dashboard Setup](https://docs.ayetstudios.com/v/product-docs/dashboard-setup)
{% endcontent-ref %}

{% hint style="warning" %}
Make sure to use the correct package name that you intend to use for your final app. Alternatively, create a test placement with a different package name that matches the package name of your test app.

If package name of your placement and your actual app don't match, you can't initialize the SDK. Note that your package name may be different on iOS and Android for the same React Native app.
{% endhint %}

## Installation

Run the installation command:

```zsh
npm install ayet-react-native-sdk-v2
```

### Android Setup <a href="#add-the-library-to-your-android-studio-project" id="add-the-library-to-your-android-studio-project"></a>

Add the following tag to your `AndroidManifest.xml` , just before the `application` tag:

```xml
<uses-permission android:name="android.permission.INTERNET" />
```

Example of completed `AndroidManifest.xml`:

```xml
<?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>
```

### iOS Setup

Install pods:

```zsh
cd ios && pod install
```

## Import and initialize the SDK <a href="#initialize-the-sdk-and-managed-user-balances" id="initialize-the-sdk-and-managed-user-balances"></a>

```typescript
import AyetSdkV2 from 'ayet-react-native-sdk-v2';

// Initialize with your placement ID and user identifier
AyetSdkV2.init(YOUR_PLACEMENT_ID, 'USER_EXTERNAL_IDENTIFIER');
```

The `externalIdentifier` is your user's ID, accessible in conversion callbacks via `{external_identifier}`. The `placementId` is found in your dashboard.

## Show the Surveywall

To show the surveywall, simply call the `showSurveywall` method:

```typescript
AyetSdkV2.showSurveywall('YOUR_SURVEYWALL_ADSLOT_NAME');
```

{% hint style="info" %}
The `YOUR_SURVEYWALL_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Surveywall** adslots.
{% endhint %}

## Conversion Callbacks & Currency Handling <a href="#conversion-callbacks-and-currency-handling" id="conversion-callbacks-and-currency-handling"></a>

Learn about:

* Setting up callbacks
* IP Whitelists
* Securing callbacks using HMAC Security Hash
* Testing callbacks

Click on the link below:

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}

## Additional Methods

## Show the Offerwall

To show the offerwall, simply call the `showOfferwall` method:

```typescript
AyetSdkV2.showOfferwall('YOUR_OFFERWALL_ADSLOT_NAME');
```

{% hint style="info" %}
The `YOUR_OFFERWALL_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Offerwall** adslots.
{% endhint %}

## Fetch Offers

To fetch a list of all offers in JSON format, simply call the `getOffers` method:

```typescript
const offersJson = await AyetSdkV2.getOffers('YOUR_OFFERWALL_API_ADSLOT_NAME');
```

{% hint style="info" %}
The `YOUR_OFFERWALL_API_ADSLOT_NAME` parameter can be found by clicking on the adslot on your dashboard. This is only available on **Offerwall API** adslots.
{% endhint %}

## Show Reward Status

The Reward Status page allows users to see their clicked and in-progress offers and allows users to request support / submit tickets. The reward status is also part of the offerwall and the surveywall. To show the reward status page stand-alone, simply call the `showRewardStatus` method:

```typescript
AyetSdkV2.showRewardStatus();
```

## Set custom parameters

Set custom parameters for callbacks. Set up to 5 custom parameters.

```typescript
AyetSdkV2.setTrackingCustom1('custom1');
AyetSdkV2.setTrackingCustom2('custom2');
AyetSdkV2.setTrackingCustom3('custom3');
AyetSdkV2.setTrackingCustom4('custom4');
AyetSdkV2.setTrackingCustom5('custom5');
```

{% hint style="info" %}
Note: Custom parameters must also be added to your callback URL to receive them in your S2S callbacks.
{% endhint %}

More information here:

{% content-ref url="/pages/4uQiMxtgnAayAHR8ZeXt" %}
[Offerwall Callbacks](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing/callbacks/offerwall-callbacks)
{% endcontent-ref %}

## Set Age and Gender

Additionally, you may optionally pass user age and gender to us. This can help us match users to the best and most appropriate offers for them.

```typescript
AyetSdkV2.setAge(25);
AyetSdkV2.setGender(AyetGender.Male);
```


# API Integrations


# Surveywall API

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.

Eligible Placement & AdSlot Combinations

The table below shows all Placement & AdSlot Type combinations that allow you to utilize the Surveywall API integration.

| Placement Type | AdSlot Type    | Eligible Integration Type |
| -------------- | -------------- | ------------------------- |
| Android App    | Surveywall API | Surveywall API            |
| iOS App        | Surveywall API | Surveywall API            |
| Website        | Surveywall API | Surveywall API            |

{% hint style="danger" %}
If you integrate the Surveywall API while using a different Placement & AdSlot combination in the ayeT-Studios dashboard, you won't be able to make correct API requests.
{% endhint %}

## Getting Started

Before you start with the integration, make sure you:

* [x] Created an Account
* [x] Added a Placement
* [x] Added an AdSlot

You will find more details here:

{% content-ref url="/pages/W7CE6bNya8L7RoaXXY21" %}
[Dashboard Setup](https://docs.ayetstudios.com/v/product-docs/dashboard-setup)
{% endcontent-ref %}

## Technical Surveywall API Documentation <a href="#technical-offerwall-api-documentation" id="technical-offerwall-api-documentation"></a>

For API Calls, all surveys matching the parameters provided will be returned and can be displayed to the user.

The Surveywall API supports both server and client-side calls.

Follow the link below to get to the detailed technical documentation.

{% content-ref url="/pages/1M6A2DQ82YJTMQpj9FUT" %}
[Publisher API Reference](https://docs.ayetstudios.com/v/product-docs/publisher-api-reference)
{% endcontent-ref %}

### Passing Profiling Information via the Surveywall API

If you already collect profiling data from your users, you can optionally pass this information to us through the Surveywall API call. While not required, providing profiling details can improve targeting and survey performance.

To enable this feature, open the **Edit Adslot** modal for your Surveywall API adslot in the dashboard and generate a **Profiling Data Validation Hash**.

#### Available Questions and Answers

You can find the complete list of supported profiling questions and acceptable answer formats here:\
👉 [Profiling Questions & Answers](https://docs.google.com/spreadsheets/d/1sO598lcKXQG4wlKJk5ex2hXYnQ2gopea_bp8HhH8RZA/edit?usp=sharing)\
Please check this document regularly for updates.

#### How to Pass Profiling Information

To include profiling data in your API call, append the appropriate question and answer parameters to the request URL. You'll also need to generate a cryptographic hash to validate the data.

For example, to pass the following information:

* **Gender**: Male
* **ZIP Code**: 20500
* **Birthdate**: 1995-05-31

The API call would look like this:

```
https://www.ayetstudios.com/surveys/surveywall_api/{adslotId}?external_identifier={YOUR_USER_IDENTIFIER}&q5=1995-05-31&q6=20500&q7=8&hash=88cd2108b5347d973cf39cdf9053d7dd42704876d8c9a9bd8e2d168259d3ddf7
```

#### Hash Generation

The `hash` parameter is calculated as a SHA256 HMAC, using the **Profiling Data Validation Hash** as the secret key. The input string is a URL-encoded query string of all parameters **except** the `hash` itself, sorted by key.

Here’s a PHP example:

```php
function 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);
```

## Conversion Callbacks & Currency Handling <a href="#conversion-callbacks-and-currency-handling" id="conversion-callbacks-and-currency-handling"></a>

Learn about:

* Setting up callbacks
* IP Whitelists
* Securing callbacks using HMAC Security Hash
* Testing callbacks

Click on the link below:

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}


# Rewarded Video


# Web integrations


# Rewarded Video SDK for HTML5

The ayeT-Studios Rewarded Video SDK for HTML5 allows web publishers to request and run rewarded video ads within their page.

## Eligible Placement & AdSlot Combinations <a href="#eligible-placement-and-adslot-combinations" id="eligible-placement-and-adslot-combinations"></a>

The table below shows all Placement & AdSlot Type combinations which allow you to utilize the Rewarded Video for Web integration.

| Placement Type | AdSlot Type    | Eligible Integration Type    |
| -------------- | -------------- | ---------------------------- |
| Website        | Rewarded Video | Rewarded Video SDK for HTML5 |

{% hint style="danger" %}
If you integrate the Rewarded Video for Web SDK while using a different Placement & AdSlot combination in the ayeT-Studios dashboard, you won't be able to send correct ad requests.
{% endhint %}

## Getting Started

Before you start with the integration, make sure you:

* [x] Created an Account
* [x] Added a Placement
* [x] Added an AdSlot

You will find more details here:

{% content-ref url="/pages/W7CE6bNya8L7RoaXXY21" %}
[Dashboard Setup](https://docs.ayetstudios.com/v/product-docs/dashboard-setup)
{% endcontent-ref %}

### Ads.txt

{% hint style="warning" %}
Adding an ads.txt to your domain is required (see Integration) to correctly utilize the Rewarded Video solution.
{% endhint %}

You can find the relevant ads.txt lines that you have to add to [www.your-website.com/ads.txt](http://www.your-website.com/ads.txt) under "Edit Placements" in your publisher dashboard.

### CMP

We highly recommend using a **CMP** (Consent Management Platform) on your website.

{% hint style="info" %}
Without a compliant **CMP** and without requesting consent from affected GDPR & CCPA users, both fill rate and eCPM will be impacted significantly or no ads will be delivered at all.
{% endhint %}

There are two different options for you to integrate a CMP:

1. **Self-Hosted CMP**
   * Go to <https://iabeurope.eu/cmp-list/>
   * Look for a CMP that suits you
   * Follow the integration docs of that CMP
2. **CMP from Google AdSense (free of charge)**
   * Create a Google AdSense account
   * Setup and integrate the Google CMP
   * Our Team can assist with the setup

### Supported Features

Our JavaScript library supports the following features:

* OpenRTB header bidding with bundled prebid.js
* Ad server functionality with custom waterfall demand sources, bid buckets and back fill
* Consecutive waterfall VAST tag validation and fallback handling for no-bid scenarios
* Content isolation and parent page protection using iframe playback
* Native browser video rendering
* Automatic detection of external CMPs and support for TCF2 / GDPR consent handling
* Both S2S and signed client-side callbacks for user rewards

## Integration

To integrate our video SDK on your site, add the following script to the <mark style="color:red;">`<head></head>`</mark> section of your web / app or pages where videos are supposed to be played:

```php
<script src="https://cdn.ayet.io/offerwall/js/ayetvideosdk.min.js"></script>	
```

The script above is around **35kb** in size and will load additional required scripts (bidders, players, configuration) upon initialization.

Next, please verify that the **ads.txt** on your server contains all requested entries listed for your placement in our dashboard in the *Placement Details > Overview* page.

### Initialization & Global Callback Handlers <a href="#initialization-and-global-callback-handlers" id="initialization-and-global-callback-handlers"></a>

To initialize the SDK for a user, make the following asynchronous call that returns a Promise:

```php
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!");
});
```

<mark style="color:red;">`externalIdentifier`</mark> is a string (up to 128 chars, min. 3 characters) you set to uniquely identify your user. It might be a **UUID**, a **hashed email address** or anything that allows you to persistently identify a user.

<mark style="color:red;">`optionalParameter`</mark> is an optional string (up to 32 chars) you can use to add an additional reporting dimension to the video statistics. It can be accessed and filtered in the video adslot statistics and the reporting API.

To receive notifications for video playback events, the following global callbacks can be configured:

```php
/* 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));};
```

### Requesting Video Ads

To request a video ad for your AdSlot, make the following asynchronous call:

```php
AyetVideoSdk.requestAd(
	'{your_rewarded_video_adslot_name}',
	function() { // success callback function
		console.log("requestAd successful");
	},
	function(msg) { // error callback function
		appendLog("requestAd failed: "+msg);
	}
);	  
```

Make sure not to call <mark style="color:red;">`requestAd`</mark> before the initialization of the SDK is complete, otherwise the call will fail. Also note, that after a success callback, a video ad is ready to be played. Depending on your video demand sources, successful bids will timeout after a while (usually 1-60 minutes). It's advisable to make a <mark style="color:red;">`requestAd`</mark> call just in time when a video should be played.

### Playing Video Ads

After a video ad has been successfully requested, the following calls are available to play an ad. Please note, that these functions should be called from a user-interaction (for example a click event) or from the <mark style="color:red;">`requestAd`</mark> **success callback** which itself has been called from a user-interaction. Otherwise, video autoplay will be rejected by most browsers and we must render an additional button over the video for the user to click, which lowers the acceptance and usability.

```php
/* 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();
```

The different <mark style="color:red;">`play...Ad`</mark> functions will silently abort if an ad is already playing. In all other cases, they make use of the global callback handlers described in the *Initialization & Global Callback Handlers* section.

Additionally, it makes sense to check if a video is ready to play, especially if there's a bigger expected delay between <mark style="color:red;">`requestAd`</mark> and <mark style="color:red;">`play...Ad`</mark>, for example:

```php
/* 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);
		}
	);
}
```

While a video is playing, it's possible to externally **interrupt the ad and destroy the player** by making a call to <mark style="color:red;">`destroy`</mark>:

```php
/* Interrupt a playing ad and destroy the player (to play another ad later, a new call to AyetVideoSdk.requestAd is required) */
AyetVideoSdk.destroy();
```

## Rewarding Users

There are two ways to reward users for rewarded video views, **(1) Clientside Video SDK Callbacks** and **(2) Server2Server Conversion Callbacks**.

The **S2S Callbacks** are usually sent to your server within 60 seconds after a completed & rewarded video view.

{% hint style="info" %}
Since rewarding users for video views in real time is usually important for a frictionless user flow, we recommend using **(1) Clientside Video SDK Callbacks**!
{% endhint %}

### Server2Server Conversion Callbacks <a href="#server2server-conversion-callbacks" id="server2server-conversion-callbacks"></a>

For more information on Server2Server Conversion Callbacks please use this link:

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}

### Clientside Video SDK Callbacks <a href="#clientside-video-sdk-callbacks" id="clientside-video-sdk-callbacks"></a>

The **Clientside SDK Callbacks** are received through the global <mark style="color:red;">`AyetVideoSdk.callbackRewarded`</mark> function shown in Initialization & Global Callback Handlers:

```php
/* 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"}
*/
```

{% hint style="danger" %}
Please use `AyetVideoSdk.callbackRewarded` and not `AyetVideoSdk.callbackComplete` to reward users!
{% endhint %}

You can send the callback response to your server and validate the callback signature serverside. The signature can be verified serverside with your publisher API key (found in our Dashboard > Account Settings > Api Key), like the following example (in PHP). If custom parameters are present in the callback, they are also part of the `signature`. Signature calculation example:

```php
$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);
```

## Passing Custom Parameters <a href="#passing-custom-parameters" id="passing-custom-parameters"></a>

To pass custom parameters to server-side conversion callbacks and clientside callbacks, the function <mark style="color:red;">`AyetVideoSdk.setCustomParameter('custom_n', 'value')`</mark> is available.

Where:

<mark style="color:red;">`custom_n`</mark> can be one of these: `custom_1, custom_2, custom_3, custom_4, custom_5`. `value` is a string (up to 64 chars).

{% hint style="info" %}
Custom Parameters are up to **64 chars** of length!
{% endhint %}

<mark style="color:red;">`AyetVideoSdk.setCustomParameter`</mark> can be called any time with the most recent content used when a video view is completed.

```php
/* 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);
```

## Error Handling / Error Codes <a href="#error-handling-error-codes" id="error-handling-error-codes"></a>

There are two different callback methods for errors in the <mark style="color:red;">`ayetvideosdk`</mark>:

1. The global <mark style="color:red;">`AyetVideoSdk.callbackError`</mark> function that can be configured and is invoked for any type of callback errors: <mark style="color:red;">`AyetVideoSdk.callbackError = function(e)`</mark> <mark style="color:red;">`{console.log("callbackError: "+JSON.stringify(e));};`</mark>
2. The local error function in <mark style="color:red;">`AyetVideoSdk.requestAd(adslotName, successFunction, errorFunction);`</mark> that is invoked if an ad request did not succeed

**Possible error messages for `AyetVideoSdk.callbackError`:**

| <mark style="color:red;">`no adTagUrl set, no video ad available.`</mark>                                    | No ad was requested using `requestAd` or the request was unsuccessful.                        |
| ------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------- |
| <mark style="color:red;">`provided ad unit did not start.`</mark>                                            | The player was unable to start the playback of the video.                                     |
| <mark style="color:red;">`provided ad unit stalled.`</mark>                                                  | The video playback was interrupted for > 5 seconds and aborted (for ex. network issues).      |
| <mark style="color:red;">`provided ad unit is corrupt.`</mark>                                               | The video file or companion ads are corrupted or not supported (for ex. codecs).              |
| <mark style="color:red;">`all bids expired or contained invalid VAST responses, unable to render ad.`</mark> | No valid bids response was found or all bids responses are expired (please request a new ad). |
| <mark style="color:red;">`unrecoverable ad error: {message}`</mark>                                          | Other video player or VAST parser errors that were not covered above.                         |

**Possible error messages for the `AyetVideoSdk.requestAd(...)` error callback:**

| <mark style="color:red;">`no fill.`</mark>                    | This is expected behaviour: There is currently no video ad available for the device & user.                |
| ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| <mark style="color:red;">`unhandled client exception.`</mark> | Unspecified exception in the `ayetvideosdk` during ad request.                                             |
| <mark style="color:red;">`invalid server response.`</mark>    | Error communicating with our servers, check your internet connection & make sure ad blockers are disabled. |
| <mark style="color:red;">`cap reached.`</mark>                | The user/device video cap has been reached.                                                                |

## Conversion Callbacks & Currency Handling <a href="#conversion-callbacks-and-currency-handling" id="conversion-callbacks-and-currency-handling"></a>

Learn about:

* Setting up callbacks
* IP Whitelists
* Securing callbacks using HMAC Security Hash
* Testing callbacks

Click on the link below:

{% content-ref url="/pages/5sxVWIW1fto5Mmv1JxeJ" %}
[Callbacks & Testing](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing)
{% endcontent-ref %}


# In-app integrations


# Android SDK (coming soon)

Coming soon


# iOS SDK (coming soon)

Coming soon


# Get ads.txt

An ads.txt (Authorized Digital Sellers) file is essential for ensuring transparency in digital advertising

Hosted on a publisher's server, it lists authorized sellers of ad inventory, preventing fraud by verifying legitimate transactions. This file safeguards both publishers and advertisers, instilling confidence in the ad buying process and maintaining the integrity of the advertising ecosystem.

{% hint style="info" %}
Implementing and regularly **updating** an ads.txt file is a fundamental step in fostering a trustworthy and secure advertising environment.
{% endhint %}

This is a step by step documentation on how you can get and automatically keep your ads.txt lines updated with ayeT-Studios' platform.

## 1. Log into your Publisher account

{% embed url="<https://www.ayetstudios.com/account/login>" %}

## 2. Access Placement/Apps Settings

In the top right corner of the screen click on “Placements/Apps”

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2Fgit-blob-958fa4ae2994f236e397adc2e5c69c7a0a72af85%2Fget-ads-txt-1-placements-apps.jpg?alt=media" alt="Open Placements / Apps from the Publishers menu."><figcaption></figcaption></figure>

## 3. Edit Placement

Locate your rewarded video placement, and click on edit (right-hand side of the screen)

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2Fgit-blob-732c7451f036188a57695639932794fd2df73b3e%2Fget-ads-txt-2-edit-placement.jpg?alt=media" alt="Select Edit Placement for the placement."><figcaption></figcaption></figure>

## 4. Get ads.txt

In the pop-up window, click on “ads.txt”

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2Fgit-blob-9c4780987b558b14ff2065ae5cca93315deb32f0%2Fget-ads-txt-3-ads-txt-tab.jpg?alt=media" alt="Open the Ads.txt tab in the placement settings."><figcaption></figcaption></figure>

### **Two options to keep your ads.txt entries updated**

You should update your ads.txt regularly, since ayeT-Studios might add new partners to sell your traffic for higher CPMs. If you don't update regularly, you might miss out on additional revenue opportunities.

You have two options to keep your ads.txt entries updated on your website:

### Option A: Regular Manual Updates

1. You can either download the entire ads.txt file
2. Or you can copy the missing entries

You then have to manually add these lines to your ads.txt site on your domain.

Regular Manual Updates

### Option B: Automated Updates / Permanent URL

You can use the Permanent URL option to automate keeping the ads.txt entries on your site updated.

{% hint style="info" %}
**Recommened:** Using the Permanent URL ensures that you don't have to regularly check on new entries or inform your tech team to update the ads.txt entries regularly.
{% endhint %}

Tell your tech to write a few lines of code to e.g. crawl the permanent URL once a day to search for updated ads.txt entries. Once you fetch changes, automaically update the ads.txt entries on your website.

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2Fgit-blob-5e3fa114c651b2f5d0a509d4dd2560adb96b6ad3%2Fget-ads-txt-4-permanent-url.jpg?alt=media" alt="Select Permanent URL to retrieve the ads.txt download link."><figcaption></figcaption></figure>

For more information on the API integration please go to the following link:

{% content-ref url="/pages/1M6A2DQ82YJTMQpj9FUT" %}
[Publisher API Reference](https://docs.ayetstudios.com/v/product-docs/publisher-api-reference)
{% endcontent-ref %}


# AdServer


# VAST Tags

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.

<table><thead><tr><th width="232">Attribute</th><th width="87.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>{external_identifier}</td><td>string</td><td>Unique User ID passed to the Video SDK for each user.</td></tr><tr><td>{device_uuid}</td><td>string</td><td>ayeT-Studios internal device identificator</td></tr><tr><td>{device_make}</td><td>string</td><td>Device manufacturer</td></tr><tr><td>{device_model}</td><td>string</td><td>Device model</td></tr><tr><td>{device_ifa}</td><td>string</td><td>Device advertising id (GAID/IDFA) if known, otherwise empty</td></tr><tr><td>{device_os}</td><td>string</td><td>Device os</td></tr><tr><td>{device_osv}</td><td>string</td><td>Device os version</td></tr><tr><td>{country}</td><td>string</td><td>Country from which the ad request is made.</td></tr><tr><td>{ip}</td><td>string</td><td>IP address from which the ad request is made.</td></tr><tr><td>{ua}</td><td>string</td><td>User Agent from which the ad request is made.</td></tr><tr><td>{cat}</td><td>string array</td><td>Array of IAB content categories of the site.</td></tr><tr><td>{bcat}</td><td>string array</td><td>Array of Blocked IAB content categories of the site.</td></tr><tr><td>{site_name}</td><td>string</td><td>Site name / Placement name as set up in the ayeT dashboard by the publisher .</td></tr><tr><td>{site_domain}</td><td>string</td><td>Domain of the site (e.g., "sub.foobar.com")</td></tr><tr><td>{site_url}</td><td>string</td><td>URL of the site (e.g., "https://sub.foobar.com/abc")</td></tr><tr><td>{site_url_encoded}</td><td>string</td><td>Encoded URL of the site (e.g., "https%3A%2F%2Fsub.foobar.com%2Fabc")</td></tr><tr><td>{app_bundle}</td><td>string</td><td>A platform-specific application identifier intended to be unique to the app and independent of the exchange. On Android, this should be a bundle or package name (e.g., com.foo.mygame). On iOS, it is typically a numeric ID.</td></tr><tr><td>{app_name}</td><td>string</td><td>App name / Placement name as set up in the ayeT dashboard by the publisher.</td></tr><tr><td>{app_storeurl}</td><td>string</td><td>App store URL for an installed app.</td></tr><tr><td>{app_storeurl_encoded}</td><td>string</td><td>Encoded app store URL for an installed app.</td></tr><tr><td>{cmp_available}</td><td>int</td><td>1 if a CMP was detected, 0 if not</td></tr><tr><td>{tc_string}</td><td>string</td><td>Tcf Consent String received from the CMP</td></tr><tr><td>{gdpr_applies}</td><td>int</td><td>1 if the user is from a county where the GDPR applies, 0 if not</td></tr><tr><td>{ts}</td><td>int</td><td>Unix timestamp</td></tr><tr><td>{uid_criteo}</td><td>string</td><td>Macro for passing an external / share User ID from our integrated partner Criteo</td></tr></tbody></table>


# Reporting

Learn more about the Rewarded Video metrics available in our dashboard and how to use them in your reporting

<table><thead><tr><th width="159.33333333333331">Group</th><th width="207">Metric</th><th>Description</th></tr></thead><tbody><tr><td><strong>Revenue &#x26; Costs</strong></td><td>Revenue</td><td><p>The publisher's net revenue.</p><p><em>​</em></p><p>*For AdServer integration the service fees are not considered and revenue is estimated based on Rewarded views (after our own fraud &#x26; viewability checks), VAST network configuration or RTB (real-time bidding) exchange eCPM in bid responses.</p></td></tr><tr><td>​</td><td>AdServer Fees</td><td><p>This is the amount deducted from the revenue for the AdServer service.</p><p>(*equals 0 if AdServer is not used)</p></td></tr><tr><td><strong>Delivery</strong></td><td>Requests</td><td>Number of requested video ads.</td></tr><tr><td>​</td><td>Fills</td><td>Ad requests with valid fill for at least one network.</td></tr><tr><td></td><td>No Fills</td><td>The network didn't deliver an ad for the request.</td></tr><tr><td></td><td>Unchecked Fill Status</td><td>The fill wasn't checked for this network, because a network higher up in the waterfall already delivered fill.</td></tr><tr><td><strong>Playback</strong></td><td>Requested Plays</td><td>The number of filled ad requests for which playAd was called.</td></tr><tr><td>​</td><td>Media Errors</td><td>The number of requested plays for which the player was unable to load or initialize the media file.</td></tr><tr><td>​</td><td>Started Plays</td><td>The media file was loaded and playback started.</td></tr><tr><td>​</td><td>Play errors</td><td>The number of times video playback was prematurely interrupted (user abort, network errors, interactive ad termination).</td></tr><tr><td><strong>Performance</strong></td><td>Completed Views</td><td>The number of completed video views.</td></tr><tr><td>​</td><td>Rewarded Views</td><td>The number of rewarded views after server-side fraud and visibility checks.</td></tr><tr><td></td><td>eCPM</td><td><p>This is the <strong>e</strong>ffective <strong>C</strong>ost <strong>P</strong>er <strong>M</strong>ille calculated based on the revenue and rewarded views.</p><p>eCPM= Revenue / Rewarded views *1000</p></td></tr><tr><td><strong>TCF</strong></td><td>TCF Missing</td><td>Consent String is missing</td></tr><tr><td></td><td>TCF GDPR</td><td>GDPR Consent String is available</td></tr><tr><td></td><td>TCF No GDPR</td><td>GDPR Consent String is not available</td></tr><tr><td></td><td>TCF Rejected</td><td>User rejected the Consent</td></tr><tr><td></td><td>TCF Partial</td><td>User partially accepted the Consent</td></tr><tr><td></td><td>TCF Consented</td><td>User fully accepted the Consent</td></tr></tbody></table>


# Best Practise

Following each of the main points below will help you get the most out of your Rewarded Video integration.

## CMP Integration & User Consent

**Why is a CMP integration with enabled vendor management essential to collect GDPR & CCPA compliant user consents to increase fill rates?**

Implementing a Consent Management Platform (CMP) is crucial for maximizing ad fill rates and ensuring demand partners actively bid on your inventory. A CMP facilitates compliance with data protection regulations, such as the General Data Protection Regulation (GDPR) in the European Union and the California Consumer Privacy Act (CCPA) in the United States. Without a compliant CMP and without requesting consent from affected GDPR & CCPA users, both fill rate and eCPM will be impacted significantly or no ads will be delivered at all.

**Importance of Vendor Management in Your CMP**

Enabling vendor management within your CMP is essential. This feature allows you to control which advertising partners can access user data, ensuring that only trusted vendors participate in the bidding process. Proper vendor management enhances transparency and trust, leading to higher fill rates and better eCPM.

**Key Regions Where CMP Implementation Is Critical**

Implementing a CMP is particularly important in regions with stringent data protection laws, including:

* **European Union (EU):** Under the GDPR, user consent is mandatory for data processing activities, including targeted advertising.
* **United States (US):** The CCPA requires businesses to obtain user consent before collecting personal information for advertising purposes.

By integrating a CMP with robust vendor management capabilities, you ensure compliance with these regulations, maintain user trust, and optimize your ad monetization strategy.

{% hint style="danger" %}
**Avoid CMPs That Only Offer Cookie Management**

When choosing a Consent Management Platform (CMP), it’s essential to look beyond basic cookie management. Some CMPs focus solely on managing cookies, which is not sufficient for effective advertising monetization. Ensure that your CMP includes **Vendor Management** capabilities to manage and enable demand partners effectively.
{% endhint %}

**To optimize your setup:**

* Request a detailed introduction to Vendor Management from your CMP provider.
* Contact our Account Managers to receive a curated list of the most relevant vendors to enable in your CMP solution.

By focusing on comprehensive Vendor Management, you can maximize ad demand, increase fill rates, and comply with data privacy regulations effectively.

## SDK Initialization

**When should you initialize the SDK?**

To provide a seamless experience and avoid user frustration, it’s essential to initialize the SDK at an appropriate time. This ensures the rewarded video is ready to play when users reach the relevant point in your app or game. Follow these recommendations:

1. **Early Initialization:**\
   Initialize the SDK as early as possible, such as when the user opens your app or game. This proactive approach ensures the SDK is ready well before users reach the video placement.
2. **Contextual Initialization:**\
   If initializing at app launch isn't feasible, do it when the user is nearing the section where the video will be displayed. This minimizes wait times and ensures a smoother experience.

{% hint style="danger" %}
**Avoid Delayed Initialization:**\
Never initialize the SDK only when the video button is already visible to the user. SDK initialization can take a few seconds, and users expect immediate responses. Delays at this stage can lead to frustration and disrupt the overall user experience.
{% endhint %}

## Ad Requests

**When should you make an Ad Request?**

It is a much better user experience to make ad requests before the user interacts with the video play button. Here’s why:

1. **Improved User Experience**\
   Pre-loading ads ensures they are ready to play instantly when the user clicks the button, eliminating waiting times and providing a seamless experience.
2. **Ensure Availability**\
   By making the ad request in advance, you can verify whether an ad is available (a "fill") before even displaying the button to the user. If no ad is available, the button can remain hidden, avoiding any user confusion or dissatisfaction.
3. **Logical Button Display**\
   Build a logic in your app or game to display the play button only if an ad is ready to be shown. For example:
   * Make the ad request in advance (e.g., during app initialization or when the user is approaching the rewarded video placement).
   * Display the button only if an ad is available, ensuring users can always watch a video upon clicking.
   * Check the availability of the ad (whether there is a "fill") when the user clicks on the button. If there is a no fill or the ad expired, re-request an ad.

{% hint style="danger" %}
**Avoid Delays in Ad Loading:**\
When an ad request is initiated upon the button click, the user must wait for the ad to load. Depending on the network speed and server response time, this delay can disrupt the flow of the app or game and frustrate the user.
{% endhint %}

{% hint style="danger" %}
**Avoid Risk of No Fill:**\
There is always a possibility of receiving a "no fill" response from the ad network, meaning no ad is available to show. If this occurs after the user has already clicked the button, they might feel misled or disappointed, as they were expecting to watch an ad and earn a reward. This can lead to a negative perception of the app or game.
{% endhint %}

## Callbacks

**Why should you choose Client-Side Callbacks over Server-to-Server Callbacks?**

For scenarios where speed and user satisfaction are critical—such as rewarding users after a video ad— client-side callbacks are the superior choice.

1. **Immediate User Feedback:**\
   Client-side callbacks provide instant feedback to the user. When a rewarded video ends, the user immediately sees their reward, maintaining engagement and avoiding frustration caused by delays.
2. **No Network Dependency:**\
   Unlike S2S callbacks, client-side callbacks do not rely on external server communications. This eliminates risks associated with server downtime, network instability, or latency.
3. **Enhanced User Experience:**\
   Users expect immediate rewards after completing a task. Delays caused by S2S callbacks may lead to complaints, reduced trust, and a negative impression of the app.
4. **Simpler Implementation:**\
   Client-side callbacks are easier to implement as they do not require complex server infrastructure or robust handling for network issues.

{% hint style="danger" %}
**Avoid Delays in Callbacks:**\
Rewarding users after a video has been watched should be instant. Avoid delays when using server-to-server callbacks and use client-side callbacks instead.
{% endhint %}


# Callbacks & Testing


# Callbacks


# Offerwall Callbacks

{% hint style="info" %}
For Web Offerwalls and SDKs, you have to manually manage your users' currencies on your own servers.
{% endhint %}

## Adding your Callback URL

You can configure a conversion callback URL in our publisher dashboard.\
To do so, navigate to **Placements / Apps**, edit your placement and set the **Callback URL** to your server's postback URL:

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FlV8UUqk1RsuS0xBdgOYE%2F31.jpg?alt=media&amp;token=dd76ce8a-d692-4826-8cf5-550f2f52e912" alt=""><figcaption></figcaption></figure>

If this is the callback URL you set for your offerwall placement:

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

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

```
https://your-server.com/callback?network=ayetstudios&amount=360&external_identifier=username&payout_usd=0.36
```

{% hint style="warning" %}
This assumes you set external\_identifier to **username** in the original Offerwall URL for that user, the currency conversion rate in your placement was 1000 per $1 and the user completed an offer with a $0.36 payout.
{% endhint %}

{% hint style="danger" %}
**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.
{% endhint %}

## Enabling & Processing Reversal Callbacks

You can automatically process Reversals made to your account and placements by enabling **Reversal Callbacks.**

Simply navigate to **Placements / Apps**, edit your placement and check the box **Enable Reversal Callbacks**.

![](https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2Fg4eUjkWYND50zR0N8Bld%2FEnableReversalCallbacks.png?alt=media\&token=a730ba2d-e82c-46cf-b66c-a231fc6676ee)

Once enabled we will send reversal callbacks directly to the callback URL you set up for your placements.

The unique **transaction ID** we send for each conversion will carry an **"r-"** prepended to the ID for each reversal callback.

{% hint style="info" %}
For chargebacks the original transaction ID of a conversion is prepended with "**r-**".

**Example Transaction IDs:**

381f99333613b41392b15183d69a7240308e8461 -> Regular Callback

**r-**&#x33;81f99333613b41392b15183d69a7240308e8461 -> Reversal Callback
{% endhint %}

Below is a list of all relevant parameters to use in order to distinguish reversal callbacks from regular callbacks.

<table><thead><tr><th width="282">Variable</th><th width="175">Type</th><th>Description</th></tr></thead><tbody><tr><td>{transaction_id}</td><td>string</td><td>Unique transaction ID - use for duplicate checks. For chargebacks the original tid is prepended with "<strong>r-</strong>".</td></tr><tr><td>{is_chargeback}</td><td>int</td><td>Either 0 or 1. Indicator if the callback is a conversion (0) or a chargeback (1).</td></tr><tr><td>{chargeback_reason}</td><td>string</td><td>Reason why chargeback created. Only available if is_chargeback set to 1.</td></tr><tr><td>{chargeback_date}</td><td>string</td><td>Date of chargeback creation. Only available if is_chargeback set to 1.</td></tr></tbody></table>

## **Available Macros for Callback URLs**

{% hint style="info" %}
**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.
{% endhint %}

{% hint style="danger" %}
**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.
{% endhint %}

<table><thead><tr><th width="305.3333333333333">Variable</th><th width="172">Type</th><th>Description</th></tr></thead><tbody><tr><td>{transaction_id}</td><td>string</td><td>Unique transaction ID - use for duplicate checks. For chargebacks the original tid is prepended with "<strong>r-</strong>".</td></tr><tr><td>{payout_usd}</td><td>float</td><td>The actual conversion payout in USD. If chargeback value is negative.</td></tr><tr><td>{currency_amount}</td><td>float</td><td>The amount of currency the user earned (taken from your offerwall currency configuration). If chargeback value is negative.</td></tr><tr><td>{external_identifier}</td><td>string</td><td>The user identifier (EXTERNAL IDENTIFIER) originally passed in the web offerwall link.</td></tr><tr><td>{user_id}</td><td>integer</td><td>Our internal ID for this offerwall user</td></tr><tr><td>{placement_identifier}</td><td>string</td><td>The placement_identifier for which the conversion occured</td></tr><tr><td>{adslot_id}</td><td>int</td><td>The ID of the adslot for which the conversion occured</td></tr><tr><td>{sub_id}</td><td>string</td><td>The ID of the Placement for which the conversion occured<br>[PL-1...n]</td></tr><tr><td>{ip}</td><td>string</td><td>Converting device's IP address if known, 0.0.0.0 otherwise</td></tr><tr><td>{offer_id}</td><td>int</td><td>Offer ID of the converting offer</td></tr><tr><td>{offer_name}</td><td>string</td><td>Name / title of the converting offer</td></tr><tr><td>{store_id}</td><td>string</td><td>Store identifier of the converting app, as in the <code>store_id</code> field of the offer APIs: the Android application ID (e.g. <code>com.mycashery</code>) or the numeric App Store ID on iOS (e.g. <code>6740536249</code>). Empty for web offers and surveys.</td></tr><tr><td>{device_uuid}</td><td>string</td><td>ayeT-Studios internal device identificator</td></tr><tr><td>{device_make}</td><td>string</td><td>Device manufacturer</td></tr><tr><td>{device_model}</td><td>string</td><td>Device model</td></tr><tr><td>{advertising_id}</td><td>string</td><td>Device advertising id (GAID/IDFA) if known, otherwise empty</td></tr><tr><td>{sha1_android_id}</td><td>string</td><td>Device sha1 hashed android id if known, otherwise empty</td></tr><tr><td>{sha1_imei}</td><td>string</td><td>Device sha1 hashed IMEI, if known, otherwise empty</td></tr><tr><td>{is_chargeback}</td><td>int</td><td>Either 0 or 1. Indicator if the callback is a conversion (0) or a chargeback (1).</td></tr><tr><td>{chargeback_reason}</td><td>string</td><td>Reason why chargeback created. Only available if is_chargeback set to 1.</td></tr><tr><td>{chargeback_date}</td><td>string</td><td>Date of chargeback creation. Only available if is_chargeback set to 1.</td></tr><tr><td>{event_name}</td><td>string</td><td>For CPA &#x26; CPE campaigns, event name of the conversion</td></tr><tr><td>{event_value}</td><td>float</td><td>The value associated with the event (non-billable - refer to "payout_usd" and "currency_amount" for publisher &#x26; user payout).</td></tr><tr><td>{task_name}</td><td>string</td><td>Only available for CPE campaigns, shows individual task name for that conversion (for example "Complete Level 5")</td></tr><tr><td>{task_uuid}</td><td>string</td><td>Only available for CPE campaigns, shows unique id for the task and campaign</td></tr><tr><td>{currency_identifier}</td><td>string</td><td>Shows virtual currency name as set in adslot.</td></tr><tr><td>{currency_conversion_rate}</td><td>decimal</td><td>Shows currency conversion rate used to calculate user currency for the given conversion.</td></tr><tr><td>{click_date}</td><td>string</td><td>A string representing the date and time (in 'Y-m-d H:i:s' format) at which the user clicked on the offer.</td></tr><tr><td>{callback_type}</td><td>string</td><td>Retruns the type of callbcak. Possible values are <code>'conversion', 'chargeback', 'installation', 'optional', 'iap', 'iaa', 'survey'</code></td></tr><tr><td>{callback_ts}</td><td>integer</td><td>Timestamp at which the user triggered the event/callback.</td></tr><tr><td>{custom_1}</td><td>string</td><td>Custom parameter to pass variables to the conversion callbacks.</td></tr><tr><td>{custom_2}</td><td>string</td><td>Custom parameter to pass variables to the conversion callbacks.</td></tr><tr><td>{custom_3}</td><td>string</td><td>Custom parameter to pass variables to the conversion callbacks.</td></tr><tr><td>{custom_4}</td><td>string</td><td>Custom parameter to pass variables to the conversion callbacks.</td></tr><tr><td>{custom_5}</td><td>string</td><td>Custom parameter to pass variables to the conversion callbacks.</td></tr></tbody></table>


# Surveywall Callbacks

{% hint style="info" %}
For Web Surveywalls, you have to manually manage your users' currencies on your own servers.
{% endhint %}

## Adding your Callback URL

You can configure a conversion callback URL in our publisher dashboard.\
To do so, navigate to **Placements / Apps**, edit your placement and set the **Callback URL** to your server's postback URL:

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FlV8UUqk1RsuS0xBdgOYE%2F31.jpg?alt=media&amp;token=dd76ce8a-d692-4826-8cf5-550f2f52e912" alt=""><figcaption></figcaption></figure>

If this is the callback URL you set for your offerwall placement:

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

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

```
https://your-server.com/callback?network=ayetstudios&amount=360&external_identifier=username&payout_usd=0.36
```

{% hint style="warning" %}
This assumes you set external\_identifier to **username** in the original Offerwall URL for that user, the currency conversion rate in your placement was 1000 per $1 and the user completed an offer with a $0.36 payout.
{% endhint %}

{% hint style="danger" %}
**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.
{% endhint %}

## Enabling & Processing Reversal Callbacks

You can automatically process Reversals made to your account and placements by enabling **Reversal Callbacks.**

Simply navigate to **Placements / Apps**, edit your placement and check the box **Enable Reversal Callbacks**.

![](https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2Fg4eUjkWYND50zR0N8Bld%2FEnableReversalCallbacks.png?alt=media\&token=a730ba2d-e82c-46cf-b66c-a231fc6676ee)

Once enabled we will send reversal callbacks directly to the callback URL you set up for your placements.

The unique **transaction ID** we send for each conversion will carry an **"r-"** prepended to the ID for each reversal callback.

{% hint style="info" %}
For chargebacks the original transaction ID of a conversion is prepended with "**r-**".

**Example Transaction IDs:**

381f99333613b41392b15183d69a7240308e8461 -> Regular Callback

**r-**&#x33;81f99333613b41392b15183d69a7240308e8461 -> Reversal Callback
{% endhint %}

Below is a list of all relevant parameters to use in order to distinguish reversal callbacks from regular callbacks.

<table><thead><tr><th width="310">Variable</th><th width="145">Type</th><th>Description</th></tr></thead><tbody><tr><td>{transaction_id}</td><td>string</td><td>Unique transaction ID - use for duplicate checks. For chargebacks the original tid is prepended with "<strong>r-</strong>".</td></tr><tr><td>{is_chargeback}</td><td>int</td><td>Either 0 or 1. Indicator if the callback is a conversion (0) or a chargeback (1).</td></tr><tr><td>{chargeback_reason}</td><td>string</td><td>Reason why chargeback created. Only available if is_chargeback set to 1.</td></tr><tr><td>{chargeback_date}</td><td>string</td><td>Date of chargeback creation. Only available if is_chargeback set to 1.</td></tr></tbody></table>

## **Available Macros for Callback URLs**

{% hint style="info" %}
**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.
{% endhint %}

{% hint style="danger" %}
**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.
{% endhint %}

<table><thead><tr><th width="318.3333333333333">Variable</th><th width="180">Type</th><th>Description</th></tr></thead><tbody><tr><td>{transaction_id}</td><td>string</td><td>Unique transaction ID - use for duplicate checks. For chargebacks the original tid is prepended with "<strong>r-</strong>".</td></tr><tr><td>{payout_usd}</td><td>float</td><td>The actual conversion payout in USD. If chargeback value is negative.</td></tr><tr><td>{currency_amount}</td><td>float</td><td>The amount of currency the user earned (taken from your offerwall currency configuration). If chargeback value is negative.</td></tr><tr><td>{is_screenout}</td><td>integer</td><td>Either 1 or 0. Indicates whether the conversion is a screenout reward (1) or a regular conversion (0).</td></tr><tr><td>{is_survey}</td><td>integer</td><td>Either 1 or 0. Always 1 for surveywall related conversions. 0 for offer conversions (e.g. when using the offerwall).</td></tr><tr><td>{external_identifier}</td><td>string</td><td>The user identifier (EXTERNAL IDENTIFIER) originally passed in the web offerwall link.</td></tr><tr><td>{user_id}</td><td>integer</td><td>Our internal ID for this offerwall user</td></tr><tr><td>{placement_identifier}</td><td>string</td><td>The placement_identifier for which the conversion occured</td></tr><tr><td>{survey_id}</td><td>unsigned int64</td><td>Survey ID of the completed survey</td></tr><tr><td>{loi}</td><td>float</td><td>Length of interview - the time it took the user to complete the survey in minutes</td></tr><tr><td>{adslot_id}</td><td>int</td><td>The ID of the adslot for which the conversion occured</td></tr><tr><td>{sub_id}</td><td>string</td><td>The ID of the Placement for which the conversion occured<br>[PL-1...n]</td></tr><tr><td>{ip}</td><td>string</td><td>Converting device's IP address if known, 0.0.0.0 otherwise</td></tr><tr><td>{offer_id}</td><td>int</td><td>Offer ID of the converting offer</td></tr><tr><td>{offer_name}</td><td>string</td><td>Name / title of the converting offer</td></tr><tr><td>{device_uuid}</td><td>string</td><td>ayeT-Studios internal device identificator</td></tr><tr><td>{device_make}</td><td>string</td><td>Device manufacturer</td></tr><tr><td>{device_model}</td><td>string</td><td>Device model</td></tr><tr><td>{advertising_id}</td><td>string</td><td>Device advertising id (GAID/IDFA) if known, otherwise empty</td></tr><tr><td>{sha1_android_id}</td><td>string</td><td>Device sha1 hashed android id if known, otherwise empty</td></tr><tr><td>{sha1_imei}</td><td>string</td><td>Device sha1 hashed IMEI, if known, otherwise empty</td></tr><tr><td>{is_chargeback}</td><td>int</td><td>Either 0 or 1. Indicator if the callback is a conversion (0) or a chargeback (1).</td></tr><tr><td>{chargeback_reason}</td><td>string</td><td>Reason why chargeback created. Only available if is_chargeback set to 1.</td></tr><tr><td>{chargeback_date}</td><td>string</td><td>Date of chargeback creation. Only available if is_chargeback set to 1.</td></tr><tr><td>{currency_identifier}</td><td>string</td><td>Shows virtual currency name as set in adslot.</td></tr><tr><td>{currency_conversion_rate}</td><td>decimal</td><td>Shows currency conversion rate used to calculate user currency for the given conversion.</td></tr><tr><td>{custom_1}</td><td>string</td><td>Custom parameter to pass variables to the conversion callbacks.</td></tr><tr><td>{custom_2}</td><td>string</td><td>Custom parameter to pass variables to the conversion callbacks.</td></tr><tr><td>{custom_3}</td><td>string</td><td>Custom parameter to pass variables to the conversion callbacks.</td></tr><tr><td>{custom_4}</td><td>string</td><td>Custom parameter to pass variables to the conversion callbacks.</td></tr><tr><td>{custom_5}</td><td>string</td><td>Custom parameter to pass variables to the conversion callbacks.</td></tr></tbody></table>


# 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:

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FBLJMIdNhRF0RwZatAA97%2F32.jpg?alt=media&amp;token=00d92f7a-b723-4f64-8e9d-4ee51e0e95a0" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FUTbJciYZr7dourOl0fCJ%2F33.jpg?alt=media&amp;token=017a26f1-8633-4f5d-b210-56b41eefa8f2" alt=""><figcaption></figcaption></figure>

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
```

{% hint style="success" %}
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**.
{% endhint %}

{% hint style="info" %}
**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.
{% endhint %}

{% hint style="danger" %}
**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.
{% endhint %}

## **Available Macros for Callback URLs:**

{% hint style="info" %}
**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.
{% endhint %}

{% hint style="danger" %}
**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.
{% endhint %}

<table><thead><tr><th width="202.33333333333331">Variable</th><th width="150.36745987825125">Type</th><th>Description</th></tr></thead><tbody><tr><td>{transaction_id}</td><td>string</td><td>Unique transaction id - use for duplicate checks.</td></tr><tr><td>{payout_usd}</td><td>float</td><td>The actual conversion payout in USD.</td></tr><tr><td>{currency_amount}</td><td>float</td><td>The amount of currency the user earned (taken from your offerwall currency configuration).</td></tr><tr><td>{external_identifier}</td><td>string</td><td>The user identifier (EXTERNAL IDENTIFIER) originally passed in the web offerwall link</td></tr><tr><td>{user_id}</td><td>integer</td><td>Our internal id for this offerwall user</td></tr><tr><td>{placement_identifier}</td><td>string</td><td>The placement_identifier for which the conversion occured</td></tr><tr><td>{adslot_id}</td><td>int</td><td>The ID of the adslot for which the conversion occured</td></tr><tr><td>{sub_id}</td><td>string</td><td>The ID of the Placement for which the conversion occured<br>[PL-1...n]</td></tr><tr><td>{ip}</td><td>string</td><td>Converting device's IP address if known, 0.0.0.0 otherwise</td></tr><tr><td>{offer_id}</td><td>int</td><td>Offer ID of the converting offer</td></tr><tr><td>{offer_name}</td><td>string</td><td>Name / title of the converting offer</td></tr><tr><td>{device_uuid}</td><td>string</td><td>ayeT-Studios internal device identificator</td></tr><tr><td>{device_make}</td><td>string</td><td>Device manufacturer</td></tr><tr><td>{device_model}</td><td>string</td><td>Device model</td></tr><tr><td>{advertising_id}</td><td>string</td><td>Device advertising id (GAID/IDFA) if known, otherwise empty</td></tr><tr><td>{sha1_android_id}</td><td>string</td><td>Device sha1 hashed android id if known, otherwise empty</td></tr><tr><td>{sha1_imei}</td><td>string</td><td>Device sha1 hashed imei if known, otherwise empty</td></tr><tr><td>{currency_identifier}</td><td>string</td><td>Shows virtual currency name as set in adslot.</td></tr><tr><td>{currency_conversion_rate}</td><td>decimal</td><td>Shows currency conversion rate used to calculate user currency for the given conversion.</td></tr><tr><td>{custom_1}</td><td>string</td><td>Custom parameter to pass variables to the conversion callbacks</td></tr><tr><td>{custom_2}</td><td>string</td><td>Custom parameter to pass variables to the conversion callbacks</td></tr><tr><td>{custom_3}</td><td>string</td><td>Custom parameter to pass variables to the conversion callbacks</td></tr><tr><td>{custom_4}</td><td>string</td><td>Custom parameter to pass variables to the conversion callbacks</td></tr><tr><td>{custom_5}</td><td>string</td><td>Custom parameter to pass variables to the conversion callbacks</td></tr></tbody></table>


# IP Whitelist

If you want to restrict postbacks to our callback server IPs, please whitelist the following IPs and check back regularly for possible changes:

```
51.79.101.241
158.69.185.134
158.69.185.154  
35.165.166.40
35.166.159.131
52.40.3.140
```

**Last IP List Update: 2025-01-30**


# Callback Verification


# HMAC Security Hash (optional)

## HMAC Security Hash

Our server will always add a custom header, **X-Ayetstudios-Security-Hash**, containing a SHA256 HMAC hash of the request parameters and your publisher api key.\
Your API key can be found in your dashboard at ayetstudios.com under settings.

To verify the hash, perform the following steps:

1. Get all request parameters
2. Order the request parameters alphabetically
3. Build and compare the HMAC hash using the ordered request parameter string and your API key

PHP example:

```php
// 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
}
```

Javascript example:

```typescript
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
}
```

Python example:

```python
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
    pass
```

## Example HMAC calculation

Assuming the below is the callback we sent to you:

<pre><code><strong>https://your-site.com/postback/?transaction_id=8ee08f32ae611231b0a49d1bd66e9bf193132561&#x26;amount=0.10&#x26;payout=1.50&#x26;user_id=testuser123456&#x26;click_id=1234abcd5678021&#x26;offer_name=TEST+OFFER 
</strong></code></pre>

**1) Get all request parameters**

Strip away your domain and get the request parameters.

```
transaction_id=8ee08f32ae611231b0a49d1bd66e9bf193132561
amount=0.10
payout=1.50
user_id=testuser123456
click_id=1234abcd5678021
offer_name=TEST OFFER
```

**2) Sort the parameters alphabetically and URL-encode the values**

This is crucial because special characters (like spaces) must be encoded (e.g. a space should become +) in order to match the original string that was hashed.

```
amount=0.10&click_id=1234abcd5678021&offer_name=TEST+OFFER&payout=1.50&transaction_id=8ee08f32ae611231b0a49d1bd66e9bf193132561&user_id=testuser123456
```

Your API Key from the ayeT dashboard:

```
9f2228fea0d8e7ce10b2ac36053db14c
```

{% hint style="danger" %}
I**mportant:** Make sure you URL-encode every parameter value. This is crucial because special characters (like spaces) must be encoded (e.g. a space should become +) in order to match the original string that was hashed.
{% endhint %}

**3) Build and compare the HMAC hash using the ordered request parameter string and your API key**

Hashing the **ordered request parameter string** with your Secret Key (API Key) with SHA256, you will get the following HASH Key:

```
62a32725866780ada1dec3d62232645f2801e05a91df7b0202e9b780f804f04b
```

Compare the HASH Key you calculated to the **X-Ayetstudios-Security-Hash** our server will always add as a custom header for each conversion.


# Failed Redirects


# Failed Redirect Destination

Control the user flow when a redirect is failing.

During a redirect through tracking links, a few things can happen such as:

* low user quality
* proxy or VPN use
* wrong GEO targeting
* wrong device or browser version

This prevents users from successful redirect to the final destination - the Play Store, the App Store or the intended Landing Page.

## Setting your custom Redirect Destination

You can configure an **https redirect target** for failed offer redirects in our publisher dashboard.

This will override the standard "Error Page" (we call it "Share Offer" page) displayed in case of redirect errors.

To do so, navigate to **Placements / Apps**, edit your placement and set the **Failed Redirect Destination**:

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FYidrNJJa8dFuBu1yW6tH%2Ffailed_redirect_destination.png?alt=media&amp;token=f8675b0d-7cc6-4b25-a8f0-c23ae8ff24fe" alt=""><figcaption></figcaption></figure>

A typical redirect destination may look like this:

```
https://your-redirect-destination.com/redirect?user_id={external_identifier}&offer_id={offer_id}&reason_code={reason_code}&reason_message={reason_message}
```

{% hint style="success" %}
On your own redirect destiantion (landing page), you would be able to show a tailored:

* error message to users
* simply redirect the user back into your website or app
* or anything similar of your choice
  {% endhint %}

## Available Macros

Below is a list of available macros to use in your redirect URL to better understand why a certain click is failing to get redirected. That way you can improve your integration down the road.

| Variable               | Type   | Description                                                                                                                                        |
| ---------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| {external\_identifier} | string | The user identifier (EXTERNAL IDENTIFIER) originally passed in the tracking link.                                                                  |
| {placement\_id}        | string | The ID of the placement for which the failed redirect happened                                                                                     |
| {offer\_id}            | int    | ID of the offer for which the redirect failed                                                                                                      |
| {reason\_code}         | int    | Code indicating the type of failed redirect so you can group different reasons and their frequency - e.g. 310                                      |
| {reason\_message}      | string | A more detailed message of the reason for the redirect failure - e.g. "We are sorry, but the offer you were looking for is not available for you!" |


# Testing


# Callback Tester

With the Callback Tester you can verify that you receive back all relevant information you need in order to pay your users and if the added macros are populated correctly.

## Why you should utilize the Callback Tester

The Callback Tester was built to help you to verify that you:

1. added all the macros to your Callback URL that you need to receive back
2. that those macros are populated by ayeT-Studios' servers as expected

## Check Available Macros

You can check all availabe macros that can be added to your callback URL here:

{% content-ref url="/pages/4uQiMxtgnAayAHR8ZeXt" %}
[Offerwall Callbacks](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing/callbacks/offerwall-callbacks)
{% endcontent-ref %}

{% content-ref url="/pages/wL6DBPFVC2pBDf7rb7fT" %}
[Rewarded Video Callbacks](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing/callbacks/rewarded-video-callbacks)
{% endcontent-ref %}

## Send Test Postback

Click on <mark style="color:red;background-color:red;">Edit Placement</mark> in order to open the detail modal. Here you can change your postback URL and i.e. add additional macros.

In addition you can send a test postback to your servers.

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FMUTPVAMkEsNeHQHdOzy8%2F34.jpg?alt=media&amp;token=a1db86dc-d2de-416a-bef6-8959864972aa" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The example shows that the macros

* {external\_identifier}
* {payout\_usd}
* {currency\_amount}
* {placement\_identifer}

were added to your callback URL.
{% endhint %}

When you click <mark style="color:red;background-color:red;">Send Test Postback</mark>, you will a list of fields and the information with which we will populate the macros you added to your callback URL.

For a few of those fields you can input values yourself. A few other fields are locked and only the information displayed can be passed.

![](https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2F19c3WAPDgV334MnrqKHh%2F35.jpg?alt=media\&token=c062cd31-6c89-4e04-a1bb-4a1db472faae)

Clicking on <mark style="color:red;background-color:red;">Send Postback</mark> will send the test postback.

## Check Test Postback

Clicking on <mark style="color:red;background-color:red;">Check Postback Status</mark> afterwards, will lead you to Reports / Conversions, where the callback that just got sent will be displayed.

![](https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FtcRdYqSh8MwMM2Ojylfd%2F36.jpg?alt=media\&token=1df39e94-0421-4bfd-b2e0-599149ed17b0)

If you click on <mark style="color:red;background-color:red;">Details</mark>, you will be able to see the entire payload we sent and your Callback URL with populated macros.

![](https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FEOZcjVuyM8NOiVB3jt2x%2F37.jpg?alt=media\&token=900697c8-5dec-4767-b14a-3548ad8a7d3b)

{% hint style="info" %}
In this specific example the ayeT-Studios servers populated only the macros that you previously added to your callback URL:

* {external\_identifier} = my-test-user-567
* {payout\_usd} = 0
* {currency\_amount} = 320
* {placement\_identifer} = deb88ed8abe52ab1f67a97068d88d9db
  {% endhint %}


# Sandbox Identifier

Sandbox Identifiers can be used to test the user and callback flow from initial entering the offerwall until successfully processing a callback.

## Why you should utilize Sandbox Identifiers

A Sandbox Identifier is basically an external identifier (a User ID) that you define. Appending or passing this identifier to the offerwall will trigger the offerwall to run in sandbox mode.

Sandbox Identifiers will help you to test the offerwall across multiple devices and in different GEOs for certain predefined "Identifiers".

{% hint style="info" %}
Using Sandbox Identifiers for testing helps you to avoid triggering any of the ayeT-Studios Fraud Prevention Checks that would block your device from accessing the offerwall.
{% endhint %}

## Defining Sandbox Identifiers

Click on <mark style="color:red;background-color:red;">Edit Placement</mark> in the ayeT-Studios Publisher Dashboard and enter a identifier of your choice for the <mark style="color:red;background-color:red;">Sandbox Identifiers</mark> feature.

In the example below, the sandbox identifier is set to <mark style="color:blue;background-color:blue;">testuser123</mark>.

You can enter several identifiers if needed to make it easer to test with different devices and in different GEOs across your team.

![](https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FSBzCzKXE5mFihhApIbzz%2F38.jpg?alt=media\&token=3f8fb954-dc95-4373-ac38-300bf357d4fb)

## Triggering a Test Callback

Now that the sandbox identifier is set, you have to pass the sandbox identifier to your Offerwall AdSlot that you want to test.

{% hint style="info" %}
**Note:** If you passed the sandbox identifier correctly, your offerwall will show three test offers (see screenshot below).
{% endhint %}

In the example below, the <mark style="color:blue;background-color:blue;">testuser123</mark> was passed to a Web Offerwall AdSlot. The offerwall now shows three test offers.

![](https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2Fo9y4sHDPJ1Nyy4FSC2Tc%2F39.jpg?alt=media\&token=d2dc4520-4139-4011-82cc-bd81b81ad55d)

Clicking on one of the test offers will show a detail modal with more instructions.

Clicking on the Earn Button will trigger a test callback.

![](https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FpdBMZQj6VZOf6WJEjGFN%2F40.jpg?alt=media\&token=8e30c086-b71f-4514-8dc1-58c410fa8b5a)

Once you clicked on an offer, you can see the click ID and additional conversion details. In this case, a test callback with 200 in virtual currency and $0.2 in USD payout was triggered.

You can also see the transaction ID and a describtion where to find more details for the callback in the ayeT-Studios dashboard.

![](https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FTAtoR3YI3wF6AalLHzn1%2F41.jpg?alt=media\&token=786e2d50-e889-4680-961c-65b5f1045263)

## Checking the Test Callback

If you navigate to <mark style="color:red;background-color:red;">Reports / Conversions</mark> in the ayeT-Studios dashboard, you are able to find the test postback with your sandbox identifier that you just triggered.

{% hint style="info" %}
**Note:** Sandbox offer conversions will generate regular callbacks with fake payouts and user currency.

<mark style="color:red;">`&is_sandbox=1`</mark> is appended to every callback url to easily allow discarding test conversions.
{% endhint %}

If you click on <mark style="color:red;background-color:red;">Details</mark> for the test callback, you are able to see all details for the test callback.

![](https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2F73b6xmqGejeabLKPMnwA%2F42.jpg?alt=media\&token=23f94437-9a2b-4b30-85d2-9901f4d60f44)

The Callback Details show a list of available macros and information as well as the callback URL that was triggered, including the <mark style="color:red;background-color:red;">is\_sandbox=1</mark> macro to identifiy the callback as a test.

![](https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FjIU4dkBrvxPluxRsQiEV%2F43.jpg?alt=media\&token=474f9079-1a9a-4b2e-9593-6bcc302d33ee)

{% hint style="info" %}
If your callback URL is missing information, please navigate to placements and edit your callback URL by adding additional callback macros.
{% endhint %}

To see a list of available callback macros, please go to the following section:

{% content-ref url="/pages/4uQiMxtgnAayAHR8ZeXt" %}
[Offerwall Callbacks](https://docs.ayetstudios.com/v/product-docs/callbacks-and-testing/callbacks/offerwall-callbacks)
{% endcontent-ref %}


# Go-live checklist


# Offerwall Checklist

This checklist is supposed to help you to take care of all important and relevant settings before going live with your Offerwall.

Please go through the list to see if you can check each box. If you can check each box, you are most likely good to go live.

## Most Important

* [ ] Your Placement & AdSlot combination is matching your Technical Integration (see technical integration docs)
* [ ] Are you using the correct AdSlot ID?
* [ ] Are you using the correct AdSlot Name?
* [ ] Did you adjust the correct currency conversion rate for your AdSlot to your needs?
* [ ] Did you add a callback URL to your placement?
* [ ] Did you add all necessary macros to your callback URL in order to pay your users?
* [ ] Are you processing callbacks correctly (responding with http200 to the ayeT-Studios servers)?

## **Android SDK Specific**

* [ ] Is your package name for the placement in the ayeT-Studios dashboard matching the package name for your release build?
* [ ] Are you using the correct AYET\_AP&#x50;*\_*&#x4B;EY?
* [ ] Are you using the correct ADSLOT\_NAME?
* [ ] Did you add Proguard Rules?

## **Optional**

* [ ] Did you enable reversal callbacks?
* [ ] Did you add macros to your callback URL for reversal callbacks?
* [ ] Did you create an Offerwall Design matching your Website's or App's look and feel?
* [ ] Did you upload your customized virtual currency icon?
* [ ] Did you set decimals for the virtual currency displayed on the offerwall buttons?


# Surveywall Checklist

This checklist is supposed to help you to take care of all important and relevant settings before going live with your Surveywall.

Please go through the list to see if you can check each box. If you can check each box, you are most likely good to go live.

## Most Important

* [ ] Your Placement & AdSlot combination is matching your Technical Integration (see technical integration docs)
* [ ] Are you using the correct AdSlot ID?
* [ ] Are you using the correct AdSlot Name?
* [ ] Did you adjust the currency conversion rate of your AdSlot to your needs?
* [ ] Did you add a callback URL to your placement?
* [ ] Did you add all necessary macros to your callback URL in order to pay your users?
* [ ] Are you processing callbacks correctly (responding with http200 to the ayeT-Studios servers)?

## **Optional**

* [ ] Did you enable reversal callbacks?
* [ ] Did you add macros to your callback URL for reversal callbacks?
* [ ] Did you create a Surveywall Design matching your Website's or App's look and feel?
* [ ] Did you upload your customized virtual currency icon?
* [ ] Did you set decimals for the virtual currency displayed on the surveywall buttons?


# Rewarded Video Checklist

This checklist is supposed to help you to take care of all important and relevant settings before going live with your rewarded video placement.

Please go through the list to see if you can check each box. If you can check each box, you are most likely good to go live.

## Most Important

* [ ] Your Placement & AdSlot combination is matching your Technical Integration (see technical integration docs)
* [ ] Are you passing an externalIdentifier to the Rewarded Video SDK?
* [ ] Are you using the correct Placement ID?
* [ ] Are you using the correct AdSlot Name to make an ad request?
* [ ] Did you add the ads.txt files to your domain?
* [ ] Did you integrate a CMP?
* [ ] Do you initialize the CMP in all relevant places of your website to pass a user consent to the Rewarded Video SDK?
* [ ] Did you talk to your account manager to finalize the Demand Setup in order to get real ads before you go live?
* [ ] Are callbacks working correctly? Either Client-Side Callbacks or S2S Callbacks. For S2S Callbacks, please also check the "Optional" section.
* [ ] How do you handle "No Fills"? "No Fills" are something entirely normal and the mean that an ad is currently not available for this user, because no advertiser wanted to buy the specific user impression. Integrate Rewarded Video in a way for which a "No Fill" doesn't disturb the user flow.
* [ ] Make sure to not pay users if they didn't watch the videos until the end, otherwise they will exploit the setup to earn coins faster without you getting paid by the advertisers.

## Optional

* [ ] If you want to payout virtual currency, relying on ayeT's callbacks, did you set the amount of currency paid out to a user per completed view in your AdSlot Settings?
* [ ] If you want to use S2S callbacks, did you enabled "Send S2S Callbacks for Video Views" in your AdSlot settings?
* [ ] Did you add a callback URL to your placement?
* [ ] Did you add all necessary macros to your callback URL in order to pay your users?
* [ ] Are you processing callbacks correctly (responding with http200 to the ayeT-Studios servers)?


# Currency management

Allows publishers to update Currency Conversion Rate, for a specific adslot.

## Introduction

With the Currency Conversion Rate publishers can adjust the exchange rate used to calculate payouts to users.\
You can define the amount of virtual currency paid out to users for each USD you earn.

> All transactions on the ayeT-Studios are handled and operated in USD.

## Updating the Currency Conversion Rate

Go into "Edit AdSlot" and edit Currency Conversion Rate ($1 = X virtual currency).\
Dont forget to hit save.

<figure><img src="https://4086115684-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQYkbOrUvRXzrXgEDF9qs%2Fuploads%2FUkQaTn26ybw1g0BoEm8Q%2F2026-05-12_18-19-edit-currency-rate.png?alt=media&amp;token=6dbca618-0d8e-4412-a3c2-6f197684c48c" alt=""><figcaption></figcaption></figure>


# Reporting APIs


# Publisher Reporting API

Our Publisher Reporting API allows publishers with and without adserver functionality to retrieve detailed statistics on their placement & adslot performance.

## Technical Documentation: Publisher Reporting API

Retrieves all statistics for the account for the given date range and filtered by optional parameters. The returned data includes the impressions, clicks, conversions, revenue etc. statistics for the specified date range for each day grouped by country. If optional parameters (placements, adslots, etc.) are set, only metrics matching those parameters will be returned.

{% hint style="danger" %}
**Attention:** Requests to the reporting module are limited to *20 calls per hour*.
{% endhint %}

Follow the link to learn more about utilizing the Publisher Reporting API.

{% content-ref url="/pages/1M6A2DQ82YJTMQpj9FUT" %}
[Publisher API Reference](https://docs.ayetstudios.com/v/product-docs/publisher-api-reference)
{% endcontent-ref %}


# Advertiser Reporting API

Our Advertiser Reporting API allows advertisers to retrieve detailed statistics on their pending, active and historic campaigns including impressions, clicks and conversions.

## Technical Documentation: Advertiser Reporting API

Retrieves all statistics for the account for the given date range and filtered for an optional identifier. The returned data includes the number of currently running and active (pending, running, review) campaigns as well as impressions, clicks and transaction statistics for the specified date range. If identifier is set, only campaigns matching "identifier" are inspected.

Follow the link to learn more about utilizing the Advertiser Reporting API.

{% content-ref url="/pages/JIFjAwVThVYM5xkRirWN" %}
[Advertiser API Reference](https://docs.ayetstudios.com/v/product-docs/advertiser-api-reference)
{% endcontent-ref %}


# Publisher API Reference

For publishers integrating the offerwall, the surveywall or rewarded video: the endpoint reference for the ayeT-Studios Publisher API, together with the setup, callback and changelog pages that go with it.

{% hint style="danger" %}
**These pages call the production API.** Each endpoint page carries a request panel that sends your request straight to the live ayeT-Studios API from your browser. There is no sandbox and no simulation layer: a request you send from these pages is a real request against your real account.

Use your own API key, taken from your dashboard. We never supply shared or test keys, and you should not paste in a key that belongs to someone else.

Not every endpoint only reads data:

* Setting a VAST tag eCPM writes to your account. The endpoint that sets VAST tag eCPMs really updates the eCPMs on your live rewarded video tags, and takes effect on serving.

Read what the request panel will send before you send it.
{% endhint %}

## Start here

* [Introduction](https://docs.ayetstudios.com/v/product-docs/publisher-api-reference/introduction) — how the publisher APIs fit together
* [Obtain API Key, Create Placement & Adslot / Setup](https://docs.ayetstudios.com/v/product-docs/publisher-api-reference/obtain-api-key-create-placement-and-adslot-setup) — getting a key and setting up a placement and adslot
* [Latest Changes](https://docs.ayetstudios.com/v/product-docs/publisher-api-reference/latest-changes) — what changed in the API, most recent first

## Callbacks and tracking

* [Conversion Callbacks](https://docs.ayetstudios.com/v/product-docs/publisher-api-reference/conversion-callbacks)
* [Optional Callbacks](https://docs.ayetstudios.com/v/product-docs/publisher-api-reference/optional-callbacks)
* [IP Whitelisting](https://docs.ayetstudios.com/v/product-docs/publisher-api-reference/ip-whitelisting)
* [API Impression Tracking](https://docs.ayetstudios.com/v/product-docs/publisher-api-reference/api-impression-tracking)

## The specification

* [OpenAPI specification (YAML)](https://www.ayetstudios.com/openapi/publisher-api.yaml)
* [HTML API reference](https://www.ayetstudios.com/openapi/publisher-doc)


# Latest Changes

2026-11-06: v1.26.0 - Added the `{store_id}` macro to conversion and optional callbacks: the store identifier of the converting app, the same value as the `store_id` field of the offer APIs (Android application ID, or the numeric App Store ID on iOS; empty for web offers and surveys).

2026-10-07: v1.23.0 - Added streak CPE tasks: the task event has to be done on several days in a row, and the full task reward is paid once when the streak is completed (a day counts when it is at least 20 hours after the previous one; after more than 48 hours without the event the streak is broken). New task fields `task_mode` (`"single"`, `"multi"` or `"streak"`) and `streak_days` in the Static API, Offerwall API, CPE Offer Status API and Reward Status API, and `streak_progress` in the Offerwall API, CPE Offer Status API and Reward Status API. The Reward Status API tasks also have a new `status` field. All other task fields keep their meaning; a streak task always has a conversion limit of `1`.

2026-10-01: v1.22.0 - Static API, Offerwall API and CPE Offer Status API `i18n` fields (offer instructions and CPE task names) are now only filled for the languages of the offer's target countries, English is always included. Every other language keeps its key with `null` values instead of a fallback text. Where an offer has no text of its own in a language inside that set, its English text is returned instead of the generic default. In the Offerwall API, an offer whose instructions or visible task names are not all available in the requested language is returned in English as a whole (top-level instruction, introduction and rules fields and task names), so languages are no longer mixed within one offer.

2026-09-17: v1.21.0 - Added Polish (`pl`) language translations to Offerwall API and Static API i18n fields (offer instructions and CPE task names).

2026-08-21: v1.20.0 - Added the Publisher VAST Tag API. `GET /rest/v1/publisher/vast_tags` lists your rewarded video VAST tags (Generic VAST URL and VAST XML networks) with their configured eCPM and target countries, and `POST /rest/v1/publisher/vast_tags/ecpm` updates the eCPM of one or more tags. Both endpoints authenticate with your publisher API key and are limited to 60 requests per hour per key.

2026-08-11: v1.19.0 - Added the `is_ayet_managed` field to the network statistics of the Publisher Reporting API. It is `true` for networks whose demand is managed by ayeT-Studios and `false` for the networks you run through your own adserver.

2026-08-11: v1.18.0 - Added the `adserver_fees` field to the Publisher Reporting API. It is now always present on placement, adslot and network statistics for both offerwall and rewarded video, and is `0` where no adserver fee applies (for example on ayeT-Studios owned networks). The existing `mediation_fees` field is unchanged.

2026-07-07: v1.17.0 - Removed the `include_cpe` request parameter from the Offerwall API. CPE campaigns are now always returned in the response.

2026-05-12: v1.16.1 - Clarified `max_conversion_time` description for CPE tasks: the value is now described as time in seconds since install, not since click.

2026-05-12: v1.16.1 - Removed the `Publisher Set Currency Conversion Rate API`. Currency conversion rates can only be configured manually from the publisher dashboard.

2026-04-28: v1.16.0 - Added `state_targeting` field to Static API offer responses, listing the US ISO state codes a campaign is restricted to (or `null` if unrestricted). Clicks from US users whose IP resolves to a state outside this list are now rejected with error code `[#325]`.

2026-04-16: v1.15.1 - **Callback Type System.** Added `{callback_type}` macro to conversion callbacks (values: `conversion`, `chargeback`) and optional callbacks (values: `installation`, `optional`, `iap`, `iaa`). Replaced the single optional callback toggle with 4 independently configurable callback types (Installation, Optional Conversion, IAP, IAA).

2026-04-16: v1.15.0 - Added `arpu_d1`, `arpu_d7`, `arpu_d14`, `arpu_d30`, `arpu_d60`, `arpu_d90` fields to the `kpi` object in Offerwall API and Static API responses. The previously documented `roas` fields are deprecated and superseded by `arpu_d*`. Also added the new Publisher Cohorted KPI API (`GET /rest/v1/publisher/campaign/cohorted_kpi`) for retrieving cohorted ARPU and retention metrics per campaign alongside the campaign's configured ARPU targets.

2026-03-12: v1.14.15 - Added `browser_requirements` array field to Static API response.

2026-01-30: v1.14.14 - Added New Reward Status API fields store\_id, tags, icon\_large, video\_url, video\_url\_vp9, devices, category, offer\_owner, offer\_complexity, has\_installation\_callback, rating, screenshots, tasks\[].uuid.

2026-01-23: v1.14.13 - Added New Reward Status API fields total\_reward\_amount and rewarded\_amount under tasks.

2026-01-20: v1.14.12 - Added Reward Status API for all placement types, cpe\_status endpoint is deprecated.

2026-01-06: v1.14.11 - Added `cr` field to Surveywall API response.

2025-12-11: v1.14.10 - Added `introduction` and `rules_requirements` fields to Static API response and i18n translations.

2025-12-04: v1.14.9 - Added `type` field to CPE tasks in Offerwall API and Static API responses. `bonus_task` field deprecated in favor of `type`.

2025-12-03: v1.14.8 - Added Italian language translations to Offerwall API and Static API i18n fields.

2025-09-25: v1.14.7 - Added `gender` and `age` parameters to Offerwall API and Static API.

2025-09-02: v1.14.6 - Added `roas_d60` and `roas_d90` fields to Offerwall API and Static API responses.

2025-08-28: v1.14.5 - Added `introduction` and `rules_requirements` fields to Offerwall API response.

2025-08-12: v1.14.4 - Added `language` filter in Offerwall API request parameters.

2025-07-25: v1.14.3 - Added `{click_date}` macro to conversion callbacks and optional callbacks.

2025-07-11: v1.14.2 - Added conditional expressions for postback URLs using simplified Jinja2 template syntax.

2025-06-30: v1.14.1 - Added `support_url` field for Static API.

2025-06-25: v1.14.0 - Added `rating` and `screenshots` fields to Offerwall API and Static API responses.

2025-06-24: v1.13.10 - Added `max_conversion_time` field for CPE tasks in Static API and Offerwall API.

2025-06-12: v1.13.9 - Added profiling question parameters (`q{questionId}` and `hash`) to Surveywall API for submitting profiling question answers.

2025-06-10: v1.13.8 - Added `kpi` section to campaign objects in Offerwall API.

2025-06-05: v1.13.7 - Added `kpi` section to campaign objects in Static API.

2025-04-29: v1.13.6 - Added `{callback_ts}` macro to conversion callbacks and optional callbacks.

2025-04-23: v1.13.5 - Added `{event_value}` macro to conversion callbacks.

2025-04-17: v1.13.4 - Remove the `locked` status and add `unavailable` status in CPE tasks in Offerwall API response.

2025-04-10: v1.13.3 - Added `status` and `remaining_time` fields to CPE tasks in Offerwall API response.

2025-03-06: v1.13.2 - Added offer impression tracking URL to **Offerwall API** and **Static API**.

2025-02-07: v1.13.1 - Added `{DYNAMIC_USER}` macro to static API.

2025-02-06: v1.13.0 - Added `user_agent`, `client_hints` and `language` to Surveywall API request parameters.

2025-01-30: v1.12.5 - **Updated Callback IP Whitelist**

2024-12-19: v1.12.4 - Updated Static API and Offerwall API added field `publisher_cpi_compensation` to indicate if the publisher is paid on a CPI basis.

2024-11-13: v1.12.3 - Added `bonus_task` field to CPE tasks in Offerwall API response.

2024-10-10: v1.12.2 - Fixed Offerwall API response schema, added `cpe_instructions` array to offers schema, changed `cpe_instructions[m].multi_limit` to type `number` and clarified some descriptions.

2024-10-08: v1.12.1 - Removed unused devices\_whitelist and devices\_blacklist from the offerwall\_api response.

2024-08-19: v1.12.0 - Added Surveywall API.

2024-08-07 v1.11.12 - Updated Static API and Offerwall API added field `max_conversion_time`.

2024-07-24: v1.11.11 - Updated Offerwall API and added `offer_status_days_left` field which is set to null or days left to complete for active offers.

2024-06-26: v1.11.10 - Updated Static API, Offerwall API and CPE Offer Status API added field `event_name` to CPE tasks. Also added callback parameter `{event_name}` to conversion callback macro list.

2024-06-20: v1.11.9 - Updated Static API and Offerwall API added field `has_installation_callback`.

2024-06-11: v1.11.8 - Updated Offerwall API `offer_status` field to the new reward status states "new", "started" and "in\_progress".

2024-04-10: v1.11.7 - Updated Static API and Offerwall API to include `categories` and `tasks` in `tags` field.

2024-01-26: v1.11.6 - Updated Offerwall API documentation examples to include support related fields.

2024-01-10: v1.11.5 - Added `include_mobile_offers`, `include_cpe` in Offerwall API response schema and cleaned up non-documented response fields

2024-01-03: v1.11.4 - Added documentation for placements/get\_ads\_txt API endpoint

2023-11-21: v1.11.3 - Added languages JA, KO, TH, ZH, ID to response examples

2023-09-23: v1.11.2 - Added a persistent `task_uuid` field to cpe tasks in API responses.

2023-09-21: v1.11.1 - Added `max_android_version` and `max_ios_version` fields to Static API and Offerwall API response.

2023-09-11: v1.11 - Reworked the Offerwall API implementation, simplified request parameters, added `client_hints` and a new example for client-side requests. Older integrations are still functional for the time being, but offer and device matching is impacted.

2023-08-21: v1.10.3 - Updated Offerwall API and Static API responses to include the optionally filled `video_url_vp9` field. This is a higher quality VP9 encoded video that might exist if `video_url` is set.

2023-07-01: v1.10.2 - Updated & improved the Static API documentation.

2023-06-06: v1.10.1 - Updated Offerwall API request to accept the optional `include_mobile_offers` parameter that if request is made from non mobile device also includes mobile offers.

2023-05-22: v1.10.0 - Updated Offerwall API and Static API responses to include the optionally filled `icon_large` and `video_url` fields.

2023-01-31: v1.9.9 - Live API has been removed and will no longer return offers

2022-11-29: v1.9.8 - Updated documentation examples to reflect Static API response now including field currency\_amount

2022-07-18: v1.9.7 - Added DAU/ARPDAU to publisher reporting API response

2022-06-13: v1.9.6 - Changed custom\_parameter into optional\_parameter for Publisher Reporting API, add custom parameters to available postback parameters.

2022-06-08: v1.9.5 - Added rewarded video statistics to Publisher Reporting API.

2022-04-27: v1.9.4 - Updated documentation to include new endpoint for setting currency conversion rate via api and 2 newly available postback parameters.

2022-04-20: v1.9.3 - Updated documentation to reflect Static API change to use Static API token.

2022-01-27: v1.9.2 - Removed default "\&num\_offers=10" parameter in Offerwall API. By default the number of offers returned is no longer limited.

2021-07-23: v1.9.1 - Renamed "CPE Offer Status" parameter from "externalIdentifier" to "external\_identifier" and added "Static API" parameter "include\_cpe"

2021-03-03: Added new documentation

2021-03-03: v1.9 - Added Offerwall API, Deprecated Live API

2020-08-11: v1.8.1 - Updated documentation to introduce new parameters to differentiate chargebacks from conversions

2020-05-19: Initial release of the Publisher Reporting API

2020-04-30: v1.8 - Updated documentation to reflect Live API changes (desktop support and optional device identifiers)

2019-07-19: v1.7 - Updated documentation to reflect the adslot changes

2018-03-07: v1.6 - Renamed platform type "web" to "desktop" + "pc" and "mac" device types, added "start\_date" and "end\_date" to offer entities

2018-03-01: v1.5 - Updated parameters for live api requests, provided examples with plain GET requests

2018-02-08: v1.4 - Added static api response example for non-incent campaigns

2017-10-28: v1.3 - Conversions & Postbacks has been updated, parameters are no longer passed to postback URLs automatically

2017-10-23: v1.2 - Publisher account & placement creation information, virtual placements, placement\_identifier in s2s callbacks

2017-05-10: v1.1 - Release of our Live Offers API


# Introduction

Our Publisher APIs allow fetching our offer inventory either statically from your servers ("Static API") or dynamically for specific users both server-side and client-side ("Offerwall API" and "Surveywall API").

The **Offerwall API** ([Publisher API Reference](https://docs.ayetstudios.com/v/product-docs/publisher-api-reference)) delivers offers for a specific user and filters our inventory by their country, device type and other possible factors (campaign eligibility) which will increase your conversion rate and CPM.

The **Static API** ([Publisher API Reference](https://docs.ayetstudios.com/v/product-docs/publisher-api-reference)) on the other hand is intended for special (network) integration and must be called from your servers each 15-30 minutes to make sure our campaigns are still available, did not run into daily caps or changed targeting / bid. The Static API key, once approved by your account manager, is available in the adslot details.

The **Surveywall API** ([Publisher API Reference](https://docs.ayetstudios.com/v/product-docs/publisher-api-reference)) delivers surveys for a specific user and filters our inventory by their country, device type and other possible factors (survey eligibility) which will increase your conversion rate and CPM.

We use a REST API with *application/json* responses. Most of our examples in this documentation are available in different languages. The PHP examples rely on mod\_curl being enabled.


# Obtain API Key, Create Placement & Adslot / Setup

Before starting with the API integration, we recommend to [sign up for a publisher account](https://www.ayetstudios.com/account/login/register-publisher).\
We will assist you in setup and initial backend configuration regarding conversion postbacks, quality of your traffic, offer categories you're looking for and possible use cases for each API.

In your account, go to **Placements / Apps** and create a new **API placement** and one or more **adslots** for it.\
After creating a placement and adslot(s), go to **Edit Adslot** to get integration details in the modal's overview tab.\
If you want to perform the integration manually, you'll need the **adslot id** and your **api key** (which can be obtained under **Account Settings**) to proceed.


# Conversion Callbacks

Whenever a conversion for your traffic is tracked, our server sends a postback to your tracking endpoint. In your publisher dashboard, you can configure the callback urls for each of your placements.\
**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.

> **Note:** A single user event may generate a Conversion Callback **and** one or more [Optional Callbacks](https://docs.ayetstudios.com/v/product-docs/publisher-api-reference/optional-callbacks) simultaneously (e.g. a paid task completion that is also an INSTALLATION\_TRACKED event). All callbacks for the same event share the same `{transaction_id}`, allowing you to correlate them on your side.

### Reversal / Chargeback Callbacks:

Chargebacks are sent as conversion callbacks with `callback_type=chargeback`, `is_chargeback=1`, and the `{transaction_id}` prepended with `r-`. The `{payout_usd}` and `{currency_amount}` values are negative.

You can optionally configure a separate **Reversal Callback URL** per placement. If set, chargeback callbacks are sent to this URL instead of the main Conversion Callback URL. If left empty, chargebacks use the main Conversion Callback URL.

### Example Callback URL Configuration:

Let's assume this is your configured postback URL (in our dashboard under *Placements -> Settings*):

```
https://www.your-ad-server.com/postback?payout_usd={payout_usd}&placement_identifier={placement_identifier}&adslot_id={adslot_id}&sub_id={external_identifier}&your_parameter={custom_1}
```

Your user used this tracking link and completed an offer:

```
https://www.ayetstudios.com/s2s/pub/53270/1/1?external_identifier=your-user-id-1&custom_1=your-custom-click-id
```

The final postback to your server will look like this:

```
https://www.your-ad-server.com/postback?payout_usd=0.51&placement_identifier=my_api_placement&adslot_id=18&sub_id=your-user-id-1&your_parameter=your-custom-click-id&is_chargeback=0-or-1
```

### Postback Verification with HMAC Security Hash (optional):

Our server will always add a custom header, **X-Ayetstudios-Security-Hash**, containing a SHA256 HMAC hash of the request parameters and your publisher api key. Your API key can be found in your dashboard at ayetstudios.com under settings.

To verify the hash, perform the following steps: (1) Get all request parameters (2) Order the request parameters alphabetically (3) Build and compare the HMAC hash using the ordered request parameter string and your API key

### Available Macros for Postback URLs:

| Placeholder                  | Type    | Description                                                                                                                                                                                                                       |
| ---------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| {callback\_type}             | string  | The type of this callback: `conversion` for paid conversions, `chargeback` for chargebacks.                                                                                                                                       |
| {transaction\_id}            | string  | Unique transaction id - use for duplicate checks. If chargeback it's prepend with r-. Shared across all callbacks (conversion + optional) for the same event.                                                                     |
| {payout\_usd}                | float   | The actual conversion payout in USD. If chargeback value is negative.                                                                                                                                                             |
| {currency\_amount}           | float   | The amount of currency the user earned (taken from your offerwall currency configuration). If chargeback value is negative.                                                                                                       |
| {external\_identifier}       | string  | Offerwall API: The external\_identifier parameter passed when requesting the offers; Static API: The value of the sub\_id parameter appended to the original tracking link                                                        |
| {user\_id}                   | int     | 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                                                                                                                                                                                              |
| {store\_id}                  | string  | Store identifier of the converting app, as in the `store_id` field of the offer APIs: the Android application ID (e.g. `com.mycashery`) or the numeric App Store ID on iOS (e.g. `6740536249`). Empty for web offers and surveys. |
| {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                                                                                                                                                                                 |
| {is\_chargeback}             | int     | Either 0 or 1. Indicator if the callback is a conversion (0) or a chargeback (1).                                                                                                                                                 |
| {chargeback\_reason}         | string  | Reason why chargeback created. Only available if is\_chargeback set to 1.                                                                                                                                                         |
| {chargeback\_date}           | string  | Date of chargeback creation. Only available if is\_chargeback set to 1.                                                                                                                                                           |
| {event\_name}                | string  | For CPA & CPE campaigns, internal event name of the conversion.                                                                                                                                                                   |
| {event\_value}               | float   | The value associated with the event (non-billable - refer to "payout\_usd" and "currency\_amount" for publisher & user payout).                                                                                                   |
| {task\_name}                 | string  | CPE campaigns only, shows individual task name (as shown to the user) for that conversion.                                                                                                                                        |
| {task\_uuid}                 | string  | CPE campaigns only, shows the persistent task UUID for that conversion.                                                                                                                                                           |
| {currency\_identifier}       | string  | Shows virtual currency name as set in adslot.                                                                                                                                                                                     |
| {currency\_conversion\_rate} | number  | Shows currency conversion rate used to calculate user currency for the given conversion.                                                                                                                                          |
| {callback\_ts}               | integer | Timestamp at which the user triggered the event/callback.                                                                                                                                                                         |
| {click\_date}                | string  | A string representing the date and time (in 'Y-m-d H:i:s' format) at which the user clicked on the offer.                                                                                                                         |
| {custom\_1}                  | string  | Custom parameter to pass variables to the conversion callbacks. Can be appended to Static API / Offerwall API tracking links or the web offerwall entry URL.                                                                      |
| {custom\_2}                  | string  | Custom parameter to pass variables to the conversion callbacks. Can be appended to Static API / Offerwall API tracking links or the web offerwall entry URL.                                                                      |
| {custom\_3}                  | string  | Custom parameter to pass variables to the conversion callbacks. Can be appended to Static API / Offerwall API tracking links or the web offerwall entry URL.                                                                      |
| {custom\_4}                  | string  | Custom parameter to pass variables to the conversion callbacks. Can be appended to Static API / Offerwall API tracking links or the web offerwall entry URL.                                                                      |
| {custom\_5}                  | string  | Custom parameter to pass variables to the conversion callbacks. Can be appended to Static API / Offerwall API tracking links or the web offerwall entry URL.                                                                      |

### Conditional Expressions for Postback URLs:

In addition to simple macro replacements, you can use conditional expressions based on simplified Jinja2 template syntax. These expressions allow dynamic URL generation based on parameter values.

**Syntax:** `{%variable==value?true_result:false_result%}`

| Feature            | Description                                           | Example                                               |
| ------------------ | ----------------------------------------------------- | ----------------------------------------------------- |
| Equality check     | Returns different values based on equality comparison | `is_install={%event_name==INSTALLATION_TRACKED?1:0%}` |
| Empty false value  | Returns empty string when condition is false          | `{%is_chargeback==1?&chargeback_callback=true:%}`     |
| Numeric comparison | Supports >, <, >=, <= for numeric values              | `tier={%payout_usd>10?high:low%}`                     |
| Not equal check    | Returns value when parameters don't match             | `{%custom_1!=web_signup?&mobile_signup=1:%}`          |

**Supported operators:** `==`, `!=`, `>`, `<`, `>=`, `<=`

**Note:** If a variable doesn't exist or the expression is invalid, it will be replaced with an empty string.


# Optional Callbacks

In addition to [Conversion Callbacks](https://docs.ayetstudios.com/v/product-docs/publisher-api-reference/conversion-callbacks), you can enable optional callback types to receive additional event notifications. Each type can be independently enabled per placement in your publisher dashboard under *Placements -> Settings*, and each type supports an optional custom URL (falls back to the main Conversion Callback URL if left empty).\
**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.

A single user event may generate multiple optional callbacks simultaneously (e.g. an INSTALLATION\_TRACKED event that also carries an IAP value will send both an `installation` and an `iap` callback). All callbacks for the same event - including the Conversion Callback if applicable - share the same `{transaction_id}`.

### Callback Types:

| Type                          | `{callback_type}` value | Description                                                                                                                                                          | Custom URL field                 |
| ----------------------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
| Installation Callbacks        | `installation`          | Fired when an INSTALLATION\_TRACKED event occurs. Sent regardless of task visibility or payout.                                                                      | Installation Callback URL        |
| Optional Conversion Callbacks | `optional`              | Fired for visible but unpaid tasks (tasks where the user sees the task but no publisher/user payout is earned). `{payout_usd}` and `{currency_amount}` are set to 0. | Optional Conversion Callback URL |
| IAP Callbacks                 | `iap`                   | Fired for in-app purchase events. `{event_value}` contains the IAP value.                                                                                            | IAP Callback URL                 |
| IAA Callbacks                 | `iaa`                   | Fired for in-app ad revenue events. `{event_value}` contains the IAA revenue value.                                                                                  | IAA Callback URL                 |

### Example Callback URL Configuration:

Let's assume you have enabled IAP Callbacks with a custom URL:

```
https://www.your-ad-server.com/iap-postback?callback_type={callback_type}&event_value={event_value}&event_name={event_name}&placement_identifier={placement_identifier}&adslot_id={adslot_id}&sub_id={external_identifier}&your_parameter={custom_1}
```

When an IAP event fires, the final postback to your server will look like this:

```
https://www.your-ad-server.com/iap-postback?callback_type=iap&event_value=2.33&event_name=iap_purchase&placement_identifier=my_api_placement&adslot_id=18&sub_id=your-user-id-1&your_parameter=your-custom-click-id
```

### Postback Verification with HMAC Security Hash (optional):

Our server will always add a custom header, **X-Ayetstudios-Security-Hash**, containing a SHA256 HMAC hash of the request parameters and your publisher api key. Your API key can be found in your dashboard at ayetstudios.com under settings.

To verify the hash, perform the following steps: (1) Get all request parameters (2) Order the request parameters alphabetically (3) Build and compare the HMAC hash using the ordered request parameter string and your API key

### Available Macros for Postback URLs:

| Placeholder             | Type    | Description                                                                                                                                                                                                                       |
| ----------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| {callback\_type}        | string  | The type of this callback: `installation`, `optional`, `iap`, or `iaa`.                                                                                                                                                           |
| {transaction\_id}       | string  | Unique transaction id - use for duplicate checks. Shared across all callbacks (conversion + optional) for the same event.                                                                                                         |
| {payout\_usd}           | float   | Only available for `callback_type=optional`. Always set to 0.                                                                                                                                                                     |
| {currency\_amount}      | float   | Only available for `callback_type=optional`. Always set to 0.                                                                                                                                                                     |
| {external\_identifier}  | string  | Offerwall API: The external\_identifier parameter passed when requesting the offers; Static API: The value of the sub\_id parameter appended to the original tracking link                                                        |
| {user\_id}              | int     | 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                                                                                                                                                                                              |
| {store\_id}             | string  | Store identifier of the converting app, as in the `store_id` field of the offer APIs: the Android application ID (e.g. `com.mycashery`) or the numeric App Store ID on iOS (e.g. `6740536249`). Empty for web offers and surveys. |
| {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                                                                                                                                                                                 |
| {event\_name}           | string  | Internal event name of the event.                                                                                                                                                                                                 |
| {event\_value}          | float   | The value associated with the event (non-billable). Contains IAP or IAA value for `iap`/`iaa` callback types.                                                                                                                     |
| {task\_uuid}            | string  | Shows the persistent task UUID for that event.                                                                                                                                                                                    |
| {callback\_ts}          | integer | Timestamp at which the user triggered the event/callback.                                                                                                                                                                         |
| {click\_date}           | string  | A string representing the date and time (in 'Y-m-d H:i:s' format) at which the user clicked on the offer.                                                                                                                         |
| {custom\_1}             | string  | Custom parameter to pass variables to the conversion callbacks. Can be appended to Static API / Offerwall API tracking links or the web offerwall entry URL.                                                                      |
| {custom\_2}             | string  | Custom parameter to pass variables to the conversion callbacks. Can be appended to Static API / Offerwall API tracking links or the web offerwall entry URL.                                                                      |
| {custom\_3}             | string  | Custom parameter to pass variables to the conversion callbacks. Can be appended to Static API / Offerwall API tracking links or the web offerwall entry URL.                                                                      |
| {custom\_4}             | string  | Custom parameter to pass variables to the conversion callbacks. Can be appended to Static API / Offerwall API tracking links or the web offerwall entry URL.                                                                      |
| {custom\_5}             | string  | Custom parameter to pass variables to the conversion callbacks. Can be appended to Static API / Offerwall API tracking links or the web offerwall entry URL.                                                                      |

### Conditional Expressions for Postback URLs:

In addition to simple macro replacements, you can use conditional expressions based on simplified Jinja2 template syntax. These expressions allow dynamic URL generation based on parameter values.

**Syntax:** `{%variable==value?true_result:false_result%}`

| Feature               | Description                                           | Example                                               |
| --------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| Equality check        | Returns different values based on equality comparison | `is_install={%event_name==INSTALLATION_TRACKED?1:0%}` |
| Callback type routing | Route based on callback type                          | `{%callback_type==iap?&purchase=1:%}`                 |
| Numeric comparison    | Supports >, <, >=, <= for numeric values              | `tier={%event_value>10?high:low%}`                    |
| Not equal check       | Returns value when parameters don't match             | `{%custom_1!=web_signup?&mobile_signup=1:%}`          |

**Supported operators:** `==`, `!=`, `>`, `<`, `>=`, `<=`

**Note:** If a variable doesn't exist or the expression is invalid, it will be replaced with an empty string.


# IP Whitelisting

If your want to restrict postbacks to our callback server IPs, please whitelist the following IPs and check back regularly for possible changes:

```
  **51.79.101.241**

  **158.69.185.134**

  **158.69.185.154**

  **35.165.166.40**

  **35.166.159.131**

  **52.40.3.140**
```

*(Last Update: 2025-01-30)*


# API Impression Tracking

This section describes how to enable **impression tracking** for **offerwall\_api** and **static\_api** adslots. By placing a simple 1x1 transparent GIF (the `impression_url`) in your site or application, you allow our backend to track how often each offer is displayed to users. This helps us optimise your traffic, recommend the best offers for your users, and boost your eCPM.

**Usage**:

Whenever you show an offer on your website or in your app, embed the provided `impression_url` as a 1x1 image.

**Where to place it**:

* Ideally, you render this 1x1 pixel each time an offer's creative is displayed or scrolled into view in your UI. That way, we receive the impression signal precisely when the user sees the offer.
* For **offerwall\_api** adslots, the system will generate the final `impression_url` for each offer, substituting the user's external identifier.
* For **static\_api** adslots, the `{external_identifier}` macro is in the URL, which should be substituted on your end with the user's unique external identifier.

**Example**:

```html
<img
  src="https://www.ayetstudios.com/offers/shown/123;56;0;4ac978462b.../img.gif?external_identifier=testuserid"
  style="width:1px; height:1px; border:0;"
/>
```

Once loaded, our system tracks that the offer was actually shown on the user's screen.


# Offerwall API

The Offerwall API provides a solution for publishers who want to include an offerwall in their application/website but have control over the presentation of the offers. All offers matching the parameters provided will be returned and can be displayed to the user. The Offerwall API supports both server and client-side calls.


# Offerwall API

Retrieve offers matching the provided parameters

This endpoint can be called client-side or server-side, where the `ip` parameter is required only for server-side requests.

The following parameters are recommended:\
`[ip] + user_agent + client_hints`

`client_hints` can be obtained in a secure (SSL) browser context - please check the example to the right.

Alternative parameter combinations for special use cases are:

* `ip + device_make + device_model + os + os_version` (Android & iOS devices)
* `ip + browser + browser_version` (Desktop devices)

**Attention:** Check the list below for the correct input format of the available parameters.

```json
{"openapi":"3.1.0","info":{"title":"ayeT-Studios Publisher API Documentation","version":"1.30.0"},"tags":[{"name":"Offerwall API","description":"The Offerwall API provides a solution for publishers who want to include an offerwall in their application/website but have control over the presentation of the offers. All offers matching the parameters provided will be returned and can be displayed to the user. The Offerwall API supports both server and client-side calls."}],"servers":[{"description":"Live Server","url":"https://www.ayetstudios.com"}],"paths":{"/offers/offerwall_api/{adslot}":{"get":{"summary":"Offerwall API","tags":["Offerwall API"],"operationId":"offerwall-api","description":"Retrieve offers matching the provided parameters\n\nThis endpoint can be called client-side or server-side, where the `ip` parameter is required only for server-side requests.\n\nThe following parameters are recommended:<br>\n`[ip] + user_agent + client_hints`\n\n`client_hints` can be obtained in a secure (SSL) browser context - please check the example to the right.\n\nAlternative parameter combinations for special use cases are:\n- `ip + device_make + device_model + os + os_version` (Android & iOS devices)\n- `ip + browser + browser_version` (Desktop devices)\n\n**Attention:** Check the list below for the correct input format of the available parameters.","parameters":[{"schema":{"type":"string"},"in":"query","name":"external_identifier","description":"External identifier","required":true},{"schema":{"type":"string"},"in":"query","name":"device_make","description":"Make of the user's device"},{"schema":{"type":"string"},"in":"query","name":"device_model","description":"Model of the user's device"},{"schema":{"type":"string","enum":["android","ios","desktop"]},"in":"query","name":"os","description":"Operating system of the user's device"},{"schema":{"type":"string"},"in":"query","name":"os_version","description":"Operating system version of the user's device"},{"schema":{"type":"string"},"in":"query","name":"browser","description":"Browser of user's device"},{"schema":{"type":"string"},"in":"query","name":"browser_version","description":"Browser version of user's device"},{"schema":{"type":"string"},"in":"query","name":"user_agent","description":"User agent of user's browser"},{"schema":{"type":"string"},"in":"query","name":"client_hints","description":"Client hints of user's browser if existent, otherwise empty string"},{"schema":{"type":"string"},"in":"query","name":"ip","description":"IP address of the user (if called server-side)"},{"schema":{"type":"string"},"in":"query","name":"gaid","description":"Google Advertising Identifier of the user's device"},{"schema":{"type":"string"},"in":"query","name":"idfa","description":"iOS Identifier for Advertisers of the user's device"},{"schema":{"type":"string"},"in":"query","name":"custom_1","description":"Custom parameter to pass variables to the conversion callbacks"},{"schema":{"type":"string"},"in":"query","name":"custom_2","description":"Custom parameter to pass variables to the conversion callbacks"},{"schema":{"type":"string"},"in":"query","name":"custom_3","description":"Custom parameter to pass variables to the conversion callbacks"},{"schema":{"type":"string"},"in":"query","name":"custom_4","description":"Custom parameter to pass variables to the conversion callbacks"},{"schema":{"type":"string"},"in":"query","name":"custom_5","description":"Custom parameter to pass variables to the conversion callbacks"},{"schema":{"type":"boolean","default":false},"in":"query","name":"request_live_networks"},{"schema":{"type":"integer"},"in":"query","name":"num_offers","description":"Number of offers to return"},{"schema":{"type":"string","enum":["payout","conversion_rate","epc","ecpm"]},"in":"query","name":"offer_sorting","description":"Specify the key for sorting "},{"schema":{"type":"number","format":"double"},"in":"query","name":"minimum_payout","description":"Minimum payout of offers to return"},{"schema":{"type":"boolean","default":false},"in":"query","name":"include_mobile_offers","description":"Specifies whether to return mobile offers for request made from non mobile device"},{"schema":{"type":"string"},"in":"query","name":"language","description":"Specifies language in which offer instructions should be returned"},{"schema":{"type":"integer"},"in":"query","name":"age","description":"The user's age in years"},{"schema":{"type":"string","enum":["male","female","non_binary"]},"in":"query","name":"gender","description":"The user's gender"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"num_offers":{"type":"integer"},"filters":{"type":"object","properties":{"make":{"type":"string"},"model":{"type":"string"},"os":{"type":"string"},"os_version":{"type":"string"},"ip":{"type":"string"},"platform":{"type":"string"},"include_mobile_offers":{"type":"boolean"},"offer_sorting":{"type":"string"},"minimum_payout":{"type":"number"},"include_cpe":{"type":"boolean"},"num_offers":{"type":"integer"},"language":{"type":"string"}}},"offerwall":{"type":"object","properties":{"name":{"type":"string"},"currency_name_singular":{"type":"string"},"currency_name_plural":{"type":"string"},"currency_sale":{"type":"boolean"},"currency_sale_multiplier":{"type":"number"},"support_url":{"type":"string"}}},"offers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"store_id":{"type":"string"},"landing_page":{"type":"string"},"icon":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"tags":{"type":"object","properties":{"tab":{"type":"string"},"categories":{"type":"array","items":{"type":"string"}},"tasks":{"type":"array","items":{"type":"string"}}}},"icon_large":{"type":"string"},"video_url":{"type":"string"},"video_url_vp9":{"type":"string"},"platform":{"type":"string"},"platforms":{"type":"array","items":{"type":"string"}},"devices":{"type":"array","items":{"type":"string"}},"category":{"type":"string"},"conversion_type":{"type":"string"},"conversion_time":{"type":"integer","description":"The expected conversion time (in seconds)"},"max_conversion_time":{"type":"integer","description":"The maximum allowed conversion time (in seconds)"},"conversion_instructions":{"type":"string"},"conversion_instructions_short":{"type":"string"},"conversion_instructions_long":{"type":"string"},"tracking_link":{"type":"string"},"created":{"type":"string"},"start_date":{"type":"string"},"end_date":{"type":"string"},"offer_owner":{"type":"integer"},"score":{"type":"number"},"offer_complexity":{"type":"string"},"payment_required":{"type":"string"},"kpi":{"type":"object","description":"Advertiser KPI for this offer. `arpu_dN` is the expected average advertiser revenue per attributed user by day N in USD, derived from the campaign bid and configured ROAS target. ARPU is stable across publisher revenue share models and works for both cpi-cpi and cpi-cpe campaigns. Values are rounded to 2 decimals.","properties":{"arpu_d1":{"type":"number","nullable":true,"description":"Expected advertiser revenue per attributed user by day 1 (USD)."},"arpu_d7":{"type":"number","nullable":true,"description":"Expected advertiser revenue per attributed user by day 7 (USD)."},"arpu_d14":{"type":"number","nullable":true,"description":"Expected advertiser revenue per attributed user by day 14 (USD)."},"arpu_d30":{"type":"number","nullable":true,"description":"Expected advertiser revenue per attributed user by day 30 (USD)."},"arpu_d60":{"type":"number","nullable":true,"description":"Expected advertiser revenue per attributed user by day 60 (USD)."},"arpu_d90":{"type":"number","nullable":true,"description":"Expected advertiser revenue per attributed user by day 90 (USD)."},"iap_iaa_ratio":{"type":"string","nullable":true}}},"offer_status":{"type":"string","description":"`\"new\"`: new offer, `\"started\"`: user previously clicked on the offer, `\"in_progress\"`: user activity for the offer has been tracked"},"offer_status_days_left":{"type":"integer","description":"Returns `null` for new offers the user has not engaged with. Otherwise returns the whole days remaining for the user to complete the offer, `0` with less than a day left. `null` when the offer has no time limit or its time ran out.","nullable":true},"offer_status_expiration_time":{"type":["integer","null"],"description":"Unix timestamp (seconds) at which a started offer ends, the deadline the conversion engine enforces. Use it to show less than a day as hours. `null` for new offers and offers without a time limit."},"rewarded_amount":{"type":"number","description":"Virtual currency credited to the user for this offer so far, from the actual credits (not recalculated with the current reward). Only present for CPE offers the user has started."},"reward_currency":{"$ref":"#/components/schemas/RewardCurrency","description":"Currency the amounts of this offer are in. Only present for CPE offers the user has started."},"support_url":{"type":"string"},"introduction":{"type":"string","description":"Introduction text for the offer"},"rules_requirements":{"type":"string","description":"Additional rules and requirements for the offer"},"impression_url":{"type":"string","description":"The pixel impression tracking URL to be displayed when the offer is rendered on the user's screen (see API Impression Tracking section)."},"require_reservation":{"type":"boolean"},"min_android_version":{"type":"string"},"min_ios_version":{"nullable":true},"max_android_version":{"type":"string","nullable":true},"max_ios_version":{"nullable":true},"priority":{"type":"number"},"payout_base":{"type":"number","description":"Base payout for this offer (without bonuses or currency sales)"},"payout":{"type":"number","description":"Payout for this offer in virtual currency. For a started CPE offer, the amount already credited plus the current reward for the conversions left; its amounts are in the currency of the adslot the user started it in (see `reward_currency`)."},"payout_name":{"type":"string"},"button_text":{"type":"string"},"has_installation_callback":{"type":"boolean"},"publisher_cpi_compensation":{"type":"boolean"},"rating":{"type":"string","nullable":true,"description":"App rating from app store (1-5 stars). null if not available."},"screenshots":{"type":"array","description":"Array of screenshot URLs from the app store. May be empty if not available.","items":{"type":"string","format":"uri"}},"cpe_instructions":{"type":"array","uniqueItems":true,"minItems":1,"description":"Present for cpe campaign","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the cpe task"},"uuid":{"type":"string","minLength":1,"description":"Persistent UUID of the task"},"event_name":{"type":"string","description":"Event name of the task"},"payout_base":{"type":"number","description":"Base payout for task (without bonuses or currency sales)"},"payout":{"type":"number","description":"Payout for task in virtual currency"},"rewarded_amount":{"type":"number","description":"Virtual currency credited to the user for this task so far, the sum of its actual credits (for a repeatable task every conversion). Only present for offers the user has started."},"multi_limit":{"type":"number","minLength":1,"description":"Number of times the user can complete this task"},"currency":{"type":"string","minLength":1,"description":"Offerwall Currency Name"},"completed":{"type":"boolean","description":"True if the user has already completed this task"},"percentage":{"type":"number","description":"Percentage of conversions the user completed for this task. For a streak task, the share of streak days the user completed (`streak_progress` / `streak_days`)."},"type":{"type":"string","description":"The type of the task. Possible values: `\"normal\"`, `\"bonus\"`, `\"turbo\"`, `\"retention\"`, `\"purchase\"`","enum":["normal","bonus","turbo","retention","purchase"]},"bonus_task":{"type":"boolean","description":"Whether or not the task is marked as a bonus task. Deprecated - use `type` instead."},"status":{"type":"string","description":"The current status of the task. Possible values: `\"available\"`, `\"unavailable\"`, `\"expired\"`, `\"completed\"`. For a streak task, `\"unavailable\"` means the user already did the task today and can continue the streak later, `\"expired\"` means the streak ended after a too long gap (only with streak settings that end it) and can no longer be completed. A task whose time limit ran out is `\"expired\"`, also when it was locked."},"remaining_time":{"type":"number","description":"Remaining time in seconds to complete the task. If the offer has not been started, or the task is not available, this will be `null`"},"max_conversion_time":{"type":"number","description":"Maximum time in seconds after install to complete this task. Null if no limit is configured."},"task_mode":{"type":"string","description":"How the task is completed. `\"single\"`: the event once. `\"multi\"`: the event up to `multi_limit` times, every completion is rewarded. `\"streak\"`: the event on `streak_days` days; nothing is rewarded per day, `payout` is rewarded once when the streak is completed. A day counts when it is at least 20 hours after the previous one. What happens after more than 48 hours without the event depends on the streak settings of the offer: by default the streak restarts at 0, otherwise the task ends as `\"expired\"`, or there is no time limit between the days.","enum":["single","multi","streak"]},"streak_days":{"type":["integer","null"],"description":"Number of days a streak task has to be done on, each at least 20 hours after the previous one. `null` for other tasks."},"streak_progress":{"type":["integer","null"],"description":"Number of streak days the user has done so far, `0` if the streak was not started or has restarted. `null` for other tasks."}},"required":["name","uuid","payout","payout_base","multi_limit","currency","completed","type","bonus_task","status","remaining_time","max_conversion_time"]}}}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"RewardCurrency":{"description":"Currency settings of the adslot a started offer is shown in, to render its amounts like the offerwall does.","type":"object","properties":{"virtual_currency_singular":{"type":"string","description":"Currency name for an amount of exactly 1."},"virtual_currency_plural":{"type":"string","description":"Currency name for other amounts."},"virtual_currency_decimal_places":{"type":"integer","description":"Decimal places of the amounts."},"virtual_currency_display_type":{"type":"string","description":"How the currency is shown next to an amount: `\"none\"` (amount only), `\"text\"` (currency name) or `\"icon\"` (`virtual_currency_icon`).","enum":["none","text","icon"]},"virtual_currency_icon":{"type":"string","description":"Currency icon URL, empty when the adslot has no icon."},"currency_text_icon_prepend_append":{"type":"string","description":"Whether the currency name or icon goes before (`\"prepend\"`) or after (`\"append\"`) the amount.","enum":["prepend","append"]},"hide_plus":{"type":"boolean","description":"Do not show a plus sign before reward amounts."},"hide_value":{"type":"boolean","description":"Do not show the amount, only the currency."}},"required":["virtual_currency_singular","virtual_currency_plural","virtual_currency_decimal_places","virtual_currency_display_type","virtual_currency_icon","currency_text_icon_prepend_append","hide_plus","hide_value"]},"Error":{"description":"","type":"object","properties":{"status":{"type":"string","minLength":1,"enum":["success","error"]},"error":{"type":"string","minLength":1,"description":"Human readable error message"}},"required":["status","error"]}}}}
```


# Static API

The Static API is recommended only for special integrations, because not all campaigns are available without more sophisticated device match. If integrated, it should be called each 15-30 minutes to make sure our campaigns are still available, did not run into daily caps or changed targeting / bid. The "Static API key" for requests is adslot specific and available in the adslot details once approved by your account manager.


# Static API

Returns a list of currently running campaigns on our platform which suit your adslot configuration. Can be filtered by additional parameters.\
\
Note: To pass custom parameters from clicks to conversion callbacks, the `tracking_link` parameter in offer objects can be extended with `&custom_1=...` to `&custom_5=...`\
Those five parameters can be accessed in the publisher dashboard and from conversion callbacks using the `{custom_1} - {custom_5}` macros in the resulting callback URL.\
\
Tracking links can also be extended with `&age={numeric_age}` and `&gender={gender}` to collect demographic data. The `age` parameter accepts a numeric age in years. The `gender` parameter accepts values: `male`, `female`, or `non_binary`.\
\
The `external_identifier` parameter found as placeholder in tracking links is important for persistent user identification and also allows access to the users reward status.\
Publishers who are unable to provide a stable `external_identifier` for their users can use the `{DYNAMIC_USER}` macro and let ayeT-Studios handle the identification. **Since this has implications on traffic quality and offer exposure, please contact your account manager before implementing this.**

```json
{"openapi":"3.1.0","info":{"title":"ayeT-Studios Publisher API Documentation","version":"1.30.0"},"tags":[{"name":"Static API","description":"The Static API is recommended only for special integrations, because not all campaigns are available without more sophisticated device match. If integrated, it should be called each 15-30 minutes to make sure our campaigns are still available, did not run into daily caps or changed targeting / bid. The \"Static API key\" for requests is adslot specific and available in the adslot details once approved by your account manager."}],"servers":[{"description":"Live Server","url":"https://www.ayetstudios.com"}],"paths":{"/offers/get/{adslot}":{"get":{"summary":"Static API","tags":["Static API"],"operationId":"static-api","description":"Returns a list of currently running campaigns on our platform which suit your adslot configuration. Can be filtered by additional parameters.<br><br><b>Note:</b> To pass custom parameters from clicks to conversion callbacks, the <code>tracking_link</code> parameter in offer objects can be extended with <code>&custom_1=...</code> to <code>&custom_5=...</code><br>Those five parameters can be accessed in the publisher dashboard and from conversion callbacks using the <code>{custom_1} - {custom_5}</code> macros in the resulting callback URL.<br><br>Tracking links can also be extended with <code>&age={numeric_age}</code> and <code>&gender={gender}</code> to collect demographic data. The <code>age</code> parameter accepts a numeric age in years. The <code>gender</code> parameter accepts values: <code>male</code>, <code>female</code>, or <code>non_binary</code>.<br><br>The <code>external_identifier</code> parameter found as placeholder in tracking links is important for persistent user identification and also allows access to the users reward status. <br> Publishers who are unable to provide a stable <code>external_identifier</code> for their users can use the <code>{DYNAMIC_USER}</code> macro and let ayeT-Studios handle the identification. **Since this has implications on traffic quality and offer exposure, please contact your account manager before implementing this.**","parameters":[{"schema":{"type":"string"},"in":"query","name":"apiKey","required":true,"description":"static api key that is available under adslot details in your dashboard"},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"countries[]","description":"array of iso2 country codes"},{"schema":{"type":"array","items":{"type":"string","enum":["android","ios","desktop"]}},"in":"query","name":"platform[]"},{"schema":{"type":"array","items":{"type":"string","enum":["cpi","cpa","cpe","cpl"]}},"in":"query","name":"conversion_type[]"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"description":"","type":"object","properties":{"status":{"type":"string","minLength":1},"num_offers":{"type":"number"},"support_url":{"type":"string"},"offers":{"type":"array","uniqueItems":true,"minItems":1,"items":{"type":"object","properties":{"id":{"type":"number"},"store_id":{"type":"string"},"landing_page":{"type":"string","minLength":1},"icon":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"description":{"type":"string"},"tags":{"type":"object","properties":{"tab":{"type":"string","minLength":1},"categories":{"type":"array","items":{"type":"string"}},"tasks":{"type":"array","items":{"type":"string"}}},"required":["tab"]},"icon_large":{"type":"string","description":"an optional teaser icon, usually 720p"},"video_url":{"type":"string","description":"optional teaser video, max. 15s, h264, 720p @ 1000kbps"},"video_url_vp9":{"type":"string","description":"optional higher quality variant of the teaser video, max. 15s, vp9, 720p @ 750kbps"},"platform":{"type":"string","minLength":1,"description":"platform the offer belongs to"},"platforms":{"type":"array","items":{"type":"string"},"description":"array of platforms permitted to complete the offer"},"devices":{"type":"array","items":{"type":"string"}},"category":{"type":"string","minLength":1},"conversion_type":{"type":"string","minLength":1},"conversion_time":{"type":"number","description":"The expected conversion time (in seconds)"},"max_conversion_time":{"type":"number","description":"The maximum allowed conversion time (in seconds)"},"conversion_instructions":{"type":"string","minLength":1},"conversion_instructions_short":{"type":"string","minLength":1},"conversion_instructions_long":{"type":"string","minLength":1},"countries":{"type":"array","items":{"type":"string"}},"state_targeting":{"type":"array","nullable":true,"default":null,"description":"ISO 3166-2 codes (without the `US-` prefix) of the US states this campaign is restricted to,\nor `null` if no state targeting is configured. Clicks from US users whose IP resolves to a\nstate outside this list will be rejected with error code 325.","items":{"type":"string"}},"payout_usd":{"type":"number"},"currency_amount":{"type":"number"},"epc":{"oneOf":[{"type":"string"},{"type":"number"}],"minLength":1},"daily_cap":{"type":"number"},"tracking_link":{"type":"string","minLength":1},"impression_url":{"type":"string","description":"The pixel impression tracking URL to be displayed when the offer is rendered on the user's screen (see API Impression Tracking section).","minLength":1},"created":{"type":"string","minLength":1},"start_date":{"type":"string","minLength":1},"end_date":{"type":"string","minLength":1},"offer_owner":{"type":"number"},"score":{"type":"number"},"devices_whitelist":{"type":"array","items":{"type":"string"}},"devices_blacklist":{"type":"array","items":{"type":"string"}},"offer_complexity":{"type":"string","minLength":1},"payment_required":{"type":"boolean"},"kpi":{"type":"object","description":"Advertiser KPI for this offer. `arpu_dN` is the expected average advertiser revenue per attributed user by day N in USD, derived from the campaign bid and configured ROAS target. ARPU is stable across publisher revenue share models and works for both cpi-cpi and cpi-cpe campaigns. Values are rounded to 2 decimals.","properties":{"arpu_d1":{"type":"number","nullable":true,"description":"Expected advertiser revenue per attributed user by day 1 (USD)."},"arpu_d7":{"type":"number","nullable":true,"description":"Expected advertiser revenue per attributed user by day 7 (USD)."},"arpu_d14":{"type":"number","nullable":true,"description":"Expected advertiser revenue per attributed user by day 14 (USD)."},"arpu_d30":{"type":"number","nullable":true,"description":"Expected advertiser revenue per attributed user by day 30 (USD)."},"arpu_d60":{"type":"number","nullable":true,"description":"Expected advertiser revenue per attributed user by day 60 (USD)."},"arpu_d90":{"type":"number","nullable":true,"description":"Expected advertiser revenue per attributed user by day 90 (USD)."},"iap_iaa_ratio":{"type":"string","nullable":true}}},"introduction":{"type":"string","description":"Introduction text for the offer"},"rules_requirements":{"type":"string","description":"Additional rules and requirements for the offer"},"i18n":{"type":"object","description":"Instructions per language. Only the languages of the offer's target countries are filled (English always); the fields of every other language are `null`.","properties":{"en":{"type":"object","required":["conversion_instructions_short","conversion_instructions_long"],"properties":{"conversion_instructions_short":{"type":"string","minLength":1},"conversion_instructions_long":{"type":"string","minLength":1},"introduction":{"type":"string","description":"Introduction text for the offer"},"rules_requirements":{"type":"string","description":"Additional rules and requirements for the offer"}}},"de":{"type":"object","required":["conversion_instructions_short","conversion_instructions_long"],"properties":{"conversion_instructions_short":{"type":["string","null"],"minLength":1},"conversion_instructions_long":{"type":["string","null"],"minLength":1},"introduction":{"type":["string","null"],"description":"Introduction text for the offer"},"rules_requirements":{"type":["string","null"],"description":"Additional rules and requirements for the offer"}}},"es":{"type":"object","required":["conversion_instructions_short","conversion_instructions_long"],"properties":{"conversion_instructions_short":{"type":["string","null"],"minLength":1},"conversion_instructions_long":{"type":["string","null"],"minLength":1},"introduction":{"type":["string","null"],"description":"Introduction text for the offer"},"rules_requirements":{"type":["string","null"],"description":"Additional rules and requirements for the offer"}}},"fr":{"type":"object","required":["conversion_instructions_short","conversion_instructions_long"],"properties":{"conversion_instructions_short":{"type":["string","null"],"minLength":1},"conversion_instructions_long":{"type":["string","null"],"minLength":1},"introduction":{"type":["string","null"],"description":"Introduction text for the offer"},"rules_requirements":{"type":["string","null"],"description":"Additional rules and requirements for the offer"}}},"pt":{"type":"object","required":["conversion_instructions_short","conversion_instructions_long"],"properties":{"conversion_instructions_short":{"type":["string","null"],"minLength":1},"conversion_instructions_long":{"type":["string","null"],"minLength":1},"introduction":{"type":["string","null"],"description":"Introduction text for the offer"},"rules_requirements":{"type":["string","null"],"description":"Additional rules and requirements for the offer"}}},"ru":{"type":"object","required":["conversion_instructions_short","conversion_instructions_long"],"properties":{"conversion_instructions_short":{"type":["string","null"],"minLength":1},"conversion_instructions_long":{"type":["string","null"],"minLength":1},"introduction":{"type":["string","null"],"description":"Introduction text for the offer"},"rules_requirements":{"type":["string","null"],"description":"Additional rules and requirements for the offer"}}},"ja":{"type":"object","required":["conversion_instructions_short","conversion_instructions_long"],"properties":{"conversion_instructions_short":{"type":["string","null"],"minLength":1},"conversion_instructions_long":{"type":["string","null"],"minLength":1},"introduction":{"type":["string","null"],"description":"Introduction text for the offer"},"rules_requirements":{"type":["string","null"],"description":"Additional rules and requirements for the offer"}}},"ko":{"type":"object","required":["conversion_instructions_short","conversion_instructions_long"],"properties":{"conversion_instructions_short":{"type":["string","null"],"minLength":1},"conversion_instructions_long":{"type":["string","null"],"minLength":1},"introduction":{"type":["string","null"],"description":"Introduction text for the offer"},"rules_requirements":{"type":["string","null"],"description":"Additional rules and requirements for the offer"}}},"th":{"type":"object","required":["conversion_instructions_short","conversion_instructions_long"],"properties":{"conversion_instructions_short":{"type":["string","null"],"minLength":1},"conversion_instructions_long":{"type":["string","null"],"minLength":1},"introduction":{"type":["string","null"],"description":"Introduction text for the offer"},"rules_requirements":{"type":["string","null"],"description":"Additional rules and requirements for the offer"}}},"zh":{"type":"object","required":["conversion_instructions_short","conversion_instructions_long"],"properties":{"conversion_instructions_short":{"type":["string","null"],"minLength":1},"conversion_instructions_long":{"type":["string","null"],"minLength":1},"introduction":{"type":["string","null"],"description":"Introduction text for the offer"},"rules_requirements":{"type":["string","null"],"description":"Additional rules and requirements for the offer"}}},"id":{"type":"object","required":["conversion_instructions_short","conversion_instructions_long"],"properties":{"conversion_instructions_short":{"type":["string","null"],"minLength":1},"conversion_instructions_long":{"type":["string","null"],"minLength":1},"introduction":{"type":["string","null"],"description":"Introduction text for the offer"},"rules_requirements":{"type":["string","null"],"description":"Additional rules and requirements for the offer"}}},"it":{"type":"object","required":["conversion_instructions_short","conversion_instructions_long"],"properties":{"conversion_instructions_short":{"type":["string","null"],"minLength":1},"conversion_instructions_long":{"type":["string","null"],"minLength":1},"introduction":{"type":["string","null"],"description":"Introduction text for the offer"},"rules_requirements":{"type":["string","null"],"description":"Additional rules and requirements for the offer"}}},"pl":{"type":"object","required":["conversion_instructions_short","conversion_instructions_long"],"properties":{"conversion_instructions_short":{"type":["string","null"],"minLength":1},"conversion_instructions_long":{"type":["string","null"],"minLength":1},"introduction":{"type":["string","null"],"description":"Introduction text for the offer"},"rules_requirements":{"type":["string","null"],"description":"Additional rules and requirements for the offer"}}}},"required":["en","de","es","fr","pt","ru","ja","ko","th","zh","id","it","pl"]},"tasks":{"type":"array","uniqueItems":true,"minItems":1,"description":"Present for CPE campaigns","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the task"},"uuid":{"type":"string","minLength":1,"description":"Persistent UUID for the task"},"event_name":{"type":"string","description":"Event name for the task"},"payout":{"type":"number","description":"Payout for the task"},"currency_amount":{"type":"number","description":"Payout in user currency for the task"},"conversion_limit":{"type":"number","description":"Maximum number of conversions for the task"},"single_conversion_per_day":{"type":"boolean","description":"Whether the task can be completed only once per day"},"max_conversion_time":{"type":"number","description":"Maximum time in seconds after install to complete this task. Null if no limit is configured."},"task_mode":{"type":"string","description":"How the task is completed. `\"single\"`: the event once. `\"multi\"`: the event up to `conversion_limit` times, every completion is rewarded. `\"streak\"`: the event on `streak_days` days; nothing is rewarded per day, `payout` is rewarded once when the streak is completed (`conversion_limit` is `1`). A day counts when it is at least 20 hours after the previous one. What happens after more than 48 hours without the event depends on the streak settings of the offer: by default the streak restarts at 0, otherwise the task ends as `\"expired\"`, or there is no time limit between the days.","enum":["single","multi","streak"]},"streak_days":{"type":["integer","null"],"description":"Number of days a streak task has to be done on, each at least 20 hours after the previous one. `null` for other tasks."},"i18n":{"type":"object","description":"Task name per language. Only the languages of the offer's target countries are filled (English always); every other language is `null`.","properties":{"en":{"type":"string","minLength":1},"de":{"type":["string","null"],"minLength":1},"es":{"type":["string","null"],"minLength":1},"fr":{"type":["string","null"],"minLength":1},"pt":{"type":["string","null"],"minLength":1},"ru":{"type":["string","null"],"minLength":1},"ja":{"type":["string","null"],"minLength":1},"ko":{"type":["string","null"],"minLength":1},"th":{"type":["string","null"],"minLength":1},"zh":{"type":["string","null"],"minLength":1},"id":{"type":["string","null"],"minLength":1},"it":{"type":["string","null"],"minLength":1},"pl":{"type":["string","null"],"minLength":1}},"required":["en","de","es","fr","pt","ru","ja","ko","th","zh","id","it","pl"]}},"required":["name","uuid","payout","currency_amount","conversion_limit","single_conversion_per_day","max_conversion_time"]}},"min_android_version":{"type":"string"},"min_ios_version":{"type":"string"},"max_android_version":{"type":"string"},"max_ios_version":{"type":"string"},"browser_requirements":{"type":"array","description":"Browser version requirements. Only browsers with at least one constraint are included.","items":{"type":"object","properties":{"browser":{"type":"string","description":"Browser name (chrome, firefox, safari, opera, yandex, edge, internet_explorer)"},"min_version":{"type":"string","nullable":true,"description":"Minimum required browser version"},"max_version":{"type":"string","nullable":true,"description":"Maximum allowed browser version"}}}},"has_installation_callback":{"type":"boolean"},"publisher_cpi_compensation":{"type":"boolean"},"rating":{"type":"string","nullable":true,"description":"App rating from app store (1-5 stars). null if not available."},"screenshots":{"type":"array","description":"Array of screenshot URLs from the app store. May be empty if not available.","items":{"type":"string","format":"uri"}}},"required":["id","store_id","landing_page","icon","name","description","platform","category","conversion_type","conversion_time","max_conversion_time","conversion_instructions","conversion_instructions_short","conversion_instructions_long","payout_usd","currency_amount","epc","daily_cap","tracking_link","created","start_date","end_date","offer_owner","score","tasks","offer_complexity","payment_required"]}}},"required":["status","num_offers","support_url","offers"]}}}}}}}}}
```


# CPE Offer Status

Retrieves cpe offers reward status information for the adslot by the given external identifier. The returned data includes the offer id, click id, publisher payment, shows completed and available task etc.

**\[DEPRECATED - REPLACE WITH REWARD STATUS API]**

Main difference being that instead pub payout values which were provided in USD in reward status api, values are given in virtual currency of the specific adslot from which offer was started.

**Attention:** Fields **click\_id**, **uuid** are not present in reward status api as permanent clicks are used and task identifier is event\_name which is unique per campaign.

```json
{"openapi":"3.1.0","info":{"title":"ayeT-Studios Publisher API Documentation","version":"1.30.0"},"tags":[{"name":"Static API","description":"The Static API is recommended only for special integrations, because not all campaigns are available without more sophisticated device match. If integrated, it should be called each 15-30 minutes to make sure our campaigns are still available, did not run into daily caps or changed targeting / bid. The \"Static API key\" for requests is adslot specific and available in the adslot details once approved by your account manager."}],"servers":[{"description":"Live Server","url":"https://www.ayetstudios.com"}],"paths":{"/offers/cpe_status/{adslot}":{"get":{"summary":"CPE Offer Status","tags":["Static API"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"description":"","type":"object","properties":{"status":{"type":"string","minLength":1},"num_offers":{"type":"number"},"offers":{"type":"object","required":["218819","218872"],"properties":{"218819":{"type":"object","required":["name","click_id","expiration_time","created","pub_payout","remaining_payout_usd","tasks"],"properties":{"name":{"type":"string","minLength":1},"click_id":{"type":"string","minLength":1},"expiration_time":{"type":"number"},"created":{"type":"string","minLength":1},"pub_payout":{"type":"number"},"remaining_payout_usd":{"type":"number"},"tasks":{"type":"array","uniqueItems":true,"minItems":1,"items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the task"},"uuid":{"type":"string","minLength":1,"description":"Persistent UUID for the task"},"event_name":{"type":"string","minLength":1,"description":"Event name set by advertiser"},"status":{"type":"string","minLength":1,"description":"Status of the task, the same as in the Offerwall API: `\"available\"`, `\"completed\"`, `\"unavailable\"` (can't be done yet: a once-a-day task already done today, conditions not met yet, minimum time since install not reached, or a streak task already done today that continues later) or `\"expired\"` (the streak ended after a too long gap, only with streak settings that end it)."},"num_conversions":{"type":"number","description":"Number of conversions for the task"},"pub_payout":{"type":"number","description":"Payout for the task"},"conversion_limit":{"type":"number","description":"Conversion limit for the task"},"single_conversion_per_day":{"type":"boolean","description":"If true, only one conversion per day is allowed"},"task_mode":{"type":"string","description":"`\"single\"`, `\"multi\"` or `\"streak\"`. A streak task has to be done on `streak_days` days and pays `pub_payout` once, when the streak is completed. A day counts when it is at least 20 hours after the previous one. What happens after more than 48 hours without the event depends on the streak settings of the offer: by default the streak restarts at 0, otherwise the task ends as `\"expired\"`, or there is no time limit between the days."},"streak_days":{"type":["integer","null"],"description":"Number of days a streak task has to be done on, each at least 20 hours after the previous one. `null` for other tasks."},"streak_progress":{"type":["integer","null"],"description":"Number of streak days the user has done so far. `null` for other tasks."},"i18n":{"type":"object","description":"Task name per language. Only the languages of the offer's target countries are filled (English always); every other language is `null`.","properties":{"en":{"type":"string","minLength":1},"de":{"type":["string","null"],"minLength":1},"es":{"type":["string","null"],"minLength":1},"fr":{"type":["string","null"],"minLength":1},"pt":{"type":["string","null"],"minLength":1},"ru":{"type":["string","null"],"minLength":1},"ja":{"type":["string","null"],"minLength":1},"ko":{"type":["string","null"],"minLength":1},"th":{"type":["string","null"],"minLength":1},"zh":{"type":["string","null"],"minLength":1},"id":{"type":["string","null"],"minLength":1},"it":{"type":["string","null"],"minLength":1},"pl":{"type":["string","null"],"minLength":1}},"required":["en","de","es","fr","pt","ru","ja","ko","th","zh","id","it","pl"]}},"required":["name","uuid","event_name","status","num_conversions","pub_payout","conversion_limit","single_conversion_per_day"]}}}},"218872":{"type":"object","required":["name","click_id","expiration_time","created","pub_payout","remaining_payout_usd","tasks"],"properties":{"name":{"type":"string","minLength":1},"click_id":{"type":"string","minLength":1},"expiration_time":{"type":"number"},"created":{"type":"string","minLength":1},"pub_payout":{"type":"number"},"remaining_payout_usd":{"type":"number"},"tasks":{"type":"array","uniqueItems":true,"minItems":1,"items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"uuid":{"type":"string","minLength":1},"event_name":{"type":"string","minLength":1,"description":"Event name set by advertiser"},"status":{"type":"string","minLength":1},"num_conversions":{"type":"number"},"pub_payout":{"type":"number"},"conversion_limit":{"type":"number"},"single_conversion_per_day":{"type":"boolean"},"task_mode":{"type":"string"},"streak_days":{"type":["integer","null"]},"streak_progress":{"type":["integer","null"]},"i18n":{"type":"object","description":"Task name per language. Only the languages of the offer's target countries are filled (English always); every other language is `null`.","properties":{"en":{"type":"string","minLength":1},"de":{"type":["string","null"],"minLength":1},"es":{"type":["string","null"],"minLength":1},"fr":{"type":["string","null"],"minLength":1},"pt":{"type":["string","null"],"minLength":1},"ru":{"type":["string","null"],"minLength":1},"ja":{"type":["string","null"],"minLength":1},"ko":{"type":["string","null"],"minLength":1},"th":{"type":["string","null"],"minLength":1},"zh":{"type":["string","null"],"minLength":1},"id":{"type":["string","null"],"minLength":1},"it":{"type":["string","null"],"minLength":1},"pl":{"type":["string","null"],"minLength":1}},"required":["en","de","es","fr","pt","ru","ja","ko","th","zh","id","it","pl"]}},"required":["name","uuid","event_name","status","num_conversions","pub_payout","conversion_limit","single_conversion_per_day"]}}}}}}},"required":["status","num_offers","offers"]}}}}},"operationId":"get-offers-cpe_status-adslot","deprecated":true,"description":"Retrieves cpe offers reward status information for the adslot by the given external identifier.\nThe returned data includes the offer id, click id, publisher payment, shows completed and available task etc.\n\n**[DEPRECATED - REPLACE WITH REWARD STATUS API]**\n\nMain difference being that instead pub payout values which were provided in USD in reward status api, values are given in virtual currency of the specific adslot from which offer was started.\n\n**Attention:**\nFields **click_id**, **uuid** are not present in reward status api as permanent clicks are used and task identifier is event_name which is unique per campaign.","parameters":[{"schema":{"type":"string"},"in":"query","name":"apiKey","required":true,"description":"static api key that is available under adslot details in your dashboard"},{"schema":{"type":"string"},"in":"query","name":"external_identifier","required":true}]}}}}
```


# Reward Status API


# The Reward Status API

The Reward Status API provides publishers with detailed information about a user’s reward progress across all campaigns they have interacted with. It is designed to return the reward status for every campaign the user has clicked on, along with user meta-information and campaign task progress. Based on campaign maximal conversion time and conversions of offers tasks status will be updated over time. Offers are removed from reward status api after clicks expire which is roughly a year after maximal time allowed for offer completion has expired.

Response Description The API returns a JSON object with two main sections:

user – containing metadata about the user

reward\_status – containing the reward progress for each campaign the user has clicked on

Below is the detailed structure.

```json
{"openapi":"3.1.0","info":{"title":"ayeT-Studios Publisher API Documentation","version":"1.30.0"},"tags":[{"name":"Reward Status API"}],"servers":[{"description":"Live Server","url":"https://www.ayetstudios.com"}],"paths":{"/rest/v1/userSupport/get_reward_status?placementId={placement_id}&externalIdentifier={external_identifier}":{"get":{"summary":"The Reward Status API","tags":["Reward Status API"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"integer","description":"User id assigned to them by ayeT-Studios platform"},"external_identifier":{"type":"string","description":"Users external identifier selected by the publisher"},"publisher_id":{"type":"integer","description":"Publishers Id on the ayeT-Studios platform"},"publisher_placement_id":{"type":"integer","description":"Publishers placement Id on the ayeT-Studios platform"},"user_language":{"type":"string","description":"User Language used for the reward status instructions (defaults to English if desired language resources are not available)"}}},"reward_status":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","description":"Status of the offer:\n  * **started** – user clicked the offer\n  * **in_progress** – we have confirmed activity from advertiser\n  * **rewarded** – at least one task has converted\n  * **completed** – every task is fully done, or the campaign max conversion time expired with at least one conversion\n  * **expired** – campaign max conversion time expired with no conversions\n","enum":["started","in_progress","rewarded","completed","expired"]},"campaign_id":{"type":"integer","description":"Campaign ID on ayeT-Studios Platform "},"campaign_type":{"type":"string","description":"Possible values:\n- **cpi** – cost per install\n- **cpa** – cost per action\n- **cpe** – cost per engagement","enum":["cpi","cpa","cpe"]},"platform":{"type":"string","description":"Possible values:\n- **web** - all platforms allowed\n- **ios** - requires ios device\n- **android** - requires android device","enum":["web","ios","android"]},"traffic":{"type":"array","items":{"type":"string"},"description":"Possible values in the array:\n- **desktop** – traffic from any device allowed\n- **android** – requires android device\n- **ios** – requires ios device","enum":["desktop","android","ios"]},"name":{"type":"string","description":"Campaign name as set on ayeT-Studios Platform"},"icon":{"type":"string","description":"Campaign icon as set on ayeT-Studios Platform"},"landing_page":{"type":"string","description":"Campaign landing page as set on ayeT-Studios Platform"},"total_reward_amount":{"type":"string","description":"Maximal possible virtual currency amount reward for selected offer."},"rewarded_amount":{"type":"string","description":"Virtual currency amount rewarded to user so for selected offer."},"short_instruction":{"type":"string","description":"Campaign short instruction as set on ayeT-Studios Platform"},"long_instruction":{"type":"string","description":"Campaign long instruction as set on ayeT-Studios Platform"},"introduction":{"type":"string","description":"Campaign instruction as set on ayeT-Studios Platform"},"rules_requirements":{"type":"string","description":"Optionally offers might have additional rules and requirements, that will be listed here."},"currency_singular":{"type":"string","description":"Virtual currency singular string as defined in adslot options."},"currency_plural":{"type":"string","description":"Virtual currency plural string as defined in adslot options."},"decimal_places":{"type":"integer","description":"Decimal places as defined in the adslot options modal."},"reward_currency":{"oneOf":[{"$ref":"#/components/schemas/RewardCurrency"},{"type":"null"}],"description":"Currency of the adslot the user started this offer in, the currency its amounts are in. A placement can have adslots with different currencies. `null` when that adslot no longer exists."},"is_support_allowed":{"type":"boolean","description":"Offers have requirements that need to be met for support to be allowed, this option shows if they have been fulfilled. "},"support_message":{"type":"string","description":"Support message based on the current offer conditions."},"support_url":{"type":"string","description":"Support url user can use to submit support ticket."},"days_left":{"type":["integer","null"],"description":"Offers have maximal time within they need to convert in order to be eligable for a reward, this shows the whole days left until `expiration_time`: `0` with less than a day left, `null` once it passed or when the offer has no time limit. "},"click_time":{"type":"integer","description":"Timestamp value for when click was detected on ayeT-Studios platform. "},"activity_tracked":{"type":"integer","description":"Timestamp value for when activity tracked callback was received by ayeT-Studios platform. "},"expiration_time":{"type":"integer","description":"Timestamp value after which reward is no longer possible, the deadline the conversion engine enforces. `0` when the offer has no time limit. "},"store_id":{"type":"string","description":"App store ID (e.g., com.app.name)."},"tags":{"type":"object","description":"Contains tab, categories, tasks arrays. ","properties":{"tab":{"type":"string","description":"Shows tab to which offer belongs. `\"apps\"`, `\"surveys\"`, `\"tasks\"`","enum":["apps","surveys","tasks"]},"categories":{"type":"array","description":"List all categories associated with that campaign. "},"tasks":{"type":"array","items":{"type":"string"},"description":"'The tasks that are available in the offer. Possible values: `\"view\"`, `\"click\"`, `\"install\"`, `\"registration\"`, `\"free_trial\"`, `\"survey\"`, `\"engagement\"`, `\"multi_engagement\"`, `\"subscription\"`, `\"purchase\"`, `\"quiz\"`, `\"sweepstake\"`, `\"credit_card_submit\"`, `\"reward_program\"`, `\"gambling\"`, `\"sensitive_content\"`'"}}},"icon_large":{"type":"string","description":"Large icon URL. "},"video_url":{"type":"string","description":"Video preview URL. "},"video_url_vp9":{"type":"string","description":"VP9 video format URL. "},"devices":{"type":"array","items":{"type":"string"},"description":"Supported device types are in addition to traffic rules:\n - **phone** –  phone device allowed\n - **tablet** – tablet device allowed\n - **pc** – pc device allowed\n - **mac** – mac device allowed","enum":["phone","tablet","pc","mac"]},"category":{"type":"string","description":"Offer category (e.g., incent). "},"offer_owner":{"type":"integer","description":"Advertiser ID 0 for ayeT-Studios Offers. "},"offer_complexity":{"type":"string","description":"Complexity indicator. "},"has_installation_callback":{"type":"boolean","description":"Installation callback supported. "},"rating":{"type":"string","nullable":true,"description":"App store rating. "},"screenshots":{"type":"array","items":{"type":"string"},"description":"App screenshot URLs."},"tasks":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","description":"The task UUID. "},"name":{"type":"string","description":"Task name on ayeT-Studios platform. "},"event_name":{"type":"string","description":"Event name as defined by advertiser on ayeT-Studios platform. "},"type":{"type":"string","description":"The type of the task. Possible values: `\"normal\"`, `\"bonus\"`, `\"turbo\"`, `\"retention\"`, `\"purchase\"`","enum":["normal","bonus","turbo","retention","purchase"]},"support_allowed":{"type":"boolean","description":"Support allowed shows are all required conditions been met for support ticket submition for this task. "},"total_reward_amount":{"type":"string","description":"Virtual currency value total possible payout for specific task."},"rewarded_amount":{"type":"string","description":"Virtual currency value rewarded so far for specific task."},"currency_value":{"type":"string","description":"Virtual currency value as defined in adslot options for specific task."},"converted":{"type":"boolean","description":"Was there at least 1 conversion detected for a specific task. A repeatable task can be converted without being done, see `status`."},"conversion_limit":{"type":"integer","description":"Number of conversions allowed for specific task."},"num_conversions":{"type":"integer","description":"Number of conversions detected for specific task."},"single_conversion_per_day":{"type":"boolean","description":"Is only one conversion allowed per day for specific task."},"remaining_time":{"type":"integer","nullable":true,"description":"Remaining time in seconds during which user can complete the task, counted from when the offer was started. 0 if the task is completed, its time ran out or the offer ended."},"max_conversion_time":{"type":"integer","nullable":true,"description":"Optionally tasks have maximal conversion time limitation placed on them, time is in seconds since install."},"timestamp":{"type":"integer","description":"Timestamp of last conversion for this task."},"task_mode":{"type":"string","description":"How the task is completed: `\"single\"`, `\"multi\"` or `\"streak\"`. A streak task has to be done on `streak_days` days; it has no conversion (`converted` is `false`) until the streak is completed, then the full reward is paid once. A day counts when it is at least 20 hours after the previous one. What happens after more than 48 hours without the event depends on the streak settings of the offer: by default the streak restarts at 0, otherwise the task ends as `\"expired\"`, or there is no time limit between the days.","enum":["single","multi","streak"]},"streak_days":{"type":["integer","null"],"description":"Number of days a streak task has to be done on, each at least 20 hours after the previous one. `null` for other tasks."},"streak_progress":{"type":["integer","null"],"description":"Number of streak days the user has done so far, `0` if the streak was not started or has restarted. `null` for other tasks."},"status":{"type":["string","null"],"description":"Status of the task: `\"available\"`, `\"completed\"` (fully done, for a repeatable task all `conversion_limit` conversions), `\"unavailable\"` (a locked bonus task, or a task that can't be done yet: a once-a-day task already done today, conditions not met yet, minimum time since install not reached, or a streak task already done today that continues later) or `\"expired\"` (the time limit of the task ran out before it was done, or a streak ended after a too long gap)."}}}}}}}}}}}}},"operationId":"get-rest-v1-userSupport-get_reward_status","parameters":[{"schema":{"type":"integer"},"in":"query","name":"placementId","description":"Placement Id to which user belongs","required":true},{"schema":{"type":"string"},"in":"query","name":"externalIdentifier","description":"Users External Identifier ","required":true},{"schema":{"type":"string"},"in":"query","name":"language","description":"ISO 2 letter language code optional (if not supplied we determine language based on browser preferences)"}],"description":"The Reward Status API provides publishers with detailed information about a user’s reward progress across all campaigns they have interacted with.\nIt is designed to return the reward status for every campaign the user has clicked on, along with user meta-information and campaign task progress. Based on campaign maximal conversion time and conversions of offers tasks status will be updated over time. Offers are removed from reward status api after clicks expire which is roughly a year after maximal time allowed for offer completion has expired.\n\nResponse Description\nThe API returns a JSON object with two main sections:\n\nuser – containing metadata about the user\n\nreward_status – containing the reward progress for each campaign the user has clicked on\n\nBelow is the detailed structure."}}},"components":{"schemas":{"RewardCurrency":{"description":"Currency settings of the adslot a started offer is shown in, to render its amounts like the offerwall does.","type":"object","properties":{"virtual_currency_singular":{"type":"string","description":"Currency name for an amount of exactly 1."},"virtual_currency_plural":{"type":"string","description":"Currency name for other amounts."},"virtual_currency_decimal_places":{"type":"integer","description":"Decimal places of the amounts."},"virtual_currency_display_type":{"type":"string","description":"How the currency is shown next to an amount: `\"none\"` (amount only), `\"text\"` (currency name) or `\"icon\"` (`virtual_currency_icon`).","enum":["none","text","icon"]},"virtual_currency_icon":{"type":"string","description":"Currency icon URL, empty when the adslot has no icon."},"currency_text_icon_prepend_append":{"type":"string","description":"Whether the currency name or icon goes before (`\"prepend\"`) or after (`\"append\"`) the amount.","enum":["prepend","append"]},"hide_plus":{"type":"boolean","description":"Do not show a plus sign before reward amounts."},"hide_value":{"type":"boolean","description":"Do not show the amount, only the currency."}},"required":["virtual_currency_singular","virtual_currency_plural","virtual_currency_decimal_places","virtual_currency_display_type","virtual_currency_icon","currency_text_icon_prepend_append","hide_plus","hide_value"]}}}}
```


# Surveywall API

The Surveywall API provides a solution for publishers who want to include a surveywall in their application/website, but have control over the presentation of the surveys. All surveys matching the parameters provided will be returned and can be displayed to the user. The Surveywall API supports both server and client-side calls.

We provide an SDK to easily integrate the API into your website. You can find an example here: <https://jsbin.com/nizusojeke/edit?html,output>

If you want to modify the SDK to fit your needs, you can find the source code here: <https://cdn.ayet.io/offerwall/js/ayetsurveywallapisdk\\_source.js>


# Surveywall API

Retrieve surveys matching the provided parameters

This endpoint can be called client-side or server-side. The targeting and ip parameter are required when calling the endpoint server-side.

The following parameters are recommended:\
`[ip] + language + user_agent + client_hints`

`client_hints` can be obtained in a secure (SSL) browser context - please check the example to the right.

If you call the Surveywall API in a non-browser-context were a valid user agent is not available, you can use these parameters instead:

* `ip + targeting + language` (Android & iOS devices)

You may choose to omit the ip, targeting, user\_agent, client\_hints and language if you call the API client-side inside a browser. In this case, we will use the ip, user agent and language of the user's device.

**Examples:**

* **Non-browser context (e.g. In-App)**: ip, targeting, language
* **Browser context, client-side (e.g. Javascript XHTTP/fetch request)**: \[client\_hints]
* **Browser context, server-side (e.g. PHP curl request)**: ip, language, user\_agent, \[client\_hints]

**Attention:** Check the list below for the correct input format of the available parameters.

Surveys work by matching a respondent to a specific survey. A survey may only accept respondents with a certain demographic (e.g., only women, age 18-35, own a dog). We do the targeting and ask respondents for this information. If a user has not previously completed a profile, we will ask them a few initial profiling questions when they first click on a survey link from the Surveywall API. We provide you with the number of initial profiling questions at `profiler.missing_profiler_qualifications`.

Certain surveys may require more specific questions: we list the number of missing survey specific questions for each survey under `missing_qualifications`.

Publishers can choose to ignore the missing question information or display the number to the user. However, the questions are always asked by us - the publisher doesn't have to worry about asking the user.

```json
{"openapi":"3.1.0","info":{"title":"ayeT-Studios Publisher API Documentation","version":"1.30.0"},"tags":[{"name":"Surveywall API","description":"The Surveywall API provides a solution for publishers who want to include a surveywall in their application/website, but have control over the presentation of the surveys. All surveys matching the parameters provided will be returned and can be displayed to the user. The Surveywall API supports both server and client-side calls.\n\nWe provide an SDK to easily integrate the API into your website. You can find an example here: https://jsbin.com/nizusojeke/edit?html,output\n\n\nIf you want to modify the SDK to fit your needs, you can find the source code here: https://cdn.ayet.io/offerwall/js/ayetsurveywallapisdk_source.js\n"}],"servers":[{"description":"Live Server","url":"https://www.ayetstudios.com"}],"paths":{"/surveys/surveywall_api/{adslot}":{"get":{"summary":"Surveywall API","tags":["Surveywall API"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success","error"]},"filters":{"type":"object","description":"The filters you provided as parameters or applied from the adslot configuration","properties":{"targeting":{"type":"string"},"ip":{"type":"string"},"num_surveys":{"type":"integer"},"survey_sorting":{"type":"string"},"minimum_payout":{"type":"number"},"user_agent":{"type":"string"},"client_hints":{"type":"string"},"language":{"type":["string","array"],"items":{"type":"string"}}}},"surveywall":{"type":"object","properties":{"name":{"type":"string"},"currency_name_singular":{"type":"string"},"currency_name_plural":{"type":"string"},"currency_sale":{"type":"boolean"},"currency_sale_multiplier":{"type":"integer"},"currency_sale_end":{"type":"string","description":"null if no end date is specified or a datetime on which the currency sale ends","format":"date-time","nullable":true}}},"profiler":{"type":"object","properties":{"missing_profiler":{"type":"boolean","description":"Whether the user has already completed the initial survey profiler questions"},"missing_profiler_qualifications":{"type":"integer","description":"The count of initial survey profiler questions missing"}}},"surveys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"cpi":{"type":"number","description":"The value of your virtual currency the user receives for a successful complete"},"loi":{"type":"integer","description":"The length of interview in minutes; the expected time to complete the survey"},"category":{"type":"string","enum":["automotive","beauty","education","entertainment","fashion","finance","food","games","health","home and garden","lifestyle","pets","shopping","technology","miscellaneous"]},"remaining_completes":{"type":"integer","description":"How many completes are still remaining for this survey"},"is_new":{"type":"boolean","description":"Whether the survey is new (was just created)"},"cr":{"type":"number","description":"Estimated conversion rate for the survey (0-1 scale, 3 decimal places, e.g. 0.234 = 23.4%)"},"missing_qualifications":{"type":"integer","description":"The amount of survey specific profiling questions missing (excluding any missing initial profiler questions)"},"url":{"type":"string","description":"The url you should send the user to, to start the survey"},"cpi_base":{"type":"number","description":"Only available if a currency sale is running: the payout for the user in virtual currency without the currency sale applied"},"category_icon_svg":{"type":"string","description":"Icon for this category as static svg"},"category_icon_gif":{"type":"string","description":"Icon for this category as animated gif"}}}}}}}}},"401":{"description":"Unauthorized\nProfiling data was appended to the URL, but the hash signature doesn't match. Please see https://docs.ayet.io/publishers/surveywall/api/#pass-profiling-answers-optional for more information."}},"operationId":"get-surveys-surveywall_api-adslot","description":"Retrieve surveys matching the provided parameters\n\nThis endpoint can be called client-side or server-side. The targeting and ip parameter are required when calling the endpoint server-side.\n\nThe following parameters are recommended:<br>\n`[ip] + language + user_agent + client_hints`\n\n`client_hints` can be obtained in a secure (SSL) browser context - please check the example to the right.\n\nIf you call the Surveywall API in a non-browser-context were a valid user agent is not available, you can use these parameters instead:\n- `ip + targeting + language` (Android & iOS devices)\n\nYou may choose to omit the ip, targeting, user_agent, client_hints and language if you call the API client-side inside a browser. In this case, we will use the ip, user agent and language of the user's device.\n\n##### Examples:\n- __Non-browser context (e.g. In-App)__: ip, targeting, language\n- __Browser context, client-side (e.g. Javascript XHTTP/fetch request)__: [client_hints]\n- __Browser context, server-side (e.g. PHP curl request)__: ip, language, user_agent, [client_hints]\n\n**Attention:** Check the list below for the correct input format of the available parameters.\n\nSurveys work by matching a respondent to a specific survey. A survey may only accept respondents with a certain demographic (e.g., only women, age 18-35, own a dog). We do the targeting and ask respondents for this information.\nIf a user has not previously completed a profile, we will ask them a few initial profiling questions when they first click on a survey link from the Surveywall API. We provide you with the number of initial profiling questions at `profiler.missing_profiler_qualifications`.\n\nCertain surveys may require more specific questions: we list the number of missing survey specific questions for each survey under `missing_qualifications`.\n\nPublishers can choose to ignore the missing question information or display the number to the user. However, the questions are always asked by us - the publisher doesn't have to worry about asking the user.","parameters":[{"schema":{"type":"string"},"in":"query","name":"external_identifier","description":"External identifier","required":true},{"schema":{"type":"string","enum":["desktop","android_phone","android_tablet","ios_phone","ios_tablet"]},"in":"query","name":"targeting","description":"The device type. If this parameter is not provided, we try to detect the device type based on the user agent."},{"schema":{"type":"string"},"in":"query","name":"ip","description":"IP address of the user (if called server-side)"},{"schema":{"type":"integer","default":20},"in":"query","name":"num_surveys","description":"Number of surveys to return"},{"schema":{"type":"string","enum":["loi","payout","cr","eepm","cph"]},"in":"query","name":"survey_sorting","description":"Specify the key for sorting<br>loi: Sort by Length Of Interview<br>payout: Sort by Payout<br>cr: Sort by Conversion Rate<br>eEPM: Sort by Estimated Earnings per Minute<br>cph: Sort by Completes per Hour<br><br>If no value is provided, the selected sorting method for the adslot will be used."},{"schema":{"type":"number"},"in":"query","name":"minimum_payout","description":"Minimum payout of surveys to return<br><br>If no value is provided, the selected minimum payout for the adslot will be used."},{"schema":{"type":"string"},"in":"query","name":"custom_1","description":"Custom parameter to pass variables to the conversion callbacks"},{"schema":{"type":"string"},"in":"query","name":"custom_2","description":"Custom parameter to pass variables to the conversion callbacks"},{"schema":{"type":"string"},"in":"query","name":"custom_3","description":"Custom parameter to pass variables to the conversion callbacks"},{"schema":{"type":"string"},"in":"query","name":"custom_4","description":"Custom parameter to pass variables to the conversion callbacks"},{"schema":{"type":"string"},"in":"query","name":"custom_5","description":"Custom parameter to pass variables to the conversion callbacks"},{"schema":{"type":"string"},"in":"query","name":"language","description":"The browser/device languages of the user. Comma-separated list of ISO 639-1 codes (e.g. en,fr,de) or request header value of https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language"},{"schema":{"type":"string"},"in":"query","name":"user_agent","description":"User agent of user's browser"},{"schema":{"type":"string"},"in":"query","name":"client_hints","description":"Client hints of user's browser if existent, otherwise empty string"},{"schema":{"type":"string"},"in":"query","name":"q{questionId}","description":"Profiling question answers. Format: q{survey_profilers.id}={answer}. For text questions, provide the text value. For select questions, provide survey_profiler_multiples.id value(s). Multiple answers separated by commas. Requires hash parameter for validation.\\nReview this documentation for profiling integration guidance and how to obtain the current list of available questions: https://docs.ayet.io/publishers/surveywall/api/#pass-profiling-answers-optional"},{"schema":{"type":"string"},"in":"query","name":"hash","description":"HMAC-SHA256 hash for validating profiling question parameters. Required when using q{questionId} parameters. Hash calculated using: hash_hmac(\"sha256\", http_build_query(sorted_params_excluding_hash), Profiling Data Validation Hash)"}]}}}}
```


# Publisher Get Ads Txt API


# Publisher Get Ads Txt API

Allows publishers to retrieve the current (raw) ads.txt file.

```json
{"openapi":"3.1.0","info":{"title":"ayeT-Studios Publisher API Documentation","version":"1.30.0"},"tags":[{"name":"Publisher Get Ads Txt API"}],"servers":[{"description":"Live Server","url":"https://www.ayetstudios.com"}],"paths":{"/api2/publisher/placements/get_ads_txt":{"get":{"summary":"Publisher Get Ads Txt API","tags":["Publisher Get Ads Txt API"],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"description":"","type":"object","properties":{"status":{"type":"string","minLength":1},"errorCode":{"type":"number"},"errorMessage":{"type":"string","minLength":1}},"required":["status","errorCode","errorMessage"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"","type":"object","properties":{"status":{"type":"string","minLength":1},"errorCode":{"type":"number"},"errorMessage":{"type":"string","minLength":1}},"required":["status","errorCode","errorMessage"]}}}}},"operationId":"get-ads-txt-file","description":"Allows publishers to retrieve the current (raw) ads.txt file.","parameters":[{"schema":{"type":"integer"},"in":"query","name":"placementId","description":"Placement ID","required":true},{"schema":{"type":"string"},"in":"query","name":"hash","description":"hash for privacy reasons (can be retrieved in the ads txt tab in the placement settings modal)","required":true}]}}}}
```


# Publisher Reporting API

Our Publisher Reporting API allows publishers with and without adserver functionality to retrieve detailed statistics on their placement & adslot performance.


# Publisher Reporting API

Retrieves all statistics for the account for the given date range and filtered by optional parameters. The returned data includes the impressions, clicks, conversions, revenue etc. statistics for the specified date range for each day grouped by country. If optional parameters (placements, adslots, etc.) are set, only metrics matching those parameters will be returned.

The `adserver_fees` field reports the adserver fees charged in USD and is always present on placement, adslot and network statistics for both offerwall and rewarded video. It is `0` whenever no adserver fee applies, for example on ayeT-Studios owned networks.

The `is_ayet_managed` field of the network statistics reports the type of each network. It is `true` for `ayetstudios` and for the rewarded video partner networks whose demand is managed by ayeT-Studios, and `false` for the partner networks you run through your own adserver.

**Attention:** Requests to the reporting module are limited to *20 calls per hour*.

```json
{"openapi":"3.1.0","info":{"title":"ayeT-Studios Publisher API Documentation","version":"1.30.0"},"tags":[{"name":"Publisher Reporting API","description":"Our Publisher Reporting API allows publishers with and without adserver functionality to retrieve detailed statistics on their placement & adslot performance."}],"servers":[{"description":"Live Server","url":"https://www.ayetstudios.com"}],"paths":{"/api2/publisher/reporting":{"get":{"summary":"Publisher Reporting API","tags":["Publisher Reporting API"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"description":"","type":"object","properties":{"status":{"type":"string","minLength":1},"filters":{"type":"object","required":["startDate","endDate"],"properties":{"startDate":{"type":"string","minLength":1},"endDate":{"type":"string","minLength":1},"placements":{"type":"array","items":{"type":"string"}}}},"data":{"type":"object"}},"required":["status","filters","data"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"description":"","type":"object","properties":{"status":{"type":"string","minLength":1},"errorCode":{"type":"number"},"errorMessage":{"type":"string","minLength":1}},"required":["status","errorCode","errorMessage"]}}}},"403":{"description":"Configurationerror","content":{"application/json":{"schema":{"description":"","type":"object","properties":{"status":{"type":"string","minLength":1},"errorCode":{"type":"number"},"errorMessage":{"type":"string","minLength":1}},"required":["status","errorCode","errorMessage"]}}}},"429":{"description":"Toomanyrequests","content":{"application/json":{"schema":{"description":"","type":"object","properties":{"status":{"type":"string","minLength":1},"errorCode":{"type":"number"},"errorMessage":{"type":"string","minLength":1}},"required":["status","errorCode","errorMessage"]}}}}},"operationId":"get-publisher-reporting","description":"Retrieves all statistics for the account for the given date range and filtered by optional parameters.\nThe returned data includes the impressions, clicks, conversions, revenue etc. statistics for the specified date range for each day grouped by country. If optional parameters (placements, adslots, etc.) are set, only metrics matching those parameters will be returned.\n\nThe `adserver_fees` field reports the adserver fees charged in USD and is always present on placement, adslot and network statistics for both offerwall and rewarded video. It is `0` whenever no adserver fee applies, for example on ayeT-Studios owned networks.\n\nThe `is_ayet_managed` field of the network statistics reports the type of each network. It is `true` for `ayetstudios` and for the rewarded video partner networks whose demand is managed by ayeT-Studios, and `false` for the partner networks you run through your own adserver.\n\n**Attention:** Requests to the reporting module are limited to _20 calls per hour_.","parameters":[{"schema":{"type":"string"},"in":"query","name":"startDate","required":true,"description":"The start date for the statistics retrieval"},{"schema":{"type":"string"},"in":"query","name":"endDate","description":"The end date for the statistics retrieval","required":true},{"schema":{"type":"array","items":{"type":"integer"}},"in":"query","name":"placements[]","description":"Placements to get reports for"},{"schema":{"type":"array","items":{"type":"integer"}},"in":"query","name":"adslots[]","description":"Adslots to get reports for"},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"adsource[]","description":" names of your configured partner networks (adserver customers only)"},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"adformat[]"},{"schema":{"type":"array","items":{"type":"string"}},"in":"query","name":"countries[]"},{"schema":{"type":"string"},"in":"query","name":"optional_parameter","description":"Filters statistics with a specific subtype (works only on Rewarded Video Adslots and if a optionalParameter is set/supplied in AyetVideoSdk.init(...) when initializing)"},{"schema":{"type":"string"},"in":"query","name":"apiKey","description":"Your publisher api key (under account settings in dashboard)","required":true}]}}}}
```




---

[Next Page](https://docs.ayetstudios.com/v/llms-full.txt/1)

