transaction.updated
This event is triggered when a status for a transaction changes. Possible values for a transaction status are as follows:
- PENDING - A transaction in which rewards are not available yet. Pending transactions can be cancelled and refunded.
- EARNED - A transaction that has passed the pending state. This status indicates that the rewards have been released to the user for redemption. Earned transactions cannot be canceled or refunded.
- CANCELLED - A transaction that is ineligible to have rewards redeemed by the user.
Below is a general example of a payload format for receiving transaction.updated event type webhooks.
For transactions with a CANCELLED status, the publisher_share and user_cashback fields will have a value of 0.
All time values are in the Coordinated Universal Time (UTC) time zone.
The table below describes the fields in the data object for the transaction.updated webhook.
Field | Data type | Description |
---|---|---|
transaction_uid | string | Unique identifier for the transaction. |
transaction_date_time | string <date-time> | Date and time of when the transaction took place. The format of this string is: yyyy-MM-dd'T'HH:mm:ss This is an important attribute that determines if the offer was or was not valid for this transaction. All time values are in the Coordinated Universal Time (UTC) time zone. |
reward_type | string | This is the type of reward made available by the brand. Possible values with their definitions: DISCOUNT_DOLLAR- Dollar amount that is deducted from the subtotal of a transaction DISCOUNT_PERCENTAGE- Percentage amount that is deducted from the subtotal of a transaction CASHBACK_DOLLAR- Dollar amount earned as cashback rewards CASHBACK_PERCENTAGE- Percentage of a subtotal that is earned as cashback rewards |
offer_type | array of strings | Type of the offer. Possible values with their definitions: CARD_LINKED - Offers that provide rewards for card linked transactions AFFILIATE - Offers where the user gets a reward for making a purchase through an affiliate link GIFT_CARD - Offers that provide rewards for when a user purchases gift cards VOUCHER_CODE - Offers that provide rewards in the form of voucher codes |
user_cashback | number | Cashback amount earned by the user for this transaction. Precision is up to two decimal places. IMPORTANT: If the Publisher distributes rewards or cashback to users with funds from (i.e. cashback earned from user's transactions are paid directly to the Publisher), then the Publisher's commission is determined by subtracting the user_cashback amount from the publisher_share amount. |
transaction_amount | number <double> | A positive number representing the amount that is intended to be transacted. The amount value supports up to two digits in precision, for example, $24.99. The minimum amount supported is 0 and there is no limit on the maximum amount, however, each offer has limits on maximum amounts eligible for rewards. For example, 5% cashback up to $1000. Only United States Dollar (USD) and British Pound Sterling (GBP) supported currently depending on the region covered by the Publisher. |
currency_code | string | Type of currency, for example: USD which indicates United States Dollar. |
status | string | Status of a transaction which determines reward availability to the user. Possible values:
|
brand_uid | string | Unique identifier for a brand. This can then be used to retrieve details about a specific brand. |
offer_uid | string | Unique identifier for the offer in the UUID4 format. Can be used to retrieve additional details for the offer. |
publisher_share | number | The commission amount that a Publisher earns from a transaction. IMPORTANT: The method of calculating this commission depends on the Publisher’s chosen approach to distributing rewards or cashback to their users. Refer to the options below to accurately interpret the value in the publisher_share field:
|