This document describes TopOn's Ad Impression Revenue Server-Side Callback API (S2S), which allows developers to receive real-time callbacks of ad impression events on their own server.
Precautions
- Developers must ensure their server has sufficient capacity to receive the data. We recommend that the developer's server only receives the data, and that any subsequent processing be handled by a separate service or other asynchronous logic. Note: TopOn does not retry when a callback fails.
- Developers must implement their own deduplication, using the combination of
req_idandadsource_idas the deduplication key. - On a successful callback, the developer's server must respond with HTTP status code 200. Any other status code is treated as a failure.
- Please contact your Account Manager (AM) to enable this feature and to provide your receiving endpoint (callback URL).
Request Method
GET
Callback Parameters
| Parameter | Type | Description |
|---|---|---|
| user_id | string | User ID set by the developer. This is the developer-customized information reported by the SDK — specifically the user_id field within the custom parameter in TK. |
| req_id | string | Provided by TopOn. Use req_id together with adsource_id for deduplication. |
| geo_short | string | Country short code, e.g. "CN". |
| package_name | string | Package name of the current app, e.g. com.happy.xx. |
| adformat | int | Ad format enum: 0 = Native, 1 = Rewarded Video, 2 = Banner, 3 = Interstitial, 4 = Splash. |
| placement_id | string | Taku placement ID, reported by the SDK, e.g. "bxxxx2323232677". |
| nw_firm_id | int | ID of the ad network, e.g. 1 = Meta. https://help.toponad.net/docs/2KR6QU |
| adsource_id | int | Ad source ID, reported by the SDK, e.g. 5003245. |
| adsource_price | double | eCPM — the eCPM of a single ad impression, e.g. 3.24. |
| currency | string | Currency unit (currently always USD), e.g. "USD". |
| timestamp | int64 | Ad impression timestamp from the SDK, in milliseconds. |
| client_ip | string | User's IP address. |
| gaid | string | Google Advertising ID (GAID). Android only. |
| oaid | string | Android device ID (OAID). |
| imei | string | Android device ID (IMEI). |
| idfa | string | iOS device ID (IDFA). |
| idfv | string | iOS device ID (IDFV). |
| amazon_id | string | Amazon device ID (supported in SDK 6.2.50+). Android only. |
| show_custom_ext | string | Impression custom extension parameter (supported in SDK 6.3.10+). A string, e.g. "{"tag":11}". |