# Postback Information

## What is a Postback?

A postback allows you to receive notifications on your server every time your account receives a conversion. This is necessary in order for you to be able to provide your users with rewards. For example, whenever you receive a conversion, you may wish to be notified what the payout, user ID, and point value is.

We are also able to send you a postback in the case that a lead may be reversed.

**Example Postback URL: `http://yoururl.com/postback/?conversion_id={conversion_id}&user_id={s1}&point_value={points}&usd_value={payout}&offer_title={vc_title}`**

We will replace all of the macros, such as `{conversion_id}`, with the actual value (such as "4d63afe33875ceeec17dd7eab41b8590a".) On your server, you will read the "conversion\_id" GET variable to retrieve this macro's value.

### Receiving postbacks

Chargebacks: in order to receive postbacks for chargebacks/reversals, your postback URL must contain the `{state}` macro.

Non-payable events: offers can have events that are for informational purposes only, and do not provide a payout. To receive postbacks for these events, your postback URL must contain the `{event_id}` macro. The `{payout}` value for these event will be 0.

## Available Macros

You may add any of the following macros to your postback URLs. They will be replaced with the corresponding values.

| Macro                | Replaced Value                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Variable Type      |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
| {s1}                 | User ID                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | String or Integer  |
| {source}             | Represents the ID of the offer wall or publisher sub-source in the format `vc-[int]`  -- e.g. `vc-123`                                                                                                                                                                                                                                                                                                                                                                      | String             |
| {points}             | Number of points/credits the user should be rewarded with                                                                                                                                                                                                                                                                                                                                                                                                                   | Decimal or Integer |
| {vc\_title}          | Title of the offer as it was displayed on the offer wall.                                                                                                                                                                                                                                                                                                                                                                                                                   | String             |
| {payout}             | Amount in USD that you earned for this conversion                                                                                                                                                                                                                                                                                                                                                                                                                           | Decimal            |
| {state}              | <p>This is the state of the conversion. Possible values are:<br><br><code>approved</code> - the conversion is approved<br><br><code>rejected</code> - a conversion that was previously pending or approved was reversed<br><br><code>pending</code> - the user has completed the offer but the conversion will be approved at a later date<br><br>If this macro is not present in your postback URL, postbacks will only be sent for <code>approved</code> conversions.</p> | String             |
| ~~{status}~~         | <p>DEPRECATED VALUE: please use {state} instead.<br><br><del>Value will be 1 for a new approved conversion. If this macro is present in your postback, then the postback will also be resent in the case of a reversed conversion. In that case, the value will change to 0 while all other values will remain the same.</del></p>                                                                                                                                          | Integer            |
| {offer\_id}          | ID of the offer as displayed on the AdGate Media dashboard                                                                                                                                                                                                                                                                                                                                                                                                                  | Integer            |
| {product\_id}        | ID of the product as displayed on the Adgate Media dashbaord                                                                                                                                                                                                                                                                                                                                                                                                                | String             |
| {offer\_name}        | Name of the offer as displayed on the AdGate Media dashboard                                                                                                                                                                                                                                                                                                                                                                                                                | String             |
| {event\_id}          | UUID of the specific event that was converted                                                                                                                                                                                                                                                                                                                                                                                                                               | String             |
| {event\_id\_nodash}  | Use this event UUID only if your data type does not support dashes.                                                                                                                                                                                                                                                                                                                                                                                                         | String             |
| {event\_name}        | Description of the event as displayed to the user                                                                                                                                                                                                                                                                                                                                                                                                                           | String             |
| {s2},{s3},{s4},{s5}  | Additional subID values that can be appended to your offer wall URL                                                                                                                                                                                                                                                                                                                                                                                                         | String             |
| {conversion\_id}     | Unique ID of the conversion generated by AdGate Media                                                                                                                                                                                                                                                                                                                                                                                                                       | String             |
| {session\_ip}        | IP address of the user that completed the offer                                                                                                                                                                                                                                                                                                                                                                                                                             | String             |
| {date}               | Current date of conversion formatted as YYYY-MM-DD                                                                                                                                                                                                                                                                                                                                                                                                                          | String             |
| {time}               | Current time of conversion formatted as HH:MM:SS                                                                                                                                                                                                                                                                                                                                                                                                                            | String             |
| {created\_at}        | Current timestamp of the conversion as unix timestamp in seconds                                                                                                                                                                                                                                                                                                                                                                                                            | Integer            |
| {ran}                | Randomly generated number                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Integer            |
| {country}            | Two letter country code representing the user's location.                                                                                                                                                                                                                                                                                                                                                                                                                   | String             |
| {delay}              | Delay in minutes before the conversion is approved.                                                                                                                                                                                                                                                                                                                                                                                                                         | Integer            |
| {recommended\_delay} | Recommended delay in minutes before the conversion should be approved.                                                                                                                                                                                                                                                                                                                                                                                                      | Integer            |
| {event\_type}        | ID used to identify the type of the converted event                                                                                                                                                                                                                                                                                                                                                                                                                         | Integer            |
| {is\_lead\_credit}   | Indicates if the conversion is a lead credit                                                                                                                                                                                                                                                                                                                                                                                                                                | Integer            |
| {is\_game}           | Indicates if the offer is a game                                                                                                                                                                                                                                                                                                                                                                                                                                            | integer            |
| {is\_timeplayed}     | Indicates if the event is a time played goal                                                                                                                                                                                                                                                                                                                                                                                                                                | integer            |
| {funnel\_id}         | Unique identifier of the request to the User Based API to track the impression to conversion funnel                                                                                                                                                                                                                                                                                                                                                                         | string             |

