https://api.popunder.store/v1/X-API-Key header or ?api_key=...
All advertiser endpoints (except postback.php) require an API key.
The key is unique per advertiser and must be kept secret. Treat it like a password.
You can generate or reset your API key in the advertiser interface on the Statistics page, inside the “API Access” block.
The key can be passed either:
X-API-Key: YOUR_KEY_HERE, or?api_key=YOUR_KEY_HERE.// basic example using query parameter GET https://api.popunder.store/v1/stats.php?api_key=YOUR_KEY // basic example using header GET /v1/stats.php X-API-Key: YOUR_KEY
"status": "error" and one of the error codes:
missing_api_key or invalid_api_key,
together with HTTP status 400 or 401.
status field:
"status": "ok" – request was successful."status": "error" – something went wrong.error – machine-readable error code.message – human-readable description.{
"status": "error",
"error": "invalid_date_range",
"message": "date_from must be <= date_to"
}
YYYY-MM-DD format (e.g. 2025-11-26).site_id and source.
/v1/stats.phpReturns aggregated performance metrics for your traffic over a specified date range. The endpoint supports two aggregation modes:
| Parameter | Status | Type | Description |
|---|---|---|---|
api_key |
required | string | Your advertiser API key. |
date_from |
optional | date |
Start of the reporting period in YYYY-MM-DD format.
If omitted, defaults to 7 days before date_to (or today if
date_to is also omitted).
|
date_to |
optional | date |
End of the reporting period. If omitted, defaults to today.
date_to must be greater or equal to date_from.
|
campaign_id |
optional | int | If provided, stats are returned only for this campaign. |
group_by |
optional | string |
Aggregation mode:
campaign (default) – per day & campaign,
site_source – per day, campaign, site_id & source.
|
GET https://api.popunder.store/v1/stats.php?api_key=YOUR_KEY&date_from=2025-11-20&date_to=2025-11-26
group_by=campaign){
"status": "ok",
"date_from": "2025-11-20",
"date_to": "2025-11-26",
"group_by": "campaign",
"campaign_id": null,
"count": 1,
"totals": {
"impressions": 3,
"cost": 0.015,
"revenue": 0,
"conversions": 0,
"ecpm": 5,
"ecpa": 0,
"cr": 0,
"profit": -0.015
},
"data": [
{
"date": "2025-11-26",
"campaign_id": 17,
"campaign_name": "tier1 campaign",
"impressions": "3",
"cost": "0.0150",
"revenue": "0.0000",
"conversions": "0",
"ecpm": "5.00000000",
"ecpa": "0",
"cr": "0.0000",
"profit": "-0.0150"
}
]
}
group_by=site_source){
"status": "ok",
"date_from": "2025-11-20",
"date_to": "2025-11-26",
"group_by": "site_source",
"campaign_id": 17,
"count": 2,
"totals": {
"impressions": 24000,
"cost": 18.00,
"revenue": 25.50,
"conversions": 40,
"ecpm": 0.75,
"ecpa": 0.64,
"cr": 0.0017,
"profit": 7.50
},
"data": [
{
"date": "2025-11-26",
"campaign_id": 17,
"campaign_name": "tier1 campaign",
"site_id": 10,
"source": "main",
"impressions": "15000",
"cost": "12.0000",
"revenue": "18.0000",
"conversions": "30",
"ecpm": "0.8000",
"ecpa": "0.4000",
"cr": "0.0020",
"profit": "6.0000"
},
{
"date": "2025-11-26",
"campaign_id": 17,
"campaign_name": "tier1 campaign",
"site_id": 11,
"source": "9234192",
"impressions": "9000",
"cost": "6.0000",
"revenue": "7.5000",
"conversions": "10",
"ecpm": "0.6667",
"ecpa": "0.7500",
"cr": "0.0011",
"profit": "1.5000"
}
]
}
impressions – number of popunder impressions served.cost – advertiser spend for these impressions (USD).revenue – sum of conversion revenue recorded via postback (USD).conversions – number of tracked conversions.ecpm – effective CPM = cost / impressions * 1000.ecpa – effective CPA = cost / conversions (if conversions > 0).cr – conversion rate = conversions / impressions.profit – revenue - cost. Negative value means you are currently in loss./v1/conversions.php
Returns a list of individual conversions recorded via the advertiser’s postback,
together with aggregated totals (number of conversions and total revenue).
Each conversion is linked to the campaign and to the placement that generated it
via site_id and source.
This endpoint is typically used for:
| Parameter | Status | Type | Description |
|---|---|---|---|
api_key |
required | string | Your advertiser API key. |
date_from |
optional | date |
Start of the period by conversions.created_at.
Defaults to 7 days ago.
|
date_to |
optional | date |
End of the period by conversions.created_at.
Defaults to today.
|
campaign_id |
optional | int | Filter conversions by campaign. |
clickid |
optional | string |
Return conversions only for a specific click_id.
This is mainly used for technical debugging and 1:1 matching with external trackers.
|
limit |
optional | int | Number of rows to return (default 1000, max 10000). |
offset |
optional | int | Offset for pagination (default 0). |
GET https://api.popunder.store/v1/conversions.php?api_key=YOUR_KEY&date_from=2025-11-20&date_to=2025-11-26
{
"status": "ok",
"date_from": "2025-11-20",
"date_to": "2025-11-26",
"campaign_id": null,
"clickid": null,
"count": 2,
"totals": {
"conversions": 2,
"revenue": 4.70
},
"limit": 1000,
"offset": 0,
"data": [
{
"id": 101,
"created_at": "2025-11-25 22:15:59",
"click_id": "22d69d308430f3eaaa569df11e17fb36",
"campaign_id": 18,
"campaign_name": "Example Campaign",
"site_id": 10,
"source": "main",
"revenue": 1.50,
"currency": "USD",
"external_id": "AFF-12345",
"subid0": "US",
"subid1": "GoogleAds",
"subid2": null,
"subid3": null,
"subid4": null
},
{
"id": 102,
"created_at": "2025-11-25 22:20:10",
"click_id": "98bd0f14322789aa7673547e92e87c10",
"campaign_id": 18,
"campaign_name": "Example Campaign",
"site_id": 11,
"source": "984936",
"revenue": 3.20,
"currency": "USD",
"external_id": "AFF-12346",
"subid0": "US",
"subid1": "Native",
"subid2": null,
"subid3": null,
"subid4": null
}
]
}
site_id and source allow you to see exactly
which placements and traffic sources generated each conversion.
subid0–subid4 are stored exactly as they were
received in the postback request. You can use them for tracker campaign ID,
GEO, creative ID, etc.
/v1/campaigns.phpReturns a list of campaigns belonging to the authenticated advertiser, including main configuration fields and targeting settings. This endpoint is useful for:
| Parameter | Status | Type | Description |
|---|---|---|---|
api_key |
required | string | Your advertiser API key. |
campaign_id |
optional | int | Return only a single campaign with this ID. |
status |
optional | string | Filter by status: active, paused, completed, rejected. |
{
"status": "ok",
"count": 2,
"data": [
{
"id": 17,
"name": "tier2 campaign",
"status": "active",
"daily_budget": 20,
"total_budget": 200,
"created_at": "2025-11-20 11:32:10",
"bid": 3.0,
"popunder_url": "https://example.com/?clickid={clickid}",
"geo": ["US"],
"device": ["desktop"],
"os": ["Windows","Mac","Linux"],
"browser": ["Chrome","Firefox","Safari"],
"freq_cap": 3
}
]
}
geo, device, os, browser) are
arrays derived from the JSON settings field in the campaigns table.
popunder_url is the final target URL used for redirects.
PopunderStore automatically appends clickid=... to this URL
when sending traffic.
/v1/balance.phpReturns the current account balance for the authenticated advertiser. The balance is calculated as:
payments table.
stats.spend across all ads for this advertiser.
This endpoint is typically used to display the balance inside custom dashboards or to implement simple budget alerts on your side.
| Parameter | Status | Type | Description |
|---|---|---|---|
api_key |
required | string | Your advertiser API key. |
{
"status": "ok",
"user_id": 42,
"email": "advertiser@example.com",
"currency": "USD",
"total_deposit": 500.00,
"total_spent": 320.53,
"balance": 179.47,
"generated_at": "2025-11-26 22:40:12"
}
/v1/postback.phpThe postback endpoint is used by third-party tracking systems, CPA networks or your own back-end to notify PopunderStore about a conversion that happened after the click. Once the conversion is received and validated, PopunderStore:
conversions table,click_id,https://api.popunder.store/v1/postback.php?clickid={clickid}&revenue={revenue}
| Parameter | Status | Description |
|---|---|---|
clickid |
required |
Unique click identifier. PopunderStore appends this value to your offer URL
as clickid=.... You must store and pass the same value back on conversion.
|
revenue |
optional |
Conversion amount in USD. If you prefer, you may use payout or
cost instead – the script will pick whichever is present and
map it to internal revenue.
|
currency |
optional |
Currency code (default USD). At the moment used as an informational field;
all calculations on our side are done in USD.
|
txid / tid / transaction_id |
optional |
External transaction ID or lead ID from your tracker / CRM / affiliate network.
Stored in conversions.external_id.
|
subid0–subid4 |
optional |
Free-form tracking fields (for example: country, traffic source, campaign ID,
ad group, creative ID). They are stored in conversions.subid0–subid4
and are visible through the conversions.php API.
|
// simplest example — fixed payout
https://api.popunder.store/v1/postback.php?clickid=test123&revenue=1.23
// Clickaine-style example with subids
https://api.popunder.store/v1/postback.php
?clickid={clickid}
&revenue={payout}
&subid0={country}
&subid1={traffic_source}
clickid is not found in traffic_logs,
the endpoint responds with