Magic Receipts Postbacks

This page describes how Magic Receipts postback works.


A user can upload an image of a receipt that contains purchases for multiple items, for example Chocolate and Apples. Use Magic Receipts postbacks to receive notifications on your server whenever the status of each offer item in the receipt changes.

There are four possible statuses:





Once an offer is APPROVED, it cannot transition to another status.

Setting Up a Postback

In order to receive postbacks for Magic Receipts events, you must set a URL that we should fire within the AdGate dashboard on the Postbacks page.

  1. Log in to the AdGate dashboard and open the Postbacks page.

  2. In the Offer-Specific Postbacks section, click Add Offer Postback and search for "397622", which is the "Shopper Marketing" offer ID.

  3. Enter the URL you would like us to send postbacks to and press Submit.

Example Postback URL:{conversion_id}&user_id={s1}&point_value={points}&usd_value={payout}&shm_upload_id={shm_upload_id}&shm_upload_offer_id={shm_upload_offer_id}&shm_status={shm_status}&shm_event_id={shm_event_id}

The postback URL will be fired as a POST request.

We will replace all of the macros, such as {conversion_id}, with the actual value (such as "4d63afe33875ceeec17dd7eab41b8590a".) On your server, you will read the "conversion_id" GET variable to retrieve this macro's value.

Understanding IDs

  • Each receipt that is uploaded corresponds to a single Upload ID

  • Each Upload can have multiple Offer IDs associated with it

  • Each offer on the receipt has its own Upload Offer ID, which is unique to an Upload and Offer.

  • Whenever a status changes for an offer, there is a corresponding Event ID

  • A single Offer or Upload Offer may have multiple approvals or other statuses. For example, if an offer is for purchasing Apples, then 3 purchased apples result in one offer with multiple approval (and other) events.

Available Macros

You may add any of the following macros to your postback URLs. They will be replaced with the corresponding values.


User ID

String or Integer


Number of points/credits the user should be rewarded with

Decimal or Integer


Amount in USD that you earned for this event. It will be a positive number for APPROVED statuses.



Provided only for APPROVED statuses. This is the state of the conversion. Possible values are: approved - the conversion is approved rejected - a conversion that was previously pending or approved was reversed pending - the user has completed the offer but the conversion will be approved at a later date If this macro is not present in your postback URL, postbacks will only be sent for approved conversions.



Additional subID values that can be appended to your offer wall URL



Unique ID of the conversion generated by AdGate Media. Applicable only for the APPROVED status.



IP address of the user that completed the offer



Date of the APPROVED status formatted as YYYY-MM-DD



Current time of conversion formatted as HH:MM:SS



Randomly generated number



Two letter country code representing the user's location.



Delay in minutes before the conversion is approved.



A unique ID for the uploaded receipt.



A unique ID given for a specific offer found on a specific receipt (upload).



The global ID for the offer that was uploaded (e.g. for Apples)



The name of the offer that was uploaded (e.g. "Apples")



The status of the Magic Receipt upload for an individual offer. Possible values are: MANUAL_REVIEW - the upload is under review. AWARD_PENDING - An award will likely awarded later, barring any fraud issues. APPROVED - the upload is approved. REJECTED - the upload is rejected.



Unique ID for the status update.



The reason for the current status. For example, if a receipt is rejected, a reason might be "No Matching Offers".



The datetime of the upload status update formatted as YYYY-MM-DD HH:MM:SS


All values are URL encoded.

With this postback, you can receive the receipt image URLs that can be retrieved from the POST request body. The image URLs have a limited lifetime of 7 days. The request body you can expect is a JSON object of this format:

  "images": [

Expected Response

AdGate Media's servers expect an HTTP Status Code 200 from your postback URL. If this response is not received from your URL, we will attempt to resend the postback up to 5 times. There is a 5 minute delay between each attempt.

Security Recommendations

To prevent tampering, it is important that the postback URL that is used is unique to AdGate Media. For additional security, you may whitelist the following server IP:


To troubleshoot any postback issues, you may visit your Postback Reports page here:

This page will show a 30 day history of all postbacks on your account.

Last updated