Monitor User Transactions
Under Redeem > Transactions, you can view every transaction made by your users. A transaction is whenever a user redeemed their tokens for a reward. These rewards or redeem options are configured under Redeem > Options.
When a user redeems their reward, a POST request is sent to your external integration that manages reward distribution. Xtremepush does not manage the actual distribution of the reward. This POST request and transaction details are recorded in the Transactions tab.
A transaction is successful only after a confirmation event is received from your distribution provider.
The following details are recorded for each transaction.
- ID: The unique transaction ID. This is unique for every transaction even if multiple transactions are made by the same user.
- Option: The name(ID) of the redeem option you configured in the Options tab.
- Status: The status of the transaction:
-
Success: The transaction is successful.
-
Failure: The transaction failed. When a transaction fails, the token balance is returned to the user.
-
Pending: The transaction is processing and may take some time to complete.
-
Postponed: The POST request is sent to your reward distribution provider. The transaction is set to a postponed status by your provider. The transaction remains in this status until the provider sends a successful response. You can confirm or cancel the transaction in the Transactions tab.
-
Recoverable-failure: The transaction failed and the tokens cannot be returned to the user. You must confirm or cancel the transaction in the Transactions tab as shown in the image below:
-
- User ID: The user ID of the user that made the redeem request.
- Events: Each transaction contains three specific events. See Transaction Events below for more information.
- Created At: The timestamp when the user made the request to redeem a reward on your widget.
Transaction Events
Expanding a transaction record displays the events triggered for each transaction. The specific events can vary depending on the scenario, but the following sequence represents the most common and simple scenario for successful transactions.
- User initially triggered redeem option: This event is triggered when the user selects the redeem option. The payload includes the email address of the user who made the request.
- Token withdrawal result: This event is triggered when the user's token balance is updated following a redemption request. Because tokens are used to purchase rewards, the payload contains the User ID, the Transaction ID, and the token balance of the user both before and after the transaction.
- Message posted: This event is sent to your integration that manages reward distribution. The payload includes the following details:
- event: The name of the event.
- redeemOptionName: The name (ID) of the redeem option configured in the Options tab.
- transactionId: The unique transaction ID.
- userId: The ID of the user who made the request.
- price: The price of the product in tokens.
- productName: The title of the redeem option configured in the Options tab.
- address: The address of the user who made the request.
- email: The email address of the user who made the request.
The following example shows a payload for Free Tickets costing 200 tokens:
{
"event": "redeem.static",
"redeemOptionName": "5c787af5-d28e-4567-809c-b030877d9355",
"namespace": "1",
"transactionId": "eefa3829-2d0c-4785-ab52-5e10e7eb404e",
"userId": "User 123",
"price": 200,
"productName": "Free Tickets",
"address": "address_123",
"email": "[email protected]"
}Updated about 5 hours ago