# Welcome To Perkox

Welcome to Perkox, your go-to solution for performance marketing and adtech tools. Whether you're a publisher, advertiser, or partner, this guide will help you understand how to get started and make the most of Perkox's platform.

### What is Perkox?

Perkox is a cutting-edge marketing performance agency and adtech solution provider, offering a range of tools for advertisers and publishers. We specialize in monetization and user engagement through our Offerwall platform, designed to provide advanced tracking, analytics, and full control via API and SDK integrations.

### Key Features of Perkox:

* **Offerwall Solution**: Perkox's customizable Offerwall platform uses AI to optimize user engagement and monetization, allowing for seamless integration with your app or website.
* **Advanced Analytics**: Gain insights into user behavior and campaign performance with detailed reporting and analytics.
* **Publisher & Advertiser Dashboards**: Easy-to-use dashboards designed for both publishers and advertisers, providing complete control and transparency over campaigns.
* **Referral System**: Our platform supports a referral system for publishers to incentivize growth and engagement.
* **Fraud Detection**: Perkox employs advanced fraud detection algorithms to ensure clean traffic and protect your campaigns from fraudulent activity.

### How to Get Started

1. **Sign Up**: Visit the Perkox website and create an account. Once registered, you'll have access to your dashboard, where you can manage your campaigns, track user activity, and explore various monetization tools.
2. **Set Up Offerwall**: If you're a publisher, you can easily set up and customize your Offerwall by integrating our iFrame or SDK or API into your app or website. Our platform provides extensive documentation and support to help you through the process.
3. **Create Campaigns**: Advertisers can create and manage ad campaigns directly from the dashboard. Set your target audience, track conversions, and optimize performance with real-time data.
4. **Referral System**: Leverage our referral system to invite other publishers to join Perkox. You can track referrals and earnings through the dashboard.
5. **Fraud Protection**: Perkox ensures that your campaigns are protected with fraud detection algorithms, monitoring all traffic to maintain quality.

### Support and Resources

If you need help along the way, our support team is here for you. Visit the help center, check out the Perkox documentation, or reach out to our team for personalized assistance.

Start maximizing your revenue and user engagement today with Perkox!

### Jump right in

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Getting Started</strong></td><td>Create your first site</td><td></td><td></td><td><a href="/getting-started/apps/quickstart">Offerwall Quickstart</a></td></tr><tr><td><strong>Basics</strong></td><td>Learn the basics of GitBook</td><td></td><td></td><td><a href="broken://pages/7aUFmnCMx9m4smGncsXL">Broken link</a></td></tr><tr><td><strong>Publish your docs</strong></td><td>Share your docs online</td><td></td><td></td><td><a href="/getting-started/postback/docs">Postback Parameters for Tracking</a></td></tr></tbody></table>


# Account Creation

The **Signup Process** for creating a publisher account on Perkox involves several steps to collect necessary information about the user and their application. Below is a breakdown of each step and its components:

***

### **Step 1: Contact Information**

This step collects basic contact information to set up the account.

#### **Fields in the Contact Information Section**:

* **Email**: Enter your email address (e.g., `johndoe@example.com`).
* **Phone**: Enter your phone number.
* **Messenger**: Select your preferred messaging app (e.g., Skype).
* **Messenger ID**: Enter your ID for the selected messaging app.

#### **Example Workflow**:

1. Enter your email address.
2. Provide your phone number.
3. Select your preferred messenger and enter your Messenger ID.
4. Click **Next** to proceed to the next step.

***

<figure><img src="https://852195915-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu0RqI0ASoELMpNHq8lgd%2Fuploads%2Fqy58fMcFfbmU2jUMXkl0%2FSignup1.png?alt=media&amp;token=a7dafd19-ab8b-4ca5-a8fb-3fba6cb88e4b" alt=""><figcaption></figcaption></figure>

### **Step 2: Personal Information**

This step collects personal details to complete the profile.

#### **Fields in the Personal Information Section**:

* **First Name**: Enter your first name.
* **Last Name**: Enter your last name.
* **Street Address**: Enter your street address.
* **City**: Enter your city.

#### **Example Workflow**:

1. Enter your first and last name.
2. Provide your street address and city.
3. Click **Next** to proceed to the next step.

***

### **Step 3: Additional Information**

This step collects additional details about the user and their application.

#### **Fields in the Additional Information Section**:

* **How did you find out about PerkOx?**: Enter how you discovered PerkOx.
* **What is your DAU (Daily Active Users)?**: Enter the number of daily active users for your app or website.
* **What is the URL of your website or app?**: Provide the URL of your website or app.
* **How Did You Hear About Us**: Enter additional details about how you heard about PerkOx.

#### **Example Workflow**:

<figure><img src="https://852195915-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu0RqI0ASoELMpNHq8lgd%2Fuploads%2Fp7R4v0dbCuDYK8jTZZX5%2Fsignup%202.png?alt=media&amp;token=f01df6cc-0a1c-4792-94bf-739f35ea8b2f" alt=""><figcaption></figcaption></figure>

1. Explain how you found out about PerkOx.
2. Enter your app’s daily active users (DAU).
3. Provide the URL of your website or app.
4. Share any additional information about how you heard about PerkOx.
5. Click **Next** to proceed to the next step.

***

### **Step 4: Security**

This step involves setting up security details for the account.

#### **Fields in the Security Section**:

* **Password**: Create a strong password for your account.
* **Confirm Password**: Re-enter your password to confirm.

#### **Example Workflow**:

1. Create a strong password.
2. Re-enter the password to confirm.
3. Click **Next** to complete the signup process.

***

### **Navigation Options**

* **Back**: Go back to the previous step to make changes.
* **Next**: Proceed to the next step.
* **Already have an account? Login now**: If you already have an account, click this link to log in instead.

***

### **Why the Signup Process Matters**

* **Account Setup**: Collects all necessary information to create a publisher account.
* **Personalization**: Ensures the account is tailored to the user’s needs and preferences.
* **Security**: Sets up a secure password to protect the account.

***

### **Additional Notes**

* **Data Accuracy**: Ensure all information is accurate to avoid issues with account verification or communication.
* **Security Practices**: Use strong, unique passwords to protect your account.


# Web Offerwall Integration

## Perkox Web Offerwall Integration

The **Perkox Web Offerwall** allows publishers to integrate the Perkox Offerwall into a web application, website, or web-based reward experience.

You can integrate the offerwall in two ways:

1. **Direct Link Integration** — redirect users to the Perkox Offerwall.
2. **iFrame Integration** — embed the Perkox Offerwall directly inside your web page.

Both methods require your **App ID** and a unique **Player ID** for each user.

***

## Integration URL

The Perkox Web Offerwall uses the following base URL:

```
https://perkwall.com
```

Example URL:

```
https://perkwall.com?app_id={YOUR_APP_ID}&player_id={YOUR_PLAYER_ID}&click_id={YOUR_CLICK_ID}
```

***

<figure><img src="https://852195915-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu0RqI0ASoELMpNHq8lgd%2Fuploads%2FEVeSY0NkrtesrFFBAcLl%2FScreenshot%202026-06-21%20at%209.20.25%E2%80%AFPM.png?alt=media&amp;token=3cf74d32-1d83-40bc-9889-c2b75be70300" alt=""><figcaption></figcaption></figure>

## Required Parameters

| Parameter   | Description                                        | Required |
| ----------- | -------------------------------------------------- | -------- |
| `app_id`    | Your unique Perkox App ID                          | Yes      |
| `player_id` | Unique ID of the user inside your platform         | Yes      |
| `click_id`  | Optional tracking ID for click/session attribution | No       |

***

## Parameter Details

### `app_id`

Your `app_id` identifies your app or property inside Perkox.

You can find your App ID inside the Perkox Publisher Dashboard under your app/property integration settings.

Example:

```
app_id=83f34460********
```

***

### `player_id`

The `player_id` is the unique user identifier from your system.

This value allows Perkox and your backend to know which user should receive a reward after completing an offer.

Best practices:

* Use a stable internal user ID
* Do not use random temporary values
* Do not use sensitive personal information
* Make sure the same user keeps the same Player ID across sessions

Example:

```
player_id=user_12345
```

***

### `click_id`

The `click_id` is optional.

You can use it to track a session, click, or traffic source inside your own system.

Example:

```
click_id=click_98765
```

If you do not use click-level tracking, you can omit this parameter.

***

## Method 1: Direct Link Integration

Use the direct link method when you want to open the Perkox Offerwall in a new browser tab, new window, or full-page redirect.

### Direct Link Example

```html
<a href="https://perkwall.com?app_id={YOUR_APP_ID}&player_id={YOUR_PLAYER_ID}&click_id={YOUR_CLICK_ID}" target="_blank">
  Open Offerwall
</a>
```

Replace:

```
{YOUR_APP_ID}
```

with your Perkox App ID.

Replace:

```
{YOUR_PLAYER_ID}
```

with the unique user ID from your platform.

Replace:

```
{YOUR_CLICK_ID}
```

with your optional click/session tracking ID.

***

### JavaScript Example

```html
<button onclick="openPerkoxOfferwall()">
  Earn Rewards
</button>

<script>
  function openPerkoxOfferwall() {
    const appId = "YOUR_APP_ID";
    const playerId = "YOUR_PLAYER_ID";
    const clickId = "YOUR_CLICK_ID";

    const url = `https://perkwall.com?app_id=${encodeURIComponent(appId)}&player_id=${encodeURIComponent(playerId)}&click_id=${encodeURIComponent(clickId)}`;

    window.open(url, "_blank");
  }
</script>
```

***

## Method 2: iFrame Integration

Use the iFrame method when you want to embed the Perkox Offerwall directly inside your web application.

This is useful for dashboards, web reward apps, member areas, loyalty platforms, or web-based gaming experiences.

### Basic iFrame Example

```html
<iframe
  src="https://perkwall.com?app_id={YOUR_APP_ID}&player_id={YOUR_PLAYER_ID}&click_id={YOUR_CLICK_ID}"
  frameborder="0"
  style="width: 100%; height: 100%;"
></iframe>
```

***

### Recommended Responsive iFrame Example

```html
<div style="width: 100%; height: 100vh; overflow: hidden;">
  <iframe
    src="https://perkwall.com?app_id={YOUR_APP_ID}&player_id={YOUR_PLAYER_ID}&click_id={YOUR_CLICK_ID}"
    frameborder="0"
    allow="clipboard-read; clipboard-write"
    style="width: 100%; height: 100%; border: none;"
  ></iframe>
</div>
```

This makes the offerwall fill the available screen height and provides a better full-page experience.

***

## Dynamic iFrame Example

If your app generates the user ID dynamically, you can build the iFrame URL with JavaScript.

```html
<div id="perkox-offerwall-container" style="width: 100%; height: 100vh;"></div>

<script>
  const appId = "YOUR_APP_ID";
  const playerId = "USER_ID_FROM_YOUR_SYSTEM";
  const clickId = "OPTIONAL_CLICK_ID";

  const offerwallUrl = `https://perkwall.com?app_id=${encodeURIComponent(appId)}&player_id=${encodeURIComponent(playerId)}&click_id=${encodeURIComponent(clickId)}`;

  document.getElementById("perkox-offerwall-container").innerHTML = `
    <iframe
      src="${offerwallUrl}"
      frameborder="0"
      style="width: 100%; height: 100%; border: none;"
      allow="clipboard-read; clipboard-write"
    ></iframe>
  `;
