Skip to main content

Offer Server Callbacks

When a user completes an offer goal (examples: Download App, Reach Level 7, etc.), inBrain provides callback data to your server via a POST request containing a payload of data.

Configuring Offer Callbacks

Callback URL's are configured within the dashboard on https://publisher.inbrain.ai. Only the success callback URL is used with offers from the inBrain Platform.

Offer Callback Payload

POST ​http://yourdomainname.com/path/to/your/successendpoint
{
"Sig": "cd917216cb4cb02648bb96ac77760269",
"PanelistId": "6a8c5d53-d8bf-4a3e-ba54-460d00f5caa0​",
"OfferTitle": "The Offer Name",
"RewardType": "offer_completed",
"RewardId": "c55b3483-5755-42f8-9bc5-5c185862e35a",
"Reward": 100,
"RevenueAmount": 1.00
}

Explanation of Payload Properties

PropertyTypeDescription
SigstringSignature used to verify the authenticity of the callback request. See more on how to verify requests using ‘Sig’ in the next section
PanelistIdstringThe unique app_uid provided within the iFrame configuration
OfferTitlestringTitle of the offer provided for basic display purposes
RewardTypestringFor offer conversions, the RewardType will be “offer_completed”. Note that for integrations using both offers AND surveys, this RewardType will be different for Surveys
RewardIdstringUnique Identifier of an offer completion.
This can also be used to check for any duplicates in the event that your system receives duplicate callback requests
RewarddecimalThe amount of In App Currency that the user should be awarded for the survey outcome. This value is calculated based on your IAC (In App Currency) setting in the publisher dashboard
RevenueAmountdecimalRevenue Amount in USD earned from the offer conversion

Signature Validation

To compute and verify the ‘Sig’ property of a callback request, combine the following properties along with the Callback Secret found in the ​Callback ​tab of your publisher dashboard:

[PanelistId] + [RewardId] + [CallbackSecret]

Next compute an MD5 hash of the resulting concatenated string. The result should be a hash value matching the Sig property in the callback request.