API Integration (Advanced)

API Setup


Generate Wall ID and API Keys

Before writing any code, you'll need to use the self-guided setup process in the RevU portal to create an offerwall placement and and get your API keys.

  • Access the Publisher Portal: log in and open the Offerwall tab. Contact your account manager if you need account credentials.

  • Create a New Wall: Fill out the creation form to define your currency name and reward ratio.

  • Note your Offerwall ID: Once created, your unique ID will appear in the leftmost column of the dashboard. You'll need this for making API calls.

  • Get Your Wall API Keys: Click the API Keys link to generate or regenerate your keys. These keys are used to authenticate requests to the RevU API.

  • Get Your Account API Keys: This key is separate from your wall-specific key and can be retrieved in the Publisher Portal under My Account > Account API Key. You'll need this key for some of our APIs.

Postback Configuration (Server-to-Server)

Postbacks allow RevU to notify your server when a user completes an offer. When a completion event is detected, RevU sends an HTTP GET request to an endpoint you define, passing event details as URL parameters. This allows your system to credit users automatically without any client-side interaction.

Postbacks are also referred to as S2S, server pixel, callback, or closed loop notifications depending on your platform.

Postback Setup

  • Access the Publisher Portal: log in and open the Offerwall tab.

  • Setup Postback: Click the Setup Postback link to define your Postback URL.

Postback URL Format

Your postback URL should include the variables you want RevU to populate, defined using the placeholder syntax below. RevU will replace each placeholder with the corresponding value at the time the postback is fired.

https://www.mysite.com/myscript.php?campaign=$campaign$&userid=$sid$&status=$status$
https://www.mysite.com/myscript.php?campaign=$campaign$&userid=$sid$&status=$status$
https://www.mysite.com/myscript.php?campaign=$campaign$&userid=$sid$&status=$status$


Important

If you are setting up a postback for a specific offer wall's virtual currency, don't forget to select a type (deployment) from the dropdown list before adding the URL.

Variables

Variable

Description

$campaign$

The campaign ID number of the offer being posted.

$name$

The name of the offer being posted.

$rate$

The commission earned (i.e, 5.75). If the offer is being reversed, this will be a negative number (i.e, -5.75).

$status$

This will be either 1 or 2, for completed or reversed, respectively.

$actionid$

The network action ID for this lead.

$ip$

The IP address recorded when the user clicked the offer.

$timestamp$

UNIX timestamp (UTC) of the conversion.

$useragent$

Browser user agent used when clicking the offer.

$tag$

Campaign tag value.

$country$

Country code of user, ISO 3166-1 alpha-2 format.

$clicktimestamp$

UNIX timestamp (UTC) of the click.

$sid$

The SID that you passed to the campaign. Includes your wall ID, ex. “SFB_1234___” where “1234” is the wall ID. Limited to 200 characters.

$sid3$

Additional SID parameter #3. Limited to 200 characters.

$sid5$

Additional SID parameter #5. Limited to 200 characters.

$sid6$

Additional SID parameter #6. Limited to 200 characters.

$uid$

(SID2) - The user's unique identifier.

$currency$

The amount of virtual currency issued. This may be a negative number, indicating a currency revocation (if you opt to pass these along).

$currencytype$

May be one of the following values:

  • 1 – Offer completed

  • 2 – Currency issued by customer service

  • 3 – Offer reversed (currency revocation – currency will have a negative value)

$offertype$

May be one of the following values:

  • 0 – Undefined

  • 1 – Free

  • 2 – Purchase

  • 3 – Trial

  • 4 – Other

  • 5 – Mobile Apps

  • 6 – Clicks and Videos

  • 7 – Studies

  • 8 – Contest

$sid4$

  • Direct Correlation: The $sid4$ placeholder receives the exact sid4 value from the API response, enabling accurate attribution of tier-specific conversions within multi-reward campaigns.

  • Empty Value Handling: The sid4 parameter may contain an empty string, which constitutes a valid event identifier. Your postback processing logic must recognize empty sid4 values as legitimate tier completion events, not as data omissions or system errors. -

  • Uniqueness Constraints: The sid4 value maintains uniqueness only within the scope of its associated campaign. To ensure system-wide uniqueness, combine the sid4 value with the $campaign$ identifier in your tracking implementation to prevent identifier conflicts across different campaigns.

See additional variables documentation within the Publisher Portal. SID, SID3, SID5, and SID6 are limited to 200 characters. SID2/UID is limited to 255 characters.

Ignore Revokes/Reversals

By default, RevU will fire a postback to your server when an offer is reversed or a currency revocation occurs. This allows your system to deduct previously issued rewards from a user's balance.

Enabling Ignore Revokes/Reversals will suppress these reversal postbacks, meaning your server will only be notified of successful completions. Any rewards already issued for a reversed offer will remain in the user's balance and will not be deducted. Note: Suppressing reversal postbacks only affects what is communicated to your server and user-facing reward behavior. Regardless of this setting, reversals will still be deducted from your publisher payments.

Enable this setting only if your system does not support balance deductions or you have made a deliberate decision not to claw back rewards from users on reversal events.

Postback Security

HTTPS postback URLs are fully supported. All postbacks will originate from one of RevU's secure IP addresses. Please configure your postback endpoint to only accept requests from these IPs.

Note

Contact your Account Manager for the complete list of approved IP addresses.

Postback Rules

Postback URLs may be disabled by yourself, or at our discretion (malformed or malicious URL, excessive errors, etc.). Please correct any known problems, then click the "Enable" link next to the URL to begin receiving posts again.

Timeout/Error Policy: Our server must be able to connect in 4 seconds or less, and complete the post in 4 seconds or less, for a total of 8 seconds per post. We will attempt to complete the postback every 10 minutes no more than 6 times; our system will then delete that particular postback. You will receive e-mails in case any of these events occur.

Response Body: If the response body consists of the single word FAIL, FAILED, or FAILURE (case insensitive), the postback will be considered in error and retried as per the policy above.

Testing Postback

Before going live, use the Test Postback URLs tool in the portal under Configure Postbacks to send a test notification to your endpoint without requiring a real offer completion.

To run a test:

  1. Select the offerwall you want to test.

  2. Enter the user ID in the SID2/UID field.

  3. Optionally enter a value in the SID3 field to pass additional information.

  4. Enter the virtual currency amount to award.

  5. Click Submit to fire a test postback to your server.

Check your endpoint to confirm the postback was received and processed correctly before enabling live traffic.

Testing Postback