</script>
```

***

## Recommended User Flow

A typical web offerwall flow looks like this:

```
User logs into your platform
→ Your system identifies the user
→ You generate the Perkox Offerwall URL with app_id and player_id
→ User opens the offerwall
→ User completes an offer
→ Perkox validates the conversion
→ Perkox sends a postback to your server
→ Your backend credits the user
```

***

## Reward Handling

Do **not** rely only on frontend behavior to credit rewards.

For production integrations, rewards should be handled server-side through your **Postback URL** configured in the Perkox Dashboard.

Recommended reward validation flow:

```
User completes offer
→ Perkox validates event
→ Perkox sends postback to your backend
→ Your backend checks player_id, click_id, status, and transaction ID
→ Your backend credits the user
```

This helps prevent:

* duplicate rewards
* fake client-side reward claims
* missed rewards
* incorrect user credits

***

## Postback Recommendation

Before going live, make sure your app has a working postback endpoint.

Example postback URL:

```
https://yourdomain.com/perkox/postback?user_id={player_id}&click_id={click_id}&reward={reward_amount}&payout={payout}&status={status}
```

Your backend should return HTTP `200` when the postback is received successfully.

***

## Best Practices

For a reliable integration:

* Always pass a valid `app_id`
* Always pass a stable `player_id`
* Use `click_id` if you need session or traffic-source tracking
* URL-encode all parameter values
* Use HTTPS on your website
* Make the iFrame container responsive
* Test the offerwall on desktop and mobile browsers
* Configure server-side postbacks before launch
* Do not credit rewards directly from frontend code

***

## Troubleshooting

### Offerwall Not Loading

Check the following:

* `app_id` is correct
* `player_id` is not empty
* URL parameters are properly encoded
* Your browser allows iFrames
* Your website is served over HTTPS
* The app/property is active in the Perkox Dashboard

***

### User Rewards Not Appearing

Check the following:

* The user completed the offer requirements
* Your postback URL is configured correctly
* Your backend is receiving Perkox postbacks
* Your backend is mapping `player_id` correctly
* Your backend prevents duplicate rewards
* The conversion status is `approved`

***

### iFrame Display Issues

Check the following:

* The parent container has a defined height
* The iFrame width is set to `100%`
* The iFrame height is set to `100%` or `100vh`
* CSS is not hiding or clipping the iFrame
* Test on both desktop and mobile devices

***

## Example Full Page Integration

```html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Earn Rewards</title>

  <style>
    html, body {
      margin: 0;
      padding: 0;
      width: 100%;
      height: 100%;
      background: #0b0f14;
    }

    .offerwall-container {
      width: 100%;
      height: 100vh;
      overflow: hidden;
    }

    .offerwall-frame {
      width: 100%;
      height: 100%;
      border: none;
    }
  </style>
</head>
<body>
  <div class="offerwall-container">
    <iframe
      class="offerwall-frame"
      src="https://perkwall.com?app_id=YOUR_APP_ID&player_id=YOUR_PLAYER_ID&click_id=YOUR_CLICK_ID"
      frameborder="0"
      allow="clipboard-read; clipboard-write"
    ></iframe>
  </div>
</body>
</html>
```

***

## Support

For questions, issues, or integration support, contact:

```
support@perkox.com
```

When contacting support, include:

* App ID
* Website URL
* Integration method used: Direct Link or iFrame
* Example Player ID
* Screenshot or screen recording of the issue
* Browser and device details


# Perkox Dashboard

### What the Dashboard Helps You Track

<figure><img src="https://852195915-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu0RqI0ASoELMpNHq8lgd%2Fuploads%2FTMmPhBDCeNtiFNKXWbH0%2FScreenshot%202026-06-02%20at%206.30.19%E2%80%AFPM.png?alt=media&amp;token=a1b570f3-9427-4e73-9d48-f5c9d666342d" alt=""><figcaption></figcaption></figure>

The dashboard provides key monetization and engagement metrics, including:

* Revenue
* Impressions
* Clicks
* Conversions
* eCPM
* EPC
* CR
* ARPDAU
* DAU
* MAU
* Reward Completions
* Top Performing Offers
* Device Performance
* GEO Performance

***

### Key Metrics Explained

#### Revenue

Total earnings generated through Perkox monetization activity.

#### Impressions

The number of times the offerwall or monetization experience was viewed by users.

#### Clicks

The number of user interactions with offers.

#### Conversions

The number of verified completed actions.

#### eCPM

Revenue generated per 1,000 impressions.

Formula:

```
eCPM = Revenue / Impressions × 1000
```

#### EPC

Revenue generated per click.

Formula:

```
EPC = Revenue / Clicks
```

#### CR

Conversion Rate shows how efficiently clicks turn into completed actions.

Formula:

```
CR = Conversions / Clicks × 100
```

#### ARPDAU

Average Revenue Per Daily Active User.

This helps publishers understand how rewarded monetization contributes to daily user value.

Formula:

```
ARPDAU = Daily Revenue / Daily Active Users
```

***

### Dashboard Filters

The dashboard should allow publishers to filter performance by:

* Today
* Last 7 Days
* Last 30 Days
* Custom Date Range
* App / Project
* Placement
* Country
* Device
* Offer Type

This helps teams understand performance across different user segments and monetization placements.

***

### Publisher Workflow

A publisher should be able to use the dashboard like this:

1. Check total revenue and key KPIs
2. Review offerwall impressions and clicks
3. Analyze conversion rate and eCPM
4. Identify top-performing placements
5. Compare performance by GEO and device
6. Monitor reward completions
7. Optimize SDK placement and reward strategy

***

### Recommended GitBook Page Structure

Use this sidebar structure:

```
Dashboard├── Overview├── Key Metrics├── Revenue Reporting├── Offerwall Performance├── Reward Tracking├── Filters & Segmentation├── GEO & Device Insights├── SDK Integration Status├── Troubleshooting└── Best Practices
```

***

### Best Practices for Publishers

To get the best results with Perkox:

* Place the offerwall where users naturally look for rewards
* Use clear reward messaging
* Test different placements
* Track eCPM and ARPDAU together
* Monitor conversion rate regularly
* Compare performance by GEO
* Use reward completions to understand user intent

***

### Short GitBook Intro Copy

You can use this at the top of the GitBook page:

> The Perkox Dashboard gives publishers and developers a real-time view of SDK monetization performance. Track revenue, impressions, clicks, conversions, eCPM, EPC, ARPDAU, reward completions, and user engagement from one centralized command center.

***

### Message to Your Dev / Team

Here’s a brief message you can send:

> Hi team,\
> We need to create a GitBook documentation section for the Perkox Dashboard.\
> The goal is to explain how publishers and developers can understand their monetization performance, including revenue, impressions, clicks, conversions, eCPM, EPC, CR, ARPDAU, DAU, MAU, and reward completions.
>
> Please structure it clearly with sections for Overview, Key Metrics, Filters, Reward Tracking, Analytics, and Best Practices.
>
> This should feel like professional SDK documentation for publishers, not just a simple dashboard explanation.


# Reports

## **Performance Report Documentation**

The Performance Report section of the Perkox dashboard allows users to manage and analyze the performance of their offers and campaigns. Below is a breakdown of the components and functionality:

***

### **1. Report Filters and Grouping**

The report provides a highly customizable view of performance data, with the following filtering and grouping options:

* **Group**: Organize data by specific categories (e.g., Offer ID, App ID, Country, etc.).
* **Offer ID**: Unique identifier for each offer.
* **App ID**: Identifier for the application associated with the offer.
* **Country**: Filter data by geographic location.
* **Device**: Filter by device type (e.g., mobile, desktop).
* **Platform**: Filter by platform (e.g., iOS, Android, Windows).
* **Browser**: Filter by browser type (e.g., Chrome, Safari).
* **SubID 1-5**: Additional sub-identifiers for granular tracking.
* **Source**: The source of the traffic or conversions.
* **Date**: Filter data by specific dates.
* **Hour**: Filter data by specific hours of the day.
*

```
<figure><img src="/files/vfrHegxieA4lGtLaY4av" alt=""><figcaption></figcaption></figure>
```

***

### **2. Columns Section**

This section allows users to customize the columns displayed in the report:

* **Files**: Manage files or data exports.
* **Apps**: Filter or view data by specific applications.
* **Choose...**: A dropdown to select additional filters or columns.
* **Cities**: Filter data by city or geographic location.
* **Conversions**: Display the number of conversions.
* **CR % (Conversion Rate)**: Display the conversion rate percentage.
* **EPC (Earnings Per Click)**: Display earnings generated per click.
* **Popout**: Option to expand or view additional details.

***

### **3. Date Range**

The report includes a date range filter:

* **Feb 24, 2025 - Feb 24, 2025**: The selected date range for the report. Users can adjust this to view data for specific periods.

***

### **4. All Report Table**

This table provides a summary of performance data for all offers:

* **OFFER ID**: Unique identifier for each offer.
* **CLICKS**: Total number of clicks generated by the offer.
* **CONVERSIONS**: Total number of conversions generated by the offer.
* **PAROUT**: Likely a typo or placeholder for another metric (e.g., payout or revenue).

#### Example Data:

| OFFER ID | CLICKS | CONVERSIONS | PAYOUT |
| -------- | ------ | ----------- | ------ |
| 12010    | 12     | 3           | 3.20$  |
| 12020    | 1      | 0           | 0      |

***

### **How to Use the Performance Report**

1. **Filter Data**: Use the grouping and filtering options (e.g., Offer ID, Country, Device) to narrow down the data.
2. **Customize Columns**: Select the columns you want to display (e.g., Conversions, CR %, EPC).
3. **Adjust Date Range**: Set the date range to analyze performance for specific periods.
4. **Analyze Results**: Review the "All Report" table to see clicks, conversions, and other metrics for each offer.
5. **Export Data**: Use the "Files" option to export the report for further analysis.


# Apps


# Offerwall Quickstart

<figure><img src="https://852195915-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu0RqI0ASoELMpNHq8lgd%2Fuploads%2FqqoSfYhpCzNpOK0EV5n1%2FScreenshot%202026-06-02%20at%206.45.38%E2%80%AFPM.png?alt=media&amp;token=c45c42f7-3f05-4368-9e2f-8ec62e6520db" alt=""><figcaption></figcaption></figure>

**Set Up Your First Offerwall Integration**

1. Go to **Apps**
2. Click **Create App**
3. Select platform
4. Add app/property details
5. Configure currency/reward settings
6. Set up postback
7. Review integration settings
8. Save and test the offerwall
9. Go live


# Currency Configuration

## **Step 2: Currency Configuration**

The **Currency Configuration** section is where you define the virtual currency used in your app. This step is essential for setting up the reward system that incentivizes users to complete offers and engage with your app. Below is a detailed breakdown of each field and its purpose:

***

### **1. Currency Name**

* **Purpose**: This is the name of the virtual currency that users will earn by completing offers or engaging with your app.
* **Example**: If your virtual currency is called "perkoz.cdn," enter that here.
* **Why It’s Important**: The currency name is displayed to users and helps them understand what they’re earning. It should be relevant to your app’s theme or branding.

***

### **2. Currency Rate**

* **Purpose**: This defines the exchange rate between your virtual currency and real-world value (e.g., USD).
* **Example**: If you set the rate to **10,00**, it means 10,00 units of your virtual currency are equivalent to $1.
* **Why It’s Important**: The currency rate ensures that rewards are meaningful and proportional to the effort required to complete offers. It also helps users understand the value of the currency they’re earning.

***

### **3. Update Save & Next**

* **Purpose**: Once you’ve defined the currency name and rate, click this button to save your settings and proceed to the next step.
* **Why It’s Important**: This ensures your currency settings are applied and your app is ready for further customization (e.g., design, postback URLs).

***

<figure><img src="https://852195915-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu0RqI0ASoELMpNHq8lgd%2Fuploads%2FuKgj50mVRtDRGiWT7FVy%2FScreenshot%202026-06-02%20at%206.38.40%E2%80%AFPM.png?alt=media&amp;token=5d809b39-56f6-49ea-9872-ec643db24c52" alt=""><figcaption></figcaption></figure>

### **Example Workflow for Currency Configuration**

1. **Enter Currency Name**: Type "perks" in the **Currency Name** field.
2. **Set Currency Rate**: Enter **10,00** in the **Currency Rate** field to define the exchange rate (10,00 units = $1).
3. **Save & Next**: Click the **Update Save & Next** button to save your currency settings and move to the next step (e.g., design customization).

***

### **Why Currency Configuration Matters**

* **User Engagement**: A well-defined virtual currency system motivates users to complete offers and engage with your app.
* **Transparency**: Clear currency rates help users understand the value of their rewards, building trust and encouraging participation.
* **Flexibility**: You can adjust the currency rate to align with your app’s economy and reward structure.

***

### **Additional Notes**

* **Live Preview**: Some dashboards provide a live preview of how the currency will appear to users. Use this feature to ensure the currency name and rate are displayed correctly.
* **Testing**: After configuring the currency, test the system by completing offers and verifying that users receive the correct amount of virtual currency.


# Design Customization

The **Design Customization** section allows you to personalize the visual appearance of your app and offerwall. This step is crucial for creating a cohesive and engaging user experience that aligns with your brand identity. Below is a detailed breakdown of each field and its purpose:

***

### **1. Title**

* **Purpose**: This is the title of your app or offerwall as it will appear to users.
* **Example**: "Complete Offers And Play Games to Earn."
* **Why It’s Important**: The title is the first thing users see, so it should be clear, engaging, and aligned with your app’s purpose.

***

### **2. Logo**

* **Purpose**: Upload your platform’s logo to represent your brand on the app and offerwall.
* **Requirements**: Ensure the logo has a height of **4bps** (or the specified dimensions).
* **Why It’s Important**: A professional logo enhances brand recognition and builds trust with users.

***

### **3. Currency Icon**

*

```
<figure><img src="/files/VrujX6CWbFoApCz68dsz" alt=""><figcaption></figcaption></figure>
```

* **Purpose**: Upload an icon to visually represent your virtual currency on the app and offerwall.
* **Why It’s Important**: A currency icon makes it easier for users to identify and understand the rewards they’re earning.

***

### **4. Theme Customization**

This section allows you to customize the color scheme of your app and offerwall to match your brand.

#### **a. Background Color**

* **Purpose**: Set the background color of the app or offerwall.
* **Why It’s Important**: A visually appealing background enhances the user experience and aligns with your brand’s aesthetic.

#### **b. Text Color**

* **Purpose**: Set the color of the text displayed on the app or offerwall.
* **Why It’s Important**: Proper text contrast ensures readability and a professional appearance.

#### **c. Header Background Color**

* **Purpose**: Set the background color of the header section.
* **Why It’s Important**: The header is a prominent part of the interface, so its design should be consistent with your brand.

#### **d. Header Text Color**

* **Purpose**: Set the color of the text in the header section.
* **Why It’s Important**: This ensures the header text is readable and visually appealing.

***

### **Example Workflow for Design Customization**

1. **Enter Title**: Type "Complete Offers And Play Games to Earn" in the **Title** field.
2. **Upload Logo**: Click **Choose File** and upload your platform’s logo. Ensure it meets the height requirement (e.g., 4bps).
3. **Upload Currency Icon**: Click **Choose File** and upload an icon for your virtual currency.
4. **Customize Theme**:
   * Set the **Background Color** to a color that matches your brand (e.g., light blue).
   * Set the **Text Color** to a contrasting color for readability (e.g., dark gray).
   * Set the **Header Background Color** to a bold color that stands out (e.g., navy blue).
   * Set the **Header Text Color** to a complementary color (e.g., white).
5. **Save Changes**: Click the appropriate button to save your design settings.

***

### **Why Design Customization Matters**

* **Brand Consistency**: Customizing the design ensures your app and offerwall align with your brand’s visual identity.
* **User Engagement**: A visually appealing interface enhances user experience and encourages participation.
* **Professionalism**: A well-designed app and offerwall build trust and credibility with users.

***

### **Additional Notes**

* **Live Preview**: Some dashboards provide a live preview of your design changes. Use this feature to see how your app or offerwall will look to users.
* **Testing**: After customizing the design, test the app or offerwall on different devices to ensure the colors and layout display correctly.


# Postback URL Configuration

The **Postback URL Configuration** section is where you set up postback URLs to track conversions and other events in real-time. This step is critical for monitoring user activity, optimizing campaigns, and ensuring accurate reward distribution. Below is a detailed breakdown of each field and its purpose:

***

### **1. Enter Postback URL**

* **Purpose**: This is the URL where conversion and event data will be sent. It allows you to track user actions like clicks, conversions, and rewards.
* **Placeholders**: You can use dynamic placeholders in the URL to insert specific data points. For example:
  * `(player_id)`: Unique identifier for the user.
  * `(click_id)`: Unique identifier for the click event.
  * `(offer_id)`: Unique identifier for the offer.
  * `(status)`: Status of the conversion (e.g., success, failure).
  * `(reward_amount)`: Amount of reward earned by the user.
  * `(sub1)` to `(sub5)`: Additional custom parameters for tracking.

####

***

<figure><img src="https://852195915-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu0RqI0ASoELMpNHq8lgd%2Fuploads%2FdbV06AISAQ2lVu8WpjV8%2FScreenshot%202026-06-02%20at%206.40.34%E2%80%AFPM.png?alt=media&amp;token=30e0132e-a615-49b2-928a-80584f16d7a9" alt=""><figcaption></figcaption></figure>

## Postback Setup

Postbacks allow your app or backend to receive real-time reward and conversion updates from Perkox.

When a user completes an offer or reward event, Perkox can send a request to your server with details such as the player ID, click ID, reward amount, payout, and conversion status.

Use postbacks to automatically credit users inside your app or game.

***

### How Postbacks Work

Basic flow:

```
User opens offerwall→ User clicks an offer→ User completes the required action→ Perkox validates the event→ Perkox sends a postback to your server→ Your backend credits the user
```

Your postback URL should be created inside your publisher dashboard.

***

### Example Postback URL

You can use placeholders inside your URL to dynamically receive conversion data.

Example:

```
https://example.com/postback?user_id={player_id}&click={click_id}&points={reward_amount}&payout={payout}&status={status}
```

When a conversion happens, Perkox replaces the placeholders with real values.

Example result:

```
https://example.com/postback?user_id=player123&click=d4246e2ca2894efc79df7b4b4&points=50.00&payout=10.00&status=approved
```

***

### Method Type

Perkox supports:

#### GET — Recommended

Use GET if you want a simple and fast postback integration.

```
GET https://yourdomain.com/postback?user_id={player_id}&click={click_id}
```

#### POST

Use POST if your backend requires conversion data to be sent in the request body.

Recommended for advanced backend systems.

***

## Placeholder Glossary

Use these placeholders in your postback URL.

| Placeholder       | Description                         | Example                     | Required |
| ----------------- | ----------------------------------- | --------------------------- | -------- |
| `{player_id}`     | Player/user ID passed from your app | `player123`                 | Optional |
| `{click_id}`      | Unique click ID for the conversion  | `d4246e2ca2894efc79df7b4b4` | Optional |
| `{offer_id}`      | Offer ID related to the conversion  | `10101`                     | Optional |
| `{reward_amount}` | Reward amount credited to the user  | `50.00`                     | Optional |
| `{payout}`        | Publisher payout amount             | `10.00`                     | Optional |
| `{ip}`            | User IP address                     | `192.168.1.1`               | Optional |
| `{status}`        | Conversion status                   | `approved`                  | Optional |

***

## Recommended Postback Template

Use this template for most integrations:

```
https://yourdomain.com/perkox/postback?user_id={player_id}&click_id={click_id}&offer_id={offer_id}&reward={reward_amount}&payout={payout}&status={status}
```

This gives your backend enough information to:

* identify the user
* validate the click
* track the offer
* credit the correct reward
* store payout and status data

***

## Integration Credentials

Inside the **Apps** section, each app/property includes integration credentials.

You may see:

```
App ID: 83f34460********SDK Key: 82116454********API Key: api_561f********
```

### App ID

The App ID identifies the app or property inside Perkox.

Use it when connecting your app to the Perkox SDK.

### SDK Key

The SDK Key is used to activate the Perkox SDK inside your app.

Keep this key private and do not expose it publicly.

### API Key

The API Key is used for server-side or backend communication.

Only use this key from secure server environments.

Never place the API Key inside public frontend code.

***

## Important Security Notes

To protect your integration:

* never expose API keys publicly
* validate postbacks on your backend
* store click IDs and player IDs securely
* prevent duplicate reward credits
* log all postback events
* check conversion status before crediting rewards

Recommended backend logic:

```
Receive postback→ Check click_id→ Check player_id→ Check status→ Prevent duplicate credit→ Credit user reward→ Store event in database
```

***

## Reward Status Handling

Your backend should handle different statuses.

Example:

| Status     | Meaning                    | Recommended Action      |
| ---------- | -------------------------- | ----------------------- |
| `approved` | Conversion is valid        | Credit the user         |
| `pending`  | Conversion is under review | Wait before crediting   |
| `rejected` | Conversion is invalid      | Do not credit           |
| `reversed` | Conversion was reversed    | Remove or adjust reward |

If your current status system is different, adapt this table to match your dashboard logic.

***

## Testing Your Postback

Before going live, test your postback URL.

Checklist:

* postback endpoint is live
* URL returns HTTP `200`
* player ID is received correctly
* click ID is stored
* reward amount is parsed correctly
* duplicate conversions are blocked
* rejected conversions are not credited
* logs are visible on your backend

***

## Common Issues

### Postback not received

Check:

* URL is correct
* endpoint is publicly accessible
* server firewall allows requests
* SSL certificate is valid
* method type matches your backend

### User not rewarded

Check:

* `{player_id}` is being passed correctly
* backend is parsing reward amount
* status is approved
* duplicate prevention is not blocking valid events

### Wrong reward amount

Check:

* `{reward_amount}` placeholder is mapped correctly
* your app currency conversion is configured correctly
* backend is not overriding values

***

## Best Practices

For best results:

* always pass a stable `player_id`
* store every `click_id`
* use server-side reward validation
* keep logs for all reward events
* test with small reward values before launch
* monitor conversions daily after going live

***

## Related Documentation Pages

Recommended GitBook structure:

```
Offerwall Integration├── Overview├── Create Your App├── SDK Credentials├── Set Up Offerwall├── Configure Rewards├── Postback Setup├── Placeholder Glossary├── Reward Statuses├── Testing & Debugging└── Best Practices
```

* **Testing**: After setting up the postback URL, test it by simulating user actions (e.g., clicks, conversions) and verifying that data is sent correctly.
* **Error Handling**: Ensure your server can handle errors (e.g., invalid data, missing parameters) to avoid disruptions in tracking.
* **Security**: If using sensitive data, consider using the POST method or encrypting the data for added security.


# Postback


# Postback Parameters for Tracking

### What is a Postback?

APostback URLs are essential for tracking user activity and conversions within a performance marketing environment. This document explains the various parameters used in postback URLs and tracking links, detailing each element's function and how it is utilized.

### Key Terms

* **Postback URL**: A URL used by the advertiser to send conversion data back to the tracking platform.
* **Tracking Link**: A link that directs traffic to the advertiser's site while keeping track of user activity.

### Parameters

Below is a table that lists the most common parameters used in postback URLs and tracking links, along with explanations of what each represents:

| **Parameter**              | **Description**                                                                         |
| -------------------------- | --------------------------------------------------------------------------------------- |
| **{offer\_id}**            | The unique ID of the offer being tracked.                                               |
| **{payout}**               | The monetary value of the conversion or payout.                                         |
| **{status}**               | The status of the conversion (e.g., pending, approved, rejected).                       |
| **{event}**                | The type of event being tracked (e.g., click, install, registration).                   |
| **{ip}**                   | The IP address of the user making the conversion or event.                              |
| **{browser}**              | The browser used by the user during the event.                                          |
| **{sub1} - {sub5}**        | Custom sub-IDs used for additional tracking purposes (e.g., campaign ID, publisher ID). |
| **{click\_id}**            | A unique identifier for the click that initiated the conversion.                        |
| **{device\_model}**        | The specific model of the device used by the user.                                      |
| **{device\_type}**         | The type of device used (e.g., mobile, desktop).                                        |
| **{device\_vendor}**       | The manufacturer of the user's device.                                                  |
| **{browser\_name}**        | The name of the browser used (e.g., Chrome, Safari).                                    |
| **{browser\_version}**     | The specific version of the browser.                                                    |
| **{platform\_name}**       | The operating system of the device (e.g., Windows, iOS, Android).                       |
| **{platform\_version}**    | The version of the operating system.                                                    |
| **{continent}**            | The continent where the event took place.                                               |
| **{country}**              | The country of the user.                                                                |
| **{state}**                | The state or region of the user.                                                        |
| **{city}**                 | The city of the user.                                                                   |
| **{isp}**                  | The internet service provider used by the user.                                         |
| **{source}**               | The traffic source that directed the user to the offer.                                 |
| **{user\_agent}**          | The full user agent string of the user's browser or device.                             |
| **{event\_name}**          | The name of the event triggered by the user.                                            |
| **{event\_slug}**          | A short code representing the event.                                                    |
| **{player\_id}**           | The unique ID assigned to the user or player in the system.                             |
| **{player\_internal\_id}** | An internal identifier used for tracking the user within the platform.                  |
| **{player\_name}**         | The user's name.                                                                        |
| **{player\_email}**        | The user's email address.                                                               |
| **{player\_username}**     | The user's username within the platform.                                                |
| **{player\_phone}**        | The user's phone number.                                                                |
| **{click\_datetime}**      | The date and time when the click occurred.                                              |
| **{conversion\_datetime}** | The date and time when the conversion took place.                                       |
| **{reward\_amount}**       | The amount of any reward given to the user for the event or conversion.                 |

### Usage Example

A typical postback URL might look something like this:

```
https://yourdomain.com/postback?offer_id={offer_id}&click_id={click_id}&payout={payout}&status={status}&event={event}&ip={ip}&country={country}&device_type={device_type}
```

This URL allows the tracking system to record essential data points like the offer ID, click ID, payout, event type, and user's location, helping advertisers and publishers optimize their campaigns.

For any further details or questions, feel free to reach out to the support team


# Payments

The **Billing Section** in the Perkox dashboard allows you to manage and view payment details related to your account. This section is essential for tracking transactions, payment methods, and the status of payments.

## All Payments Table

This table provides an overview of all payments made or received.

| Column     | Description                                 |
| ---------- | ------------------------------------------- |
| **Id**     | Unique identifier for each payment          |
| **Date**   | Date the payment was processed              |
| **Amount** | The payment amount                          |
| **Status** | Current status (pending, completed, failed) |
| **Method** | Payment method used                         |

## Payment Methods

Perkox supports multiple payment methods for publisher payouts. Configure your preferred payment method in the dashboard settings.

## Payment Schedule

Payments are processed according to your publisher agreement. Check your dashboard for specific payout dates and minimum thresholds.

> 💡 **Tip:** Ensure your payment details are up to date to avoid payout delays. Contact support if you need to update your payment method.

→ [Contact Support](https://docs.perkox.com/getting-started/support) → [Publisher Dashboard](https://pub.perkox.com/?referrer=10105)


# Support

## **Support Ticket Section Documentation**

The **Support Ticket Section** in the Perkox dashboard allows you to manage and view support tickets submitted by users or team members. This section is essential for tracking and resolving issues, questions, or requests. Below is a breakdown of the components and functionality:

***

***

### **1. Support Ticket Table**

This table provides an overview of all support tickets. However, in the screenshot, no data is available.

#### **Columns in the Table**:

* **ID**: Unique identifier for each support ticket.
* **Subject**: The subject or title of the support ticket.
* **Sender**: The person or entity who submitted the ticket.
* **Receiver**: The person or team responsible for handling the ticket.
* **Status**: The current status of the ticket (e.g., Open, In Progress, Resolved).
* **Priority**: The priority level of the ticket (e.g., Low, Medium, High).
* **Actions**: Possible actions related to the ticket (e.g., view details, edit, delete).

***

<figure><img src="https://852195915-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu0RqI0ASoELMpNHq8lgd%2Fuploads%2FeG0RERVakeau8BxX4G9K%2FScreenshot%202026-06-04%20at%201.06.45%E2%80%AFAM.png?alt=media&amp;token=130953ba-c0b4-4a37-bdd6-18ee5136aa7b" alt=""><figcaption></figcaption></figure>

### **Example Workflow for Support Ticket Section**

1. **Navigate to Support Tickets**: Click on the **Support Ticket** option in the navigation menu.
2. **View Tickets**: Check the **Support Ticket** table to see a list of all submitted tickets.
3. **Take Action**: Use the **Actions** column to view details, edit, or manage tickets.

***

### **Why the Support Ticket Section Matters**

* **Issue Tracking**: Keep track of all support requests, ensuring timely resolution.
* **Communication**: Facilitate communication between users and support teams.
* **Priority Management**: Prioritize tickets based on their urgency and importance.

***

### **Additional Notes**

* **No Data Available**: If the table shows "No data available," it means there are no recorded support tickets yet. This could be due to no tickets being submitted or a delay in data syncing.
* **Error Handling**: Ensure that any errors in ticket processing are promptly addressed to avoid disruptions.


# Dynamic API

The **Dynamic API** in the Perkox dashboard is designed to be called by the client (e.g., a user’s device) to retrieve offers tailored to a specific user. This API provides flexibility in visualizing offers based on the user’s progress and preferences. Below is a breakdown of the components and functionality:

***

### **1. Dynamic API Overview**

This section provides an overview of the Dynamic API and its purpose.

#### **Key Points**:

* **Purpose**: The Dynamic API returns a list of offers tailored to a specific user based on their progress and preferences.
* **Usage**: It is called by the client (e.g., a user’s device) to retrieve personalized offers.

***

### **2. API Endpoint**

The endpoint for the Dynamic API is provided, along with instructions on how to use it.

#### **Endpoint**:

Copy

```
https://pub.perkox.com/api/v2/dynamic?key=<API_KEY>
```

#### **Parameters**:

* **key**: Your API key for authentication.
* **ip**: The IP address of the user (e.g., `127.0.0.1`).
* **ua**: The user agent string of the user’s device (e.g., `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36`).
* **per\_page**: Number of offers to return per page (e.g., `per_page=100`).
* **page**: Page number to retrieve (e.g., `page=1`).

#### **Example API Call**:

Copy

```
https://pub.perkox.com/api/v2/dynamic?key=f5aa91c9-ff21-46a0-acce-0cc3a62ecee6&ip=127.0.0.1&ua=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36&per_page=100&page=1
```

***

### **1. Response Structure**

The API response is structured as follows:

jsonCopy

```
{
  "success": true,
  "message": "Offers retrieved successfully",
  "data": {
    "current_page": 1,
    "data": [
    {
        "id": 10863,
        "name": "Puzzles & Conquest",
        "thumbnail": "https://main-p.agmcdn.com/offers/1157072-IjK3XgyP.jpg",
        "description": "Build a mighty kingdom, gather resources, explore the vast land & progress through levels of enemies by completing puzzles to attack and by drawing help from your heroes.",
        "requirements": "Reach the listed levels within 30 days.  New users only. You must click “Allow” if tracking permission is requested within the app. Confirms in 7 days",
        "model": "cpa",
        "payout": "0.00",
        "devices": [
          {
            "name": "iOS"
          }
        ],
        "categories": [
          {
            "name": "Gaming"
          }
        ],
        "link": "https://perkox.online/click?pub_id=10410&offer_id=10863",
        "preview": "https://apps.apple.com/us/app/puzzles-conquest/id1485209615",
        "events": [
          {
            "id": "73bcaa4a-130e-11ef-b9cd-069eb31df495",
            "name": "Install",
            "payout": "0.00"
          },
          {
            "id": "73bcbb70-130e-11ef-80d5-069eb31df495",
            "name": "Upgrade Castle to Level 10",
            "payout": "1.40"
          },
          {
            "id": "73bcc2e6-130e-11ef-a6b6-069eb31df495",
            "name": "Upgrade Castle to Level 15 within 4 days",
            "payout": "10.50"
          },
          {
            "id": "c8e673f2-8d75-11ef-a423-069eb31df495",
            "name": "Upgrade Castle to Level 17",
            "payout": "2.80"
          },
          {
            "id": "73bcca84-130e-11ef-b54c-069eb31df495",
            "name": "Upgrade Castle to Level 22",
            "payout": "8.40"
          },
          {
            "id": "73bcd222-130e-11ef-98af-069eb31df495",
            "name": "Upgrade Castle to Level 30",
            "payout": "49.00"
          },
          {
            "id": "73bce9ba-130e-11ef-b151-069eb31df495",
            "name": "Purchase",
            "payout": "2.80"
          },
          {
            "id": "d6090814-193b-11ef-8e45-069eb31df495",
            "name": "Buy Lucifer Deluxe Gift",
            "payout": "7.00"
          },
          {
            "id": "4dba27fc-8a7b-11ef-9183-069eb31df495",
            "name": "Buy Deluxe Summons to unlock awesome rewards",
            "payout": "3.50"
          },
          {
            "id": "02aac4b2-e7df-11ef-963c-069eb31df495",
            "name": "Upgrade Castle to Level 7",
            "payout": "0.42"
          },
          {
            "id": "02ab0c7e-e7df-11ef-ba71-069eb31df495",
            "name": "Buy Silver Weekly Card $4.99",
            "payout": "3.50"
          },
          {
            "id": "8d9d9594-f064-11ef-81c8-069eb31df495",
            "name": "Upgrade Castle to Any Level",
            "payout": "0.00"
          }
        ],
        "countries": [
          "US"
        ]
```

<br>

### **3. API Key**

This section allows you to generate and manage your API key.

#### **Steps to Generate API Key**:

1. Navigate to the **API** section.
2. Click on **Generate API Key**.
3. Use the generated key in your API calls for authentication.

***

### **4. API Documentation**

This section provides access to detailed documentation for the Dynamic API.

#### **Steps to Access Documentation**:

1. Navigate to the **API** section.
2. Click on **API Documentation** to view detailed instructions and examples.

***

### **Why the Dynamic API Matters**

* **Personalization**: Retrieve offers tailored to a specific user based on their progress and preferences.
* **Flexibility**: Visualize offers in a way that best suits your application or platform.
* **Integration**: Seamlessly integrate personalized offers into your existing system.

***

### **Additional Notes**

* **Authentication**: Ensure you use the correct API key for authentication.
* **Pagination**: Use the `per_page` and `page` parameters to manage large datasets and retrieve specific pages of offers.
* **Testing**: Test the API calls to ensure they return the expected data.


# SDK


# SDK Overview

Perkox provides native SDKs for integrating high-converting rewarded offerwalls into your mobile apps and games. Each SDK is lightweight, requires minimal code to integrate, and provides secure server-side reward validation.

***

### Available SDKs

| Platform         | Language                | Min Version             | Status      |
| ---------------- | ----------------------- | ----------------------- | ----------- |
| **Android**      | Kotlin / Java           | minSdk 21 (Android 5.0) | ✅ Available |
| **iOS**          | Swift                   | iOS 13.0+               | ✅ Available |
| **React Native** | TypeScript / JavaScript | RN 0.60+ / 0.72+        | ✅ Available |
| **Flutter**      | Dart                    | Flutter 3.0+            | ✅ Available |
| **Unity**        | C#                      | Unity 2020.3 LTS+       | ✅ Available |

***

### Quick Integration

All SDKs follow the same standard integration flow:

1. **Initialize** with your App ID, SDK Key, and a unique Player ID
2. **Launch** the offerwall when the user taps an earn or reward button
3. **Handle rewards** via server-side postback (recommended) and client-side callbacks

#### Android Example (Kotlin)

```kotlin
val offerwall = PerkoxOfferwall.create("YOUR_APP_ID", "YOUR_SDK_KEY", "Player_123")
offerwall.launch(this)
```

#### iOS Example (Swift)

```swift
let offerwall = PerkoxOfferwall.create(appId: "YOUR_APP_ID", sdkKey: "YOUR_SDK_KEY", playerId: "Player_123")
offerwall.launch(viewController: self)
```

#### React Native Example (TypeScript)

```tsx
PerkoxSDK.init({ appId: "YOUR_APP_ID", sdkKey: "YOUR_SDK_KEY", playerId: "Player_123" });
PerkoxSDK.showOfferwall();
```

#### Flutter Example (Dart)

```dart
await PerkoxSDK.init(appId: "YOUR_APP_ID", sdkKey: "YOUR_SDK_KEY", playerId: "Player_123");
await PerkoxSDK.showOfferwall();
```

#### Unity Example (C#)

```csharp
PerkoxSDK.Initialize("YOUR_APP_ID", "YOUR_SDK_KEY", "Player_123");
PerkoxSDK.ShowOfferwall();
```

***

### Important: Server-Side Reward Validation

Do **not** rely only on SDK client-side callbacks to grant rewards. SDK callbacks only work while the offerwall is active inside the app. For accurate, fraud-proof reward processing, configure a **Postback URL** in your Perkox dashboard.

**Recommended reward flow:**

```
User completes offer
→ Perkox validates conversion
→ Perkox sends secure postback to your server
→ Your backend verifies the signature & event
→ Your backend credits virtual currency to the user
```

***

### Get Your Credentials

You can find your **App ID** and **SDK Key** inside the Perkox Publisher Dashboard under your app settings.

* [Register as a publisher](https://pub.perkox.com)
* [Read the full documentation](https://docs.perkox.com)


# Perkox Offerwall SDK for Android

The **Perkox Offerwall SDK for Android** is a lightweight SDK that allows mobile app and game developers to integrate the Perkox Offerwall directly into their Android applications.

With Perkox, users can earn in-app rewards by completing offers, surveys, and other rewarded engagement activities.

The SDK is designed to provide a simple integration flow while giving publishers access to rewarded monetization, analytics, and secure server-side reward validation.

***

### Requirements

Before integrating the Perkox Android SDK, make sure your project meets the following requirements:

| Requirement       | Version                   |
| ----------------- | ------------------------- |
| Android minSdk    | 21 / Android 5.0 Lollipop |
| Android targetSdk | 33                        |
| Java              | 17                        |
| Kotlin            | 1.9.0+                    |
| AndroidX          | Required                  |

***

### Required Permission

The SDK requires internet access to load the offerwall and communicate with Perkox services.

This permission is automatically included through Android manifest merging:

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

***

## Installation

### Step 1: Download the AAR

Download the latest SDK file:

```
perkox-android-sdk-release.aar
```

The file should be downloaded from the official Perkox GitHub Releases page or provided by the Perkox team.

***

### Step 2: Add the AAR to Your Project

Copy the downloaded `.aar` file into your app module’s `libs` folder.

Your project structure should look like this:

```
your-app/
└── app/
    └── libs/
        └── perkox-android-sdk-release.aar
```

***

### Step 3: Add SDK Dependencies

Add the Perkox SDK AAR file and required AndroidX dependencies to your app-level Gradle file.

#### Groovy — `build.gradle`

```
dependencies {
    implementation files('libs/perkox-android-sdk-release.aar')

    // Required dependencies
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'androidx.core:core-ktx:1.10.1'
}
```

#### Kotlin DSL — `build.gradle.kts`

```
dependencies {
    implementation(files("libs/perkox-android-sdk-release.aar"))

    // Required dependencies
    implementation("androidx.appcompat:appcompat:1.6.1")
    implementation("androidx.core:core-ktx:1.10.1")
}
```

***

## Quick Start

After installing the SDK, you can launch the Perkox Offerwall using your **App ID**, **SDK Key**, and a unique **Player ID**.

You can find your App ID and SDK Key inside the Perkox Publisher Dashboard.

***

### Kotlin Implementation

```
import com.perkoxofferwall.sdk.PerkoxOfferwall

private fun showOfferwall() {

    // Create and launch the offerwall
    val offerwall = PerkoxOfferwall.create(
        "YOUR_APP_ID",   // Your App ID
        "YOUR_SDK_KEY",  // Your SDK Key
        "Player_123"     // Unique player ID
    )

    offerwall.launch(this)
}
```

***

### Java Implementation

```
import com.perkoxofferwall.sdk.PerkoxOfferwall;
import com.perkoxofferwall.sdk.Offerwall;

private void showOfferwall() {
    Offerwall offerwall = PerkoxOfferwall.INSTANCE.create(
        "YOUR_APP_ID",   // Your App ID
        "YOUR_SDK_KEY",  // Your SDK Key
        "USER_123"       // Unique player ID
    );

    offerwall.launch(this);
}
```

***

## API Reference

### PerkoxOfferwall

`PerkoxOfferwall` is the main entry point for creating and launching the Perkox Offerwall.

| Method     | Parameters                                            | Returns     | Description                      |
| ---------- | ----------------------------------------------------- | ----------- | -------------------------------- |
| `create()` | `appId: String`, `sdkKey: String`, `playerId: String` | `Offerwall` | Creates a new Offerwall instance |

***

### Offerwall

The `Offerwall` object is used to launch the offerwall and listen to basic offerwall events.

| Method / Callback | Parameters                    | Description                                        |
| ----------------- | ----------------------------- | -------------------------------------------------- |
| `launch()`        | `activity: Activity`          | Launches the offerwall                             |
| `onReward`        | `(Map<String, Any?>) -> Unit` | Callback triggered when a reward event is received |
| `onClose`         | `() -> Unit`                  | Callback triggered when the offerwall is closed    |

***

## Listening to Events

You can listen to reward and close events by setting callbacks before launching the offerwall.

### Important Reward Handling Notice

Do **not** rely only on SDK reward callbacks to grant rewards to users.

SDK callbacks only work while the offerwall is active inside the app. For accurate and reliable reward processing, rewards should be handled server-side using the **Postback URL** configured in your Perkox dashboard.

Recommended reward flow:

```
User completes offer
→ Perkox validates conversion
→ Perkox sends postback to your server
→ Your backend verifies the event
→ Your backend credits the user
```

Use SDK callbacks mainly for UI feedback, logs, or temporary in-app updates.

The `onReward` callback may be triggered multiple times for the same transaction with different statuses, such as `pending`, `approved`, `rejected`, or `reversed`.

***

### Kotlin Event Example

```
val offerwall = PerkoxOfferwall.create(
    "YOUR_APP_ID",
    "YOUR_SDK_KEY",
    "Player_123"
)

offerwall.onReward = { reward ->
    val amount = reward["amount"]          // Double - reward amount
    val status = reward["status"]          // String - reward status
    val txid = reward["txid"]              // String - unique transaction ID
    val playerId = reward["player_id"]     // String - player ID

    Log.d("Perkox", "Reward received! Amount: $amount, Status: $status")
}

offerwall.onClose = {
    Log.d("Perkox", "Offerwall closed")
}

offerwall.launch(this)
```

***

### Java Event Example

```
Offerwall offerwall = PerkoxOfferwall.INSTANCE.create(
    "YOUR_APP_ID",
    "YOUR_SDK_KEY",
    "Player_123"
);

offerwall.setOnReward(reward -> {
    Double amount = (Double) reward.get("amount");
    String status = (String) reward.get("status");
    String txid = (String) reward.get("txid");
    String playerId = (String) reward.get("player_id");

    Log.d("Perkox", "Reward received! Amount: " + amount + ", Status: " + status);

    return null;
});

offerwall.setOnClose(() -> {
    Log.d("Perkox", "Offerwall closed");

    return null;
});

offerwall.launch(this);
```

***

## Reward Data Fields

When a reward event is received, the SDK may return the following fields:

| Field       | Type     | Description                                |
| ----------- | -------- | ------------------------------------------ |
| `amount`    | `Double` | Reward amount                              |
| `txid`      | `String` | Unique transaction ID                      |
| `status`    | `String` | Reward status                              |
| `player_id` | `String` | Player ID passed during SDK initialization |

***

### Reward Statuses

| Status     | Description                             | Recommended Action                              |
| ---------- | --------------------------------------- | ----------------------------------------------- |
| `pending`  | Reward is being reviewed or processed   | Do not grant final reward yet                   |
| `approved` | Reward has been validated               | Credit the user server-side                     |
| `rejected` | Reward was not approved                 | Do not credit the user                          |
| `reversed` | Previously approved reward was reversed | Adjust or remove the reward if already credited |

***

## Player ID

The `playerId` should be a unique and stable identifier for the user inside your app or game.

Examples:

```
player123
user_98765
account_45678
```

The Player ID is important because it allows your backend to identify which user should receive the reward.

Best practices:

* Use a stable internal user ID
* Do not use random temporary values
* Do not use sensitive personal information
* Make sure the same user keeps the same Player ID across sessions

***

## Reward Validation Best Practice

For production integrations, Perkox recommends using server-side reward validation through postbacks.

The SDK callback is useful for listening to events inside the app, but the final reward credit should happen on your backend.

Recommended production setup:

```
App launches Perkox Offerwall with playerId
→ User completes an offer
→ Perkox validates conversion
→ Perkox sends postback to publisher backend
→ Publisher backend checks txid and status
→ Publisher backend credits the user
```

This helps prevent duplicate rewards, missed rewards, and client-side manipulation.

***

## Troubleshooting

### 1. Offerwall Not Loading

Check the following:

* Verify that your `appId` is correct
* Verify that your `sdkKey` is correct
* Check the device internet connection
* Make sure the `playerId` is not empty
* Confirm that your app has internet permission
* Make sure the app/property is active inside the Perkox dashboard

***

### 2. AAR File Not Found

Check the following:

* Make sure the `.aar` file is inside the `app/libs` folder
* Verify that the file name matches your Gradle configuration
* Sync the Gradle project again
* Clean and rebuild the project

Example:

```
app/libs/perkox-android-sdk-release.aar
```

***

### 3. Class Not Found Errors

Make sure the required dependencies are included:

```
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.core:core-ktx:1.10.1'
```

For Kotlin DSL:

```
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.core:core-ktx:1.10.1")
```

Then sync and rebuild your project.

***

### 4. Reward Callback Not Triggering

Possible reasons:

* The offerwall was closed before the event was returned
* The conversion is still pending
* The reward was processed server-side through postback
* The user did not complete the offer requirements
* The transaction status has not changed yet

For production reward handling, always rely on server-side postbacks.

***

## Changelog

### v1.0.0

Initial Android SDK release.

Included:

* Lightweight AAR integration
* Perkox Offerwall launch support
* Android and Java usage examples
* Reward callback support
* Close callback support
* Server-side postback recommendation

***

## Support

For questions, issues, or feature requests, contact:

```
support@perkox.com
```

When contacting support, include:

* App ID
* SDK version
* Android version
* Device model
* Error logs if available
* Description of the issue


# Perkox Offerwall SDK for iOS

The **Perkox Offerwall SDK for iOS** is a lightweight SDK that allows iOS app developers to integrate the Perkox Offerwall directly into their application.

With Perkox, users can earn in-app rewards by completing offers, surveys, and other rewarded engagement activities.

The SDK is designed to provide a simple Swift integration flow while giving publishers access to rewarded monetization, analytics, and secure server-side reward validation.

***

### Requirements

Before integrating the Perkox iOS SDK, make sure your project meets the following requirements:

| Requirement           | Version                                         |
| --------------------- | ----------------------------------------------- |
| iOS Deployment Target | 13.0+                                           |
| Swift                 | 5.7+                                            |
| Xcode                 | 14.0+                                           |
| Architectures         | arm64 for device, arm64 + x86\_64 for simulator |

***

## Installation

### Step 1: Download the SDK

Download the latest iOS SDK release `.zip` file from the official Perkox GitHub Releases page or from the package provided by the Perkox team.

After extracting the `.zip` file, you should see a folder similar to:

```
perkox-ios-sdk-release-{version}/
├── Package.swift
└── PerkoxOfferwall.xcframework/
    ├── Info.plist
    ├── ios-arm64/
    │   └── PerkoxOfferwall.framework/
    └── ios-arm64_x86_64-simulator/
        └── PerkoxOfferwall.framework/
```

The folder contains a local Swift Package and the bundled `PerkoxOfferwall.xcframework`.

***

### Step 2: Add the Package to Your Xcode Project

In Xcode, add the Perkox SDK as a local Swift Package.

Follow these steps:

1. Open your project in Xcode
2. Go to **File → Add Package Dependencies…**
3. In the bottom-left of the dialog, click **Add Local…**
4. Navigate to the extracted folder:

```
perkox-ios-sdk-release-{version}
```

5. Select the folder and click **Add Package**
6. In the next prompt, make sure your app target is checked
7. Click **Add Package** again

***

### Important Installation Tip

Place the extracted SDK folder somewhere stable before adding it to Xcode.

Recommended location:

```
your-ios-app/
├── YourApp.xcodeproj
└── perkox-ios-sdk-release-{version}/
```

Xcode references local Swift Packages by path. If the SDK folder is moved after being added, Xcode may not be able to find the package.

***

## Quick Start

After installing the SDK, you can launch the Perkox Offerwall using your **App ID**, **SDK Key**, and a unique **Player ID**.

You can find your App ID and SDK Key inside the Perkox Publisher Dashboard.

***

### Basic Swift Implementation

```
import UIKit
import PerkoxOfferwall

class ViewController: UIViewController {

    private func showOfferwall() {
        let offerwall = PerkoxOfferwall.create(
            appId: "YOUR_APP_ID",       // Your App ID
            sdkKey: "YOUR_SDK_KEY",     // Your SDK Key
            playerId: "Player_123"      // Unique player ID
        )

        offerwall.launch(viewController: self)
    }
}
```

***

## API Reference

### PerkoxOfferwall

`PerkoxOfferwall` is the main entry point for creating and launching the Perkox Offerwall.

| Method     | Parameters                                            | Returns     | Description                      |
| ---------- | ----------------------------------------------------- | ----------- | -------------------------------- |
| `create()` | `appId: String`, `sdkKey: String`, `playerId: String` | `Offerwall` | Creates a new Offerwall instance |

***

### Offerwall

The `Offerwall` object is used to launch the offerwall and listen to basic offerwall events.

| Method / Property         | Type                          | Description                                                   |
| ------------------------- | ----------------------------- | ------------------------------------------------------------- |
| `launch(viewController:)` | `UIViewController`            | Presents the offerwall modally from the given view controller |
| `onReward`                | `(([String: Any?]) -> Void)?` | Callback triggered when a reward event is received            |
| `onClose`                 | `(() -> Void)?`               | Callback triggered when the offerwall is closed               |

***

## Listening to Events

You can listen to reward and close events by setting callbacks before launching the offerwall.

### Important Reward Handling Notice

Do **not** rely only on SDK reward callbacks to grant rewards to users.

SDK callbacks only work while the offerwall is active inside the app. For accurate and reliable reward processing, rewards should be handled server-side using the **Postback URL** configured in your Perkox dashboard.

Recommended reward flow:

```
User completes offer
→ Perkox validates conversion
→ Perkox sends postback to your server
→ Your backend verifies the event
→ Your backend credits the user
```

Use SDK callbacks mainly for UI feedback, logs, or temporary in-app updates.

The `onReward` callback may be triggered multiple times for the same transaction with different statuses, such as `pending`, `approved`, `rejected`, or `reversed`.

***

### Full Swift Example with Callbacks

```
import UIKit
import PerkoxOfferwall

class ViewController: UIViewController {

    private func showOfferwall() {
        let offerwall = PerkoxOfferwall.create(
            appId: "YOUR_APP_ID",
            sdkKey: "YOUR_SDK_KEY",
            playerId: "Player_123"
        )

        // Handle reward events
        offerwall.onReward = { reward in
            DispatchQueue.main.async {
                let amount = reward["amount"] as? Double ?? 0
                let status = reward["status"] as? String ?? "?"
                let txid = reward["txid"] as? String ?? "?"
                let playerId = reward["player_id"] as? String ?? "?"

                print("Reward received! Amount: \(amount), Status: \(status)")
            }
        }

        // Handle offerwall close event
        offerwall.onClose = {
            DispatchQueue.main.async {
                print("Offerwall closed")
            }
        }

        // Launch the offerwall
        offerwall.launch(viewController: self)
    }
}
```

***

## Reward Data Fields

When a reward event is received, the SDK may return the following fields:

| Field       | Type     | Description                                |
| ----------- | -------- | ------------------------------------------ |
| `amount`    | `Double` | Reward amount                              |
| `txid`      | `String` | Unique transaction ID                      |
| `status`    | `String` | Reward status                              |
| `player_id` | `String` | Player ID passed during SDK initialization |

***

### Reward Statuses

| Status     | Description                             | Recommended Action                              |
| ---------- | --------------------------------------- | ----------------------------------------------- |
| `pending`  | Reward is being reviewed or processed   | Do not grant final reward yet                   |
| `approved` | Reward has been validated               | Credit the user server-side                     |
| `rejected` | Reward was not approved                 | Do not credit the user                          |
| `reversed` | Previously approved reward was reversed | Adjust or remove the reward if already credited |

***

## Player ID

The `playerId` should be a unique and stable identifier for the user inside your app.

Examples:

```
player123
user_98765
account_45678
```

The Player ID is important because it allows your backend to identify which user should receive the reward.

Best practices:

* Use a stable internal user ID
* Do not use random temporary values
* Do not use sensitive personal information
* Make sure the same user keeps the same Player ID across sessions

***

## Reward Validation Best Practice

For production integrations, Perkox recommends using server-side reward validation through postbacks.

The SDK callback is useful for listening to events inside the app, but the final reward credit should happen on your backend.

Recommended production setup:

```
App launches Perkox Offerwall with playerId
→ User completes an offer
→ Perkox validates conversion
→ Perkox sends postback to publisher backend
→ Publisher backend checks txid and status
→ Publisher backend credits the user
```

This helps prevent duplicate rewards, missed rewards, and client-side manipulation.

***

## Troubleshooting

### 1. `No such module 'PerkoxOfferwall'` Build Error

Check the following:

* Make sure you selected your app target when the **Add Package** prompt appeared
* Go to your target settings
* Open **General → Frameworks, Libraries, and Embedded Content**
* Verify that `PerkoxOfferwall` is listed
* Clean the build folder using **Product → Clean Build Folder**
* Rebuild the project

Shortcut:

```
Cmd + Shift + K
```

***

### 2. Xcode Cannot Find the Local Package After Moving Files

Xcode references local Swift Packages by path.

If you move the SDK folder after adding it, the package reference may break.

To fix this:

1. Remove the package from the project
2. Go to **File → Packages → Reset Package Caches**
3. Re-add the package from its new location

Best practice:

Keep the extracted SDK folder next to your `.xcodeproj` file or inside a stable `/SDKs` folder.

***

### 3. Offerwall Not Loading Content

Check the following:

* Verify that your `appId` is correct
* Verify that your `sdkKey` is correct
* Check the device internet connection
* Make sure the `playerId` is not empty
* Make sure the app/property is active inside the Perkox dashboard
* Test on a real device if simulator behavior is inconsistent

***

### 4. Reward Callback Not Triggering

Possible reasons:

* The offerwall was closed before the event was returned
* The conversion is still pending
* The reward was processed server-side through postback
* The user did not complete the offer requirements
* The transaction status has not changed yet

For production reward handling, always rely on server-side postbacks.

***

## Changelog

### v1.0.0

Initial iOS SDK release.

Included:

* Lightweight iOS offerwall integration
* Local Swift Package support
* `PerkoxOfferwall.xcframework`
* Basic Swift implementation
* Reward callback support
* Close callback support
* Server-side postback recommendation

***

## Support

For questions, issues, or feature requests, contact:

```
support@perkox.com
```

When contacting support, include:

* App ID
* SDK version
* iOS version
* Xcode version
* Device model
* Error logs if available
* Description of the issue
* SDK Integration\
  └── iOS SDK


# Perkox React Native SDK

Official documentation for integrating the Perkox Offerwall into React Native applications.

Official React Native SDK for integrating the **Perkox Offerwall** into iOS and Android applications. Allow your users to earn rewards by completing offers, surveys, and engagement tasks with native performance.

***

#### Key Features

* **Single Cross-Platform Package**: Clean TypeScript/JavaScript API supporting both iOS and Android.
* **Native Performance**: Backed by the official native Android (Kotlin) and iOS (Swift/XCFramework) Perkox SDKs.
* **Architecture Support**: Compatible with React Native 0.60+ (both New Architecture and Paper legacy architecture).
* **Expo Prebuild & Dev Client**: Fully compatible with modern Expo workflows via Expo Config Plugins or Prebuild.
* **Apple Privacy Manifest**: Bundled with Apple's mandatory `PrivacyInfo.xcprivacy` out of the box.

***

#### Requirements

| Requirement               | Supported Version                                                         |
| ------------------------- | ------------------------------------------------------------------------- |
| **React Native**          | `0.60.0+` (New Architecture & Paper supported)                            |
| **Expo**                  | Bare React Native or Expo Dev Client / Prebuild (`expo-build-properties`) |
| **iOS Deployment Target** | `13.0+`                                                                   |
| **Android minSdk**        | `21` (Android 5.0 Lollipop) or higher                                     |
| **Android targetSdk**     | `36` (Android 15 ready)                                                   |

***

### Installation

Install the SDK using your package manager of choice:

```bash
# Using NPM
npm install @perkoxofficial/react-native-sdk

# Using Yarn
yarn add @perkoxofficial/react-native-sdk

# Using PNPM
pnpm add @perkoxofficial/react-native-sdk
```

***

### Platform Setup

#### iOS Setup

After installing the package, install the required CocoaPods dependencies:

```bash
cd ios && pod install && cd ..
```

> **Apple Privacy Manifest**: The SDK includes Apple's mandatory `PrivacyInfo.xcprivacy` manifest automatically. No manual privacy configuration is required.

#### Android Setup

1. **Permissions**: The `INTERNET`, `ACCESS_NETWORK_STATE`, and `AD_ID` permissions are included automatically via Android Manifest merging:

   ```xml
   <uses-permission android:name="android.permission.INTERNET" />
   <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
   <uses-permission android:name="com.google.android.gms.permission.AD_ID" />
   ```
2. **JitPack Repository**: Ensure `maven { url 'https://www.jitpack.io' }` is present in your project's `android/build.gradle` (or `settings.gradle`):

   ```groovy
   allprojects {
       repositories {
           google()
           mavenCentral()
           maven { url 'https://www.jitpack.io' }
       }
   }
   ```

***

### Quick Start Guide

#### Basic Implementation

```tsx
import React, { useEffect } from 'react';
import { View, Button, Alert } from 'react-native';
import { PerkoxSDK, PerkoxReward } from '@perkoxofficial/react-native-sdk';

export default function App() {
  useEffect(() => {
    // 1. Initialize the Perkox SDK
    PerkoxSDK.init({
      appId: "YOUR_APP_ID",       // Your App ID from Perkox Dashboard
      sdkKey: "YOUR_SDK_KEY",     // Your SDK Key from Perkox Dashboard
      playerId: "Player_123",     // Unique player / user identifier
      beta: false,                // Set to true to test with sandbox backend
    });

    // 2. Listen to Reward events
    const unsubscribeReward = PerkoxSDK.onReward((reward: PerkoxReward) => {
      console.log('Reward received:', reward);
      Alert.alert('Reward', `Received ${reward.amount} coins!`);
    });

    // 3. Listen to Offerwall Close events
    const unsubscribeClose = PerkoxSDK.onClose(() => {
      console.log('Offerwall closed');
    });

    // Clean up listeners on unmount
    return () => {
      unsubscribeReward();
      unsubscribeClose();
    };
  }, []);

  const handleShowOfferwall = async () => {
    const success = await PerkoxSDK.showOfferwall();
    if (!success) {
      Alert.alert('Error', 'Failed to launch Perkox Offerwall.');
    }
  };

  return (
    <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
      <Button title="Open Offerwall" onPress={handleShowOfferwall} />
    </View>
  );
}
```

***

### API Reference

#### `PerkoxSDK` (Static Methods)

| Method                    | Parameters                       | Returns            | Description                                                                         |
| ------------------------- | -------------------------------- | ------------------ | ----------------------------------------------------------------------------------- |
| `init(config)`            | `PerkoxInitConfig`               | `Promise<boolean>` | Initializes the SDK with global configuration.                                      |
| `showOfferwall(options?)` | `PerkoxInitConfig?`              | `Promise<boolean>` | Launches the native Offerwall modal.                                                |
| `setUserId(userId)`       | `string`                         | `Promise<boolean>` | Updates the active player / user identifier dynamically.                            |
| `onReward(callback)`      | `(reward: PerkoxReward) => void` | `() => void`       | Registers a listener for reward events. Returns an unsubscribe function.            |
| `onClose(callback)`       | `() => void`                     | `() => void`       | Registers a listener for Offerwall dismiss events. Returns an unsubscribe function. |

***

#### Configuration Options (`PerkoxInitConfig`)

| Field      | Type      | Required | Description                                                                |
| ---------- | --------- | :------: | -------------------------------------------------------------------------- |
| `appId`    | `string`  |  **Yes** | Your unique App ID from the Perkox Publisher Dashboard.                    |
| `sdkKey`   | `string`  |  **Yes** | Your SDK Key from the Perkox Publisher Dashboard.                          |
| `playerId` | `string`  |  **Yes** | Unique identifier for the user (cannot be empty).                          |
| `beta`     | `boolean` |    No    | When `true`, routes to the beta sandbox environment (`beta.perkwall.com`). |

***

#### Reward Object (`PerkoxReward`)

| Field    | Type     | Description                                    |
| -------- | -------- | ---------------------------------------------- |
| `amount` | `number` | The reward amount / currency credited.         |
| `txid`   | `string` | Unique transaction ID for the reward.          |
| `status` | `string` | Reward transaction status (`completed`, etc.). |

***

### Critical Requirements

#### 1. Package ID / Bundle Identifier Matching

The Android `applicationId` / package name (e.g. `com.example.myapp`) and iOS `bundleIdentifier` **MUST** match the exact Package ID registered for your App in the [Perkox Publisher Dashboard](https://pub.perkox.com).

> **Warning**: If the Package ID does not match, the Offerwall API returns: `{"success": false, "message": "Invalid package_id for this offerwall"}` causing zero offers to be displayed.

#### 2. Server-Side Postbacks for Secure Rewards

> **Important**: Do **not** rely exclusively on client-side `onReward` callbacks to grant high-value rewards, as client callbacks only execute while the app is active. Always configure **Server-Side Postbacks** in the Perkox Dashboard for reliable, tamper-proof reward validation.

```
https://yourapp.com/api/perkox/postback?user_id={user_id}&amount={amount}&tx_id={tx_id}&offer_id={offer_id}&status={status}
```

***

### Troubleshooting

| Issue                                  | Cause & Solution                                                                                                                              |
| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| **Offerwall opens but shows 0 offers** | Verify that your Android `applicationId` / iOS `bundleIdentifier` exactly matches the registered Package ID in the Perkox Dashboard.          |
| **Expo Go Error**                      | Custom native modules cannot run inside standard Expo Go. Use Expo Prebuild (`npx expo run:android` / `npx expo run:ios`) or Expo Dev Client. |
| **Invalid player\_id**                 | Ensure `playerId` is not an empty string (`""`). Always pass a unique, non-empty user identifier during `PerkoxSDK.init()`.                   |

***

### Support

Need help with integration?

* **Dashboard**: [pub.perkox.com](https://pub.perkox.com)
* **Email**: <support@perkox.com>


# Perkox Flutter SDK

The Perkox Flutter SDK allows you to integrate the Perkox offerwall into your Flutter applications. Written in Dart, it provides native performance on both Android and iOS from a single codebase.

## Installation

Add the Perkox Flutter SDK to your `pubspec.yaml`:

```yaml
dependencies:
  perkox_sdk: ^1.0.0
```

Then run:

```bash
flutter pub get
```

## Initialization

Import and initialize the SDK in your app:

```dart
import 'package:perkox_sdk/perkox_sdk.dart';

void main() {
  Perkox.initialize(
    apiKey: 'YOUR_API_KEY',
    appId: 'YOUR_APP_ID',
  );
  runApp(MyApp());
}
```

## Show the Offerwall

Display the offerwall to your users:

```dart
Perkox.showOfferwall(
  context: context,
  playerId: 'user_12345',
  onReward: (reward) {
    setState(() {
      userBalance += reward.amount;
    });
  },
);
```

## Server-Side Postback (Recommended)

For secure reward validation, configure a server-side postback URL in the Perkox dashboard. Perkox sends a server-to-server callback when a user completes an offer:

```
https://yourapp.com/api/perkox/postback?user_id={user_id}&amount={amount}&tx_id={tx_id}&offer_id={offer_id}&status={status}
```

The postback is signed with your secret key. Always verify the signature on your server before crediting rewards. See the Postback URL Configuration guide for details.

## Configuration Options

| Parameter    | Type     | Required | Description                     |
| ------------ | -------- | -------- | ------------------------------- |
| apiKey       | String   | Yes      | Your Perkox API key             |
| appId        | String   | Yes      | Your app ID from dashboard      |
| playerId     | String   | Yes      | Unique user identifier          |
| currencyName | String   | No       | Virtual currency name           |
| onReward     | Function | No       | Callback when user earns reward |

## Platform Setup

### Android

The SDK automatically configures Android. No additional setup required beyond the Flutter plugin installation.

### iOS

Add the following to your ios Podfile if not already present:

```ruby
target 'YourApp' do
  use_frameworks!
  pod 'PerkoxSDK'
end
```

Then run:

```bash
cd ios && pod install
```

## Offerwall Entry Point

Add an Earn Coins button in your app shop or store screen:

```dart
ElevatedButton(
  onPressed: () {
    Perkox.showOfferwall(
      context: context,
      playerId: currentUserId,
    );
  },
  child: Text('Earn Coins'),
)
```

## Testing

Before going live, test the offerwall integration:

1. Use your test API key from the Perkox dashboard
2. Complete a test offer to verify the postback
3. Check that the reward is credited correctly
4. Verify the postback signature on your server

## Troubleshooting

**Offerwall not showing:** Ensure you have initialized the SDK with valid API key and app ID.

**Rewards not crediting:** Check your postback URL configuration and server-side validation.

**Build errors on iOS:** Run pod install in the ios directory after adding the dependency.

## Support

Need help? Contact us at <support@perkox.com> or visit pub.perkox.com.

## Next Steps

* Postback URL Configuration
* Currency Configuration
* Design Customization
* SDK Overview


# Perkox Unity SDK

The official **Perkox Offerwall SDK for Unity** enables game developers to integrate high-converting, rewarded offerwalls into mobile games for Android and iOS with native performance.

With Perkox, players can earn in-game virtual currency (coins, gems, energy) by completing offers, surveys, and rewarded actions.

***

#### Key Features

* **Single Cross-Platform C# API**: Clean, static methods for Unity game developers.
* **Native Android & iOS Power**: Powered by the official Perkox Android SDK (Kotlin) and iOS SDK (Swift/XCFramework).
* **Unity Editor Simulation (Mock Mode)**: Test your game loop, UI, and reward distribution directly inside the Unity Editor without crashes or errors.
* **Automated Dependency Resolution**: Supports Google External Dependency Manager for Unity (EDM4U) and CocoaPods.
* **Anti-Fraud & Verification**: Built-in verification and attribution tracking for maximum publisher revenue protection.

***

#### Requirements

| Requirement           | Supported Version                    |
| --------------------- | ------------------------------------ |
| **Unity Editor**      | Unity 2020.3 LTS or higher           |
| **Android**           | Android 5.0 (API Level 21) or higher |
| **iOS**               | iOS 12.0 or higher, Xcode 14+        |
| **Scripting Backend** | Mono or IL2CPP                       |

***

### Installation

#### Method 1: Unity Package Manager (UPM via Git URL) — Recommended

1. In the Unity Editor, navigate to **Window** > **Package Manager**.
2. Click the **`+`** icon in the top-left corner and select **Add package from git URL...**
3. Enter the public release repository URL:

```
https://github.com/perkoxofficial/perkox-unity-sdk-releases.git
```

*(Or specify a tag: `https://github.com/perkoxofficial/perkox-unity-sdk-releases.git#v2.0.0`)* 4. Click **Add**. Unity will automatically download and install the package into your project.

#### Method 2: `.unitypackage` Manual Import

1. Download the latest `Perkox-Unity-SDK-v2.0.0.unitypackage` from the official GitHub Releases.
2. Drag and drop the `.unitypackage` into your Unity project window (or go to **Assets** > **Import Package** > **Custom Package...**).
3. Ensure all files are checked and click **Import**.

***

### Quick Start Guide

#### 1. Initialize the SDK

Call `PerkoxSDK.Initialize()` early in your game lifecycle (for example, in your GameManager's `Awake()` or `Start()`):

```csharp
using UnityEngine;
using Perkox;
using Perkox.Models;

public class GameManager : MonoBehaviour
{
    [Header("Perkox Credentials")]
    [SerializeField] private string androidAppId = "YOUR_ANDROID_APP_ID";
    [SerializeField] private string androidSdkKey = "YOUR_ANDROID_SDK_KEY";

    [SerializeField] private string iosAppId = "YOUR_IOS_APP_ID";
    [SerializeField] private string iosSdkKey = "YOUR_IOS_SDK_KEY";

    private void Awake()
    {
#if UNITY_IOS
        string appId = iosAppId;
        string sdkKey = iosSdkKey;
#else
        string appId = androidAppId;
        string sdkKey = androidSdkKey;
#endif

        // Initialize with default or guest player ID (optional)
        PerkoxSDK.Initialize(appId, sdkKey, "player_guest_123", beta: false);

        // Register event listeners
        PerkoxSDK.OnOfferwallOpened += HandleOfferwallOpened;
        PerkoxSDK.OnOfferwallClosed += HandleOfferwallClosed;
        PerkoxSDK.OnRewardReceived += HandleRewardReceived;
        PerkoxSDK.OnOfferwallError += HandleOfferwallError;
    }

    private void OnDestroy()
    {
        // Unregister event listeners
        PerkoxSDK.OnOfferwallOpened -= HandleOfferwallOpened;
        PerkoxSDK.OnOfferwallClosed -= HandleOfferwallClosed;
        PerkoxSDK.OnRewardReceived -= HandleRewardReceived;
        PerkoxSDK.OnOfferwallError -= HandleOfferwallError;
    }

    // Event callbacks
    private void HandleOfferwallOpened()
    {
        Debug.Log("[Game] Offerwall opened. Pause audio or game timer.");
    }

    private void HandleOfferwallClosed()
    {
        Debug.Log("[Game] Offerwall closed. Resume game.");
    }

    private void HandleRewardReceived(PerkoxReward reward)
    {
        // Access reward data
        double payout = reward.GetDouble("payout", 0);
        string currency = reward.GetString("currency", "Coins");

        Debug.Log($"[Game] User earned reward: {payout} {currency}!");
        // Credit virtual currency to player balance
    }

    private void HandleOfferwallError(string error)
    {
        Debug.LogError($"[Game] Offerwall Error: {error}");
    }
}
```

***

#### 2. Set Player ID (User Identification)

When a player signs in or their unique account ID becomes known, update the SDK:

```csharp
PerkoxSDK.SetUserId("player_user_98765");
```

> **Important**: The `playerId` must NOT be empty. Always provide a unique user identifier so rewards and postbacks are accurately attributed to the player.

***

#### 3. Show the Offerwall

Call `PerkoxSDK.ShowOfferwall()` when the player taps on an "Earn Rewards" or "Offerwall" button:

```csharp
public void OnOfferwallButtonClicked()
{
    PerkoxSDK.ShowOfferwall();
}
```

***

### Critical: Package ID Matching Requirements

The Perkox backend validates incoming requests against registered App credentials (`app_id`, `sdk_key`, and `package_id`).

| Platform    | Setting in Unity                                                 | Requirement                                                                   |
| ----------- | ---------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| **Android** | **Player Settings** > **Identification** > **Package Name**      | **MUST** match the Android Package ID registered in your Perkox Dashboard.    |
| **iOS**     | **Player Settings** > **Identification** > **Bundle Identifier** | **MUST** match the iOS Bundle Identifier registered in your Perkox Dashboard. |

> **Warning**: If the Package Name / Bundle ID does not match the dashboard app entry, the offerwall will return `Invalid package_id for this offerwall` and show zero offers.

***

### Platform Specific Setup

#### Android Setup

* **Minimum API Level**: 21 (Android 5.0 Lollipop).
* **Target API Level**: Android 14 (API Level 34) or latest Google Play requirement.
* If using EDM4U (External Dependency Manager for Unity), resolve dependencies via **Assets** > **External Dependency Manager** > **Android Resolver** > **Resolve**.

#### iOS Setup

* **Target SDK**: iOS 12.0 or higher.
* Post-build script (`PerkoxPostProcessBuild.cs`) automatically configures the Xcode project with Swift 5.0 and `-ObjC` linker flags.
* Run `pod install` in the generated Xcode project directory if using CocoaPods.

***

### Unity Editor Simulation (Mock Mode)

When testing inside the Unity Editor (Play Mode):

1. `PerkoxSDK.Initialize()` safely logs initialization parameters to the Unity Console.
2. Calling `PerkoxSDK.ShowOfferwall()` triggers simulated callbacks:
   * Fires `OnOfferwallOpened`
   * Dispatches a test `OnRewardReceived` callback (100 Coins)
   * Fires `OnOfferwallClosed`
3. Allows complete game loop verification without building native Android or iOS binaries.

***

### Server-Side Postback (Recommended)

For secure reward validation, configure a server-side postback URL in your Perkox Dashboard. When a player finishes an offer, Perkox sends a secure server-to-server callback:

```
https://yourapp.com/api/perkox/postback?user_id={user_id}&amount={amount}&tx_id={tx_id}&offer_id={offer_id}&status={status}
```

Verify the postback signature with your secret key before crediting virtual currency to player balances.

***

### Support

Need help with integration?

* **Dashboard**: pub.perkox.com
* **Email**: <support@perkox.com>


# Settings

## **Settings Section Documentation**

The **Settings Section** in the Perkox dashboard allows you to manage your account settings, profile information, and preferences. This section is essential for personalizing your account, ensuring accurate information, and configuring notification preferences. Below is a breakdown of the components and functionality:

***

###

***

### **1. Profile Settings**

This section allows you to update your personal profile information.

#### **Fields in the Profile Section**:

* **First Name**: Enter your first name.
* **Last Name**: Enter your last name.
* **Email**: Your email address (e.g., `example@gmail.com`).
* **Phone**: Enter your phone number.
* **Messenger**: Select your preferred messaging app (e.g., Skype).
* **Messenger ID**: Enter your ID for the selected messaging app.
* **Street Address**: Enter your street address.
* **City**: Enter your city.

***

### **2. Password Settings**

This section allows you to change your account password.

#### **Steps to Change Password**:

1. Navigate to the **Password** section.
2. Enter your current password.
3. Enter your new password.
4. Confirm your new password.
5. Save the changes.

***

### **3. Notification Settings**

This section allows you to configure your notification preferences.

#### **Steps to Configure Notifications**:

1. Navigate to the **Notifications** section.
2. Choose the types of notifications you want to receive (e.g., email, SMS).
3. Save your preferences.

***

<figure><img src="https://852195915-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fu0RqI0ASoELMpNHq8lgd%2Fuploads%2FejnQ3RfcePJKNvY2x2tV%2FScreenshot%202026-06-04%20at%201.11.43%E2%80%AFAM.png?alt=media&amp;token=27297c1d-5129-4595-9510-7d3385d2b511" alt=""><figcaption></figcaption></figure>

### **Example Workflow for Settings Section**

1. **Navigate to Settings**: Click on the **Settings** option in the navigation menu.
2. **Update Profile**:
   * Enter your **First Name** and **Last Name**.
   * Update your **Email**, **Phone**, and **Messenger** details.
   * Enter your **Street Address** and **City**.
3. **Change Password**:
   * Go to the **Password** section.
   * Enter your current and new passwords.
   * Save the changes.
4. **Configure Notifications**:
   * Go to the **Notifications** section.
   * Select your preferred notification types.
   * Save your preferences.

***

### **Why the Settings Section Matters**

* **Account Management**: Keep your account information up-to-date and accurate.
* **Security**: Regularly update your password to ensure account security.
* **Personalization**: Configure notifications to stay informed about important updates and activities.

***

### **Additional Notes**

* **Data Accuracy**: Ensure all profile information is accurate to avoid issues with account verification or communication.
* **Security Practices**: Use strong, unique passwords and update them regularly to protect your account.