All values are URL encoded.

## Rejected Reasons <a href="#rejection-reason-codes" id="rejection-reason-codes"></a>

The system returns the internal rejection reason codes directly. Here are the possible rejection reason codes:

| `DUPE_COOKIE`                                  | Duplicate Cookie                 |
| ---------------------------------------------- | -------------------------------- |
| `POSTBACK_COUNTRY_MISMATCH`                    | Country Mismatch                 |
| `SKIPPED_EVENTS`                               | Skipped Events                   |
| `HIGH_FRAUD_SCORE`                             | High Fraud Score                 |
| `HIGH_IPQS_FRAUD_SCORE`                        | High IPQS Fraud Score            |
| `ADJUST_FRAUD`                                 | Adjust Fraud                     |
| `DCH_IP_BLOCK`                                 | DCH IP Block                     |
| `DEVICE_NOT_ALLOWED`                           | Device Not Allowed               |
| `VC_USER_ALREADY_CONVERTED`                    | User Already Converted           |
| `TXID_ALREADY_CONVERTED`                       | Transaction ID Already Converted |
| `IP_ALREADY_CONVERTED`                         | IP Already Converted             |
| `CHARGEBACK`                                   | Chargeback                       |
| `EVENT_NOT_PROMISED`                           | Event Not Promised               |
| `CLICK_EXPIRED`                                | Click Expired                    |
| `OFFER_EVENT_EXPIRED`                          | Offer Event Expired              |
| `VC_USER_BLOCKED`                              | User Blocked                     |
| `NOT_TIME_PLAYED_EVENT`                        | Not Time Played Event            |
| `TIME_PLAYED_GOAL_MISMATCH`                    | Time Played Goal Mismatch        |
| `NO_TP_GOAL_ID_PROVIDED_FOR_TIME_PLAYED_EVENT` | No TP Goal ID Provided           |
| `REATTRIBUTED`                                 | Reattributed                     |

## Expected Response

AdGate Media's servers expect an HTTP Status Code 200 from your postback URL. If this response is not received from your URL, we will attempt to resend the postback up to 5 times. There is a 5 minute delay between each attempt.&#x20;

## Security Recommendations

To prevent tampering, it is important that the postback URL that is used is unique to AdGate Media. \
\
For additional security, you may whitelist the following server IPs:

* 52.42.57.125
* 54.186.70.83
* 52.39.181.185
* 54.190.14.75
* 52.11.36.128
* 54.191.9.88
* 3.21.111.51
* 3.135.140.42
* 3.133.245.65

## Testing and Troubleshooting

To test the postback functionality on your AdGate Rewards offer wall, you may enable the "Test Mode" feature in your offer wall settings. Enabling Test Mode will create an offer at the top of your offer wall. This offer will convert immediately upon click for easy postback testing. We do not recommend enabling this feature on a live offer wall.

To troubleshoot any postback issues, you may visit your Postback Reports page here: [https://dash.adgatemedia.com/affiliate/reports/postbacks](https://panel.adgatemedia.com/affiliate/reports/postbacks)

This page will show a 30 day history of all postbacks on your account.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.prodegeads.com/postbacks/postback-information.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
