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
Property | Type | Description | |
---|---|---|---|
Sig | string | Signature used to verify the authenticity of the callback request. See more on how to verify requests using ‘Sig’ in the next section | |
PanelistId | string | The unique app_uid provided within the iFrame configuration | |
OfferTitle | string | Title of the offer provided for basic display purposes | |
RewardType | string | For offer conversions, the RewardType will be “offer_completed”. Note that for integrations using both offers AND surveys, this RewardType will be different for Surveys | |
RewardId | string | Unique 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 | |
Reward | decimal | The 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 | |
RevenueAmount | decimal | Revenue 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.