Webhooks
Webhook types

transaction.created

3min

This event is triggered when a new transaction is created in the system.

Most webhooks for a transaction are received within 24 to 48 hours after the transaction has been made. Webhooks for card-linked offer transactions are sent after transactions have settled.

Payload format

Below is an example of a payload format for receiving transaction.created event type webhooks.

JS


All time values are in the Coordinated Universal Time (UTC) time zone.

Data object

The table below describes the fields in the data object for the transaction.created 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:

  • 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.

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:

  • Option 1: If the Publisher opts for Finfare to distribute cashback directly to the users, the publisher_share amount reflects the Publisher's commission.
  • Option 2: If the Publisher distributes rewards or cashback to users with funds from Finfare (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.