Offer callbacks

This page describes on how to utilize callbacks for different offer states.

What is an offer callback?

An offer callback is a specific callback only sent for offer state changes (also called stateful offer callbacks). The offer callbacks work differently from the general reward callbacks since you will receive all the different states of an offer or offer task as well as additional information about the offer or offer task.

How to set up offer callbacks

To set up the offer callbacks, visit the Publisher Dashboard -> Apps -> Your App -> Integration -> Offer Reward Callback:

IMPORTANT: You can enable the stateful offer callbacks, which have the following effects:

  • Offer callbacks for all states will be sent now (Before only COMPLETED and RECONCILED would be sent)
    • Please configure the Offer Reward Callback and the Offer Reconciliation Callback separately.
  • The transaction ID for each state change will be the same
  • The TYPE parameter will return the type COMPLETE for COMPLETED or PENDING states or RECONCILIATION for RECONCILED state.
    • It is recommended not to use TYPE for offers.
  • Reconciliation callbacks are no longer negative

If you don't enable stateful callbacks, the transaction IDs for reconciled callbacks will have an or prefix instead of just o. You can reference back to the initial callback by looking up the ref parameter.


To configure a new URL, press the cog wheel to open the callback URL configurator:

Multiple fields have to be filled out:

  • Callback URL Host: Enter the callback endpoint URL you have set up.
  • Protocol: In most cases, you want to leave it as is.
  • Callback Parameter: Here you can add all the parameters you need to process the callbacks correctly. We highly recommend that you have the following parameters in there: UID, TX, VAL, and RAW.
    • For offers, we also recommend to add the following parameters: offer_id, task_id and offer_state. offer_state will return the state of an offer: PENDING, RECONCILED, COMPLETED. Learn more about the offer states here.
  • Custom Parameter: In case you want to attach a parameter yourself, you can add it here. However, it does only support static parameters.
  • Example URL: This shows you an example callback URL that you would receive. Keep in mind the hash in the example is not a valid one!

Here is an example of how a callback URL could be configured:

Press the Save button and then the Save Changes button in the top right.

Callback batches

In rare cases, event attribution issues may occur, leading us to send batches of callbacks. Your system might mistakenly flag this as fraud.

🚧

If you encounter any discrepancies, please contact our team for clarification.

Offer states

Each offer callback will have a different state. The following states are available:

COMPLETED: The COMPLETED callback will be sent when an offer task is completed. A COMPLETED callback can also be sent if a user completes an install task, which usually gives a $0 reward.

PENDING: A PENDING callback will be sent when an offer is completed, but the reward is still pending. This can be the case when delayed crediting (a security feature) is enabled. After a PENDING callback was sent, a COMPLETED or RECONCILED can follow.

RECONCILED: A RECONCILED callback will be sent when an offer reward is reconciled. This means that we deduct the reward, mainly because of fraudulent reasons. 95% of reconciliations occur in the first 30 days after completion, but technically a reconciliation can occur anytime. A RECONCILED callback can either occur after a PENDING or after a COMPLETED was sent. A reconciliation amount can be 0, if a non rewarded event was reconciled, such as an install event.

In some cases, the same event may be converted multiple times. This does not indicate a state change but rather represents a multi-convertible event. To prevent duplicate processing, always check the transaction ID and implement deduplication logic accordingly.

🚧

Make sure to only reward users for offer_state=COMPLETED callbacks!

Reconciliation callbacks

These callbacks notify you when previous transactions have been reconciled. This happens when we detect fraudulent behavior, in which case the transaction has to be reversed. If you are paying users with real money, we highly recommend setting up these reconciliation callbacks, as they may prevent users from cashing out unrightfully.

It is important to know that a reconciliation will no longer be negative, and the transaction ID for every state change will be the same if stateful offer callbacks are enabled.

If stateful callbacks are disabled, every reconciliation callback has a unique transaction ID that differs from the transaction ID of the complete callback. If you need the transaction ID of the complete callback instead, look at the [%REF%] parameter.

We offer a dedicated callback field to receive reconciliation callbacks on a separate endpoint.

Ban callbacks

In case of fraud, our system bans users. To help you recognize it, we will send a ban callback. Please ask our account management to enable this callback option for you. Once enabled, you can configure it on the BitLabs Dashboard:

You can paste in the following URL while replacing publisher.com to match your endpoint. Keep in mind that, as for all callbacks, a hash for validation will be attached at the end.

<https://publisher.com?uid=[%UID%]&ban_reason=[%BAN_REASON%]&ban_state=[%BAN_STATE%]>
ParameterTypeDescription
[%BAN_REASON%]StringReturns the reason for a user ban.
[%BAN_STATE%]StringReturns ACTIVE or BANNED.

This will ban the user from all games and offers and only games and offers. They will still be able to complete surveys and upload receipts.

In-App purchases

🚧

Starting April 2025, all purchases for an offer will be reported, instead of only the first purchase per user.

Our callback system supports In-App purchase events. When a user makes a purchase in a game, you'll receive a callback event with the purchase amount. It functions like a standard offer task completion callback but includes additional details.

The following callback parameters will help you identify the In-App purchase events:

ParameterTypeDescription
[%OFFER:TASK:IAP:USD%]FloatThe USD amount of a single in-app purchase of an app.
[%OFFER:TASK:HIDDEN%]IntegerShows if the in-app purchase event was visible to the user or not: 0 when the event is visible, 1 when it's hidden.
[%OFFER:TASK:TYPE%]IntegerShows which type of offer callback it is as a number: 1 for install, 2 for event 3 for in-app purchase and 4 for time played events (e.g. "Play 5 days in a row").

Offer parameters

For offers, we do provide additional parameters for additional information:

ParameterTypeDescription
[%OFFER_ID%]IntegerID of the completed task's offer. One offer can have many tasks.
[%TASK_ID%]IntegerID of the completed task.
[%OFFER_STATE%]StringIt can only be used when using Stateful Offer Callbacks. One of: NONE, COMPLETED, PENDING, RECONCILED.
It isNONE if stateful offer conversion callbacks are disabled (this is the default). If they are enabled, however, it indicates the latest state of the offer conversion.
[%OFFER_NAME%]StringLocalized name of the offer. Language is equivalent to what the user saw.
[%TASK_NAME%]StringLocalized name of the task. Language is equivalent to what the user saw.
[%OFFER:TITLE%]StringReturns the anchor name of an offer.
[%OFFER:DELAY%]IntegerReturns the user reward delay in minutes.
[%OFFER:TASK:IAP:USD%]FloatThe USD amount of a single in-app purchase of an app.
[%OFFER:TASK:HIDDEN%]IntegerShows if the in-app purchase event was visible to the user or not: 0 when the event is visible, 1 when it's hidden.
[%OFFER:TASK:TYPE%]IntegerShows which type of offer callback it is as a number: 1 for install, 2 for event 3 for in-app purchase and 4 for time played events (e.g. "Play 5 days in a row").

For a full list of all parameters, click here.

How to test offer callbacks

We offer a callback tester on the dashboard to test your configured callback endpoints. Learn more about it here.


Testing with real offers

To test with a real offer you can visit the offer wall, select a game, and install it. This way you will either receive a COMPLETED offer callback or a PENDING one, depending on whether delayed crediting is enabled or not.


Frequently Asked Questions

Find a list of frequently asked questions.

I'm getting a 3103 error when testing

This issue can appear due to many factors. Please contact your account manager for more insights, and make sure to provide your user ID.