Stateful Magic Receipt Callbacks

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

Stateful Magic Receipt Callbacks

Per default, BitLabs will only send you the COMPLETED callbacks for magic receipts. Stateful magic receipt callbacks on the other hand, will allow you to receive all callbacks for magic receipts. This option can be enabled on the dashboard in the Integration section. Once enabled, callbacks are sent for all state changes. This is mostly identical to non-stateful callbacks, with the main difference being that the user value and all other attributes are identical for all state updates.

Example callbacks received:

  1. https://publisher-backend.com?tx=o1&raw=2.5&user=user-1&magic_receipt_state=PENDING
  2. https://publisher-backend.com?tx=o1&raw=2.5&user=user-1&magic_receipt_state=COMPLETE

The example shows two callbacks being sent, to first notify you about a pending magic receipt state and then a complete transaction for the same user. Note that raw & tx are identical in both callbacks.

Available Callbacks

Currently BitLabs supports 4 magic receipts callback types: COMPLETED, PENDING, REJECTED and REVIEWING

Pending Magic Receipt Callbacks

The pending state will inform you that a user has submitted a magic receipt and we are waiting for an approval of it. After a pending state callback is received, BitLabs will follow up with either a COMPLETED or REJECTED callback after an unspecified amount of time. You should not give the reward to the user before receiving a COMPLETED callback.

Rejected Magic Receipt Callbacks

When a user has scanned a receipt, it might get rejected due to lack of information on the scanned receipt or other factors. Do not reward users for a rejected callback.

Manual Review Magic Receipt Callbacks

In case a user has asked us to manually review the scanned magic receipt, we send out a REVIEWING callback. After a manual review callback is received, BitLabs will follow up with either a COMPLETED or REJECTED callback after an unspecified amount of time. Similar to the pending state callback, you should not give the reward to the user before receiving a COMPLETED callback.