Magic Receipt callbacks

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

What is a Magic Receipt callback?

A magic receipt callback is a specific callback only sent for magic receipt state changes (also called stateful magic receipt callbacks). The magic receipt callbacks work differently from the general reward callbacks since you will receive all the different states of a receipt and additional information about the receipt.

How to set up Magic Receipts callbacks

To set up the magic receipt stateful callbacks, visit the Publisher Dashboard -> Apps -> Your App -> Integration -> Magic Receipts Callback:

IMPORTANT: You can enable the stateful magic receipts callbacks which have the following effects:

  • Magic receipt callbacks for all states will be sent now (Before only COMPLETED would be sent)
  • The transaction ID for each state change will be the same
  • The TYPE parameter will return the type state_change
    • It is recommended not to use TYPE for magic receipts.

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 magic receipts, we also recommend to add the magic_receipt_state parameter. magic_receipt_state will return the state of a receipt: PENDING, REVIEWING, RECONCILED, COMPLETED. Learn more about the magic receipt 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.

Magic Receipt states

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

COMPLETED: The COMPLETED callback will be sent when a receipt is approved. This is the only final state and can not change.

PENDING: A PENDING callback will be sent when a reward for a magic receipt is pending. After a PENDING callback was sent, a COMPLETED or RECONCILED can follow.

REVIEWING: A REVIEWING callback will be sent when a receipt goes into manual review. A support person takes a look at the receipt. After a REVIEWING callback was sent, a COMPLETED or RECONCILED can follow. REVIEWING can only occur once after a RECONCILIED was fired. A specific receipt submission can only be once in REVIEWING.

RECONCILED: A RECONCILED callback will be sent when a magic receipt is rejected. You can use the reason and reason ID macros to learn more about the rejection. A RECONCILED state is never final and can change to a COMPLETED or REVIEWING.

🚧

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

Magic Receipt parameters

For magic receipts we do provide additional parameters for additional information:

ParameterTypeDescription
[%MAGIC_RECEIPT_STATE%]StringIt can only be used when using Stateful Magic Receipts Callbacks. One of: COMPLETED, PENDING, RECONCILED, REVIEWING
[%RECEIPT:OFFER:ID%]IntegerReturns the offer ID
[%RECEIPT:OFFER:NAME%]StringReturns the offer name
[%RECEIPT:UPLOAD:ID%]IntegerReturns an ID that is associated to an upload
[%RECEIPT:UPLOAD:OFFER:ID%]IntegerReturns the offer ID
[%MAGIC_RECEIPT_REASON%]StringReturns the reason why a receipt got rejected or approved.
[%MAGIC_RECEIPT_REASON_ID%]IntegerReturns the id of the reason.

For a full list of all parameters click here. For more information on the magic receipt reasons, click here.

How to test Magic Receipt callbacks

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

Legacy way of testing

🚧

The following part of the documentation explains how callbacks were tested before the callback tester on the dashboard existed. We highly recommend not using the following method anymore!

You can simulate a callback by following these steps:

  1. Set up the magic receipts callback
  2. Copy the URL in the configuration modal at the bottom
  3. Replace the hash in the URL with the real hash according to this page
  4. Replace the reward amount, state and user ID with the correct ones
  5. Open the URL in the web browser

This will send you a callback with which you can test your system.

Magic Receipt Reasons and Reason IDs

In the following table you can see all the different reason IDs and descriptions.

statusIDStatusDescriptionUser Facing Description
1Pending ReviewPending automated reviewThe receipt is pending and waiting to get reviewed.
2RejectedError parsing receipt - manual reviews disabled
3RejectedReceipt is duplicate - different memberIt looks like your receipts was already in our system. Please make sure to now upload duplicate receipts.
4RejectedOffer no longer availableSorry, but this offer is no longer available.
5RejectedOffer not added to member listYour receipt was rejected, because the offer is not in your cart.
6RejectedUnable to parse receipt merchant (legacy)
7RejectedUnrecognized receipt merchantWe were unable to identify the merchant on the receipt.
8RejectedSelected merchantID and receipt merchant mismatch (legacy)
9RejectedOffer purchased at incorrect merchantThe offer is not available for the selected merchant. Please make sure to purchase an item at the correct merchant.
10RejectedUnable to parse receipt dateYour receipt was rejected. We were unable to identify the receipt date.
11RejectedReceipt date before offer start dateYour receipt was rejected because the purchase was made before the offer went live.
12RejectedReceipt date after offer end dateSorry, but this offer is no longer available.
13RejectedMember already completed offer max number of timesYou reached the maximum amount of rewards you can get for this offer.
14RejectedNo matching line items foundSorry, we weren't able to find any matching items on your receipt.
15RejectedInsufficient quantity available for offerYour receipt was rejected due to the offer not being available anymore.
16RejectedPartner rejected completionYour receipt was rejected because of various reasons. If you think it should have not been rejected, please send it in for a manual review.
17ApprovedAwardedYour receipt was approved.
18RejectedInternal errorAn internal error occurred. Please try again.
19RejectedNo goals found
20RejectedAll goals capped
21RejectedOffer already in manual reviewThis receipt is already in manual review.
22RejectedAn error occurred. Rolling back awardAn internal error occurred. Please try again.
23Pending ReviewPending manual review - manual offerYour receipt is under manual review.
24Pending ReviewUnder manual reviewYour receipt is under manual review.
25ApprovedAwarded manuallyYour receipt was approved.
26RejectedIncomplete receiptYour receipt is incomplete. Please upload a new image of the receipt.
27RejectedDuplicate receipt - manual reviewIt looks like your receipts was already in our system. Please make sure to now upload duplicate receipts (manually reviewed).
28Pending ReviewUser requested manual review pendingYour receipt is currently in the manual review process.
29RejectedOffer purchased at incorrect state (legacy)
30Pending ReviewDuplicate receipt from same user. Forced into manual reviewIt looks like your receipts was already in our system, however, our team will have a second look at it.
31RejectedFraudYour receipt was not accepted by our system. Please review it and resubmit a different image.
32Pending ReviewMember previously uploaded fraud reciept - Forced manual reviewYour receipt was not accepted by our system. Our team will review it.
33Pending ReviewRate limiter prevented : Successfully uploaded x receipts
34Pending ReviewRate limiter prevented : Redeemed X awards
35Pending ReviewRate limiter prevented : Earned X dollars
36Pending ReviewAwaiting E-Receipt Email
37RejectedMatching E-Receipt Email Not Found
39RejectedDuplicate Any receiptIt looks like your receipts was already in our system. Please make sure to now upload duplicate receipts.
40ApprovedAdmin Courtesy AwardYour receipt was approved.
41RejectedReceipt Date Out Of RangeYour receipt date is outside the offers date ranges. Please read the disclaimer of the offer.
42ApprovedFirst time courtesy awardYour receipt was approved.
43RejectedOffer purchased at incorrect medium
44Pending ReviewPending COS Review
45RejectedError Uploading to COS
46RejectedOffer Already Under COS Review
47RejectedNon COS Offer
48RejectedReceipt Is A ScreenIt looks like the receipt image is taken from a screen. Please take a photo of the real receipt.
49Pending ReviewCOS Import: Under review
50RejectedCOS Import: Receipt denied
51RejectedCOS Import: Receipt ineligible
52ApprovedCOS Import: Awarded
53RejectedCOS Import: Receipt approved, offer denied
54RejectedCOS Import: Receipt approved, error awarding
55RejectedRekognition FraudYour receipt was not accepted by our system. Please review it and resubmit a different image.
56Award PendingAutomated approved, award pendingYour receipt was approved. Your reward will be granted soon.
57ApprovedAward credited after pending periodYour receipt was approved.
58ApprovedManually credited pending awardYour receipt was approved. Your reward will be granted soon.
59RejectedBulk Transition - Rejected
60ApprovedBulk Transition - Standard AwardYour receipt was approved.
61ApprovedBulk Transition - Courtesty AwardYour receipt was approved.
62Pending ReviewRekognition Possible FraudYour receipt was not accepted by our system. Please review it and resubmit a different image.
63Pending ReviewRekognition Certain Fraud - Pending Manual ReviewYour receipt was not accepted by our system. Our team will review it.
64RejectedDuplicate Receipt Same Offer AwardedIt looks like your receipts was already in our system, however, our team will have a second look at it.
65RejectedReceipt Contains Banned Phrases
66RejectedAny Receipt Already UsedYou already used up this offer for now. Please look at the offer disclaimer for more information.
67RejectedAll Line Items Are For Curbside Pickup
68RejectedOffer already PendingThe receipt offer is already pending.
69Award PendingRate Limiter Pending: Successfully uploaded x receipts
70Award PendingRate Limiter Pending: Redeemed X awards
71Award PendingRate Limiter Pending: Earned X dollars
72RejectedAll Line Items Have Incorrect Order Status
73RejectedREKOGNITION_FRAUD_MANUAL_REVIEW_DISABLED
74RejectedRATE_LIMITER_AWARD_PENDING_DISABLED
75Pending ReviewQUOTIENT_PENDING_UPLOADOur team will review the uploaded receipt shortly.
76Pending ReviewQUOTIENT_PENDING_REVIEWOur team will review the uploaded receipt shortly.
77RejectedQUOTIENT_FAILED_UPLOADThe upload failed. Please try uploading the receipt again.
78RejectedQUOTIENT_REJECTEDYour receipt was rejected. Please make sure to add the offer to your list and then submit the receipt.
79RejectedQUOTIENT_DUPLICATE_RECEIPTIt looks like your receipts was already in our system. Please make sure to now upload duplicate receipts.
80Award PendingQUOTIENT_APPROVED_AWARD_PENDINGYour receipt was approved. Your reward will be granted soon.
81RejectedQUOTIENT_APPROVED_ERROR_AWARDINGOn further review, your receipt was rejected. No further information available.
82RejectedQUOTIENT_EXPIRE_OLD_UPLOADSYour receipt was rejected, due to an expired offer.
83RejectedQUOTIENT_RECEIPT_DATE_BEFORE_ACTIVATIONYour receupt was rejected. The purchase date is before the offer was available.
84RejectedQUOTIENT_NO_TRANSACTION_IDYour receipt was rejected, due to an error. Please try again.
85Pending ReviewPending Manual Review - Admin RequestedYour receipt is currently under review.
86RejectedImage Size Inadequate - Possible FraudYour receipt was not accepted by our system. Please review it and resubmit a different image.
87Pending ReviewQUOTIENT_MANUAL_REVIEWYour receipt is currently under review.
88RejectedQUOTIENT_MANUAL_REVIEW_REJECTEDYour receipt was not accepted by our system. Please review it and resubmit a different image.
89RejectedQUOTIENT_MANUAL_REVIEW_ALREADY_REVIEWEDYour receipt was not accepted by our system. Please review it and resubmit a different image.
90RejectedQUOTIENT_MANUAL_REVIEW_INSUFFICIENT_QUANTITYYour receipt was rejected due to insufficient quantity of the item. Please read the offer disclaimer for more information.
91ApprovedQUOTIENT_MANUAL_REVIEW_APPROVEDYour receipt was approved.
92RejectedQUOTIENT_MANUAL_REVIEW_FRAUDYour receipt was not accepted by our system. Please review the image and resubmit a different image.
93ApprovedQUOTIENT_APPROVED_AUTOMATEDYour receipt was approved.
94Pending ReviewQuantity mismatch - manual reviewYour receipt is currently under review.
95Award PendingBarcode Scan AwardYour receipt was approved. Your reward will be granted soon.
96ApprovedOverrode Expired UploadYour receipt was approved.
97Pending ReviewAuto Manual ReviewYour receipt is currently under review.
98Award PendingAll Line Items Are For Curbside Pickup AllowedYour receipt was approved and your reward will be granted soon.
99RejectedBad BarcodeYour receipt was rejected due to a bad barcode. Please review it and resubmit a different image.
100Pending ReviewSecondary Manual ReviewYour receipt is currently under review.
101Pending ReviewError Parsing Receipt Retry UploadYour receipt is currently under review.
102RejectedError Parsing Receipt Retry FailedYour receipt was rejected due to an error. Please try again with a different image.
103Pending ReviewSecondary Manual Review From ApprovalYour receipt is currently under review.
104Pending ReviewQUOTIENT_SECONDARY_MANUAL_REVIEWYour receipt is currently under review.
105ApprovedQUOTIENT_APPROVED_SECONDARY_MANUAL_REVIEWYour receipt was approved.
106INTERNALINTERNALINTERNAL
107Pending ReviewReceipt is DigitalYour receipt is currently manual under review.
108Pending ReviewReceipt image size is too smallYour receipt is currently manual under review.
109Pending ReviewReceipt is FraudulentYour receipt is currently under manual review.
110RejectedEXPIRE_OLD_UPLOADSYour receipt was rejected.
111Pending ReviewImage was flagged as not a receipt imageYour receipt is currently under manual review.
112Pending ReviewQuotient Rekognition Possible FraudYour receipt is currently under manual review.
113Pending ReviewQuotient Rekognition Certain FraudYour receipt is currently under manual review.
114RejectedQuotient Rekognition FraudYour receipt was flagged by the system and will be submitted to the manual review queue.