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.

  • Publisher account API key: Get Offers requires your account key, available in the Publisher Portal under My Account > Account API Key, together with the wall ID. It is separate from a wall-specific key.

  • Other integrations: Get Progress and Get Personalized do not require or validate an API key; both use the wall ID and user ID. Keep wall-specific keys for integrations that explicitly require them.

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=$uid$&status=$status$&event=$event_id$&sid4=$sid4$&crediting=$is_crediting_event$
https://www.mysite.com/myscript.php?campaign=$campaign$&userid=$uid$&status=$status$&event=$event_id$&sid4=$sid4$&crediting=$is_crediting_event$
https://www.mysite.com/myscript.php?campaign=$campaign$&userid=$uid$&status=$status$&event=$event_id$&sid4=$sid4$&crediting=$is_crediting_event$

$uid$ identifies the user. $sid$ carries the original SID, which for offerwall traffic includes the wall placement identifier and is not the user’s ID.


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 in seconds when the postback is queued. Distinct from the conversion timestamp and from $clicktimestamp$.

$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 correlation value from SID3. Keep ASCII values within 200 characters before URL encoding.

$sid5$

Additional correlation value from SID5. Keep ASCII values within 255 characters before URL encoding.

$sid6$

Additional correlation value from SID6. Keep ASCII values within 255 characters before URL encoding.

$uid$

The user’s unique identifier, passed as SID2. Use the same ASCII ID across wall/API requests and clicks, at most 255 characters.

$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$

Raw offer/tier identifier used for conversion matching, corresponding to events[].sid4. $sid4_event_id$ is a compatibility alias. Independent from $event_id$; an empty value can be valid. Correlate it with $campaign$ because it is not globally unique.

$event_id$

Configured RevU event identifier, corresponding to events[].event_id. $eventid$ is a valid alias. Independent from $sid4$; may be empty. No fallback between the two identifiers is generated.

$is_crediting_event$

1 for a crediting event; 0 for a tracking-only event. Use this to distinguish tracking-only activity from payable events.

SID and SID3 support ASCII values up to 200 characters before URL encoding. SID2/UID, SID5 and SID6 support up to 255 each. The complete encoded callback URL must also fit delivery and receiver limits; satisfying each individual limit does not guarantee every combined URL will fit. See the Publisher Portal for additional callback variables.

Choosing event identifiers

API response field

Postback macro

Alias

Meaning

events[].event_id

$event_id$

$eventid$

Configured RevU event identifier.

events[].sid4

$sid4$

$sid4_event_id$

Raw offer/tier identifier used for conversion matching.

The two identifiers are independent. SID4 remains supported; event_id does not replace it. Preserve both values as returned, including empty values, and do not create a fallback from one to the other. Correlate raw SID4 with $campaign$ because it is not globally unique. Do not manually populate SID4 on a click URL.

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

Share feedback on this documentation

On this page

On this page