Webhooks
Overview
Webhooks enable you to communicate with your customers based on platform activity or transactional behavior.
Examples
-
Redemption close-the-loop notifications. Using this webhook, you can communicate at the time of swipe that your customer's purchase has qualified for a reward, and that their redemption is in progress.
-
Activity-based communication. This webhook works as follows:
As Publisher, you pass authentication data to Cardlytics through the Transaction API.
Next, Cardlytics processes the authentication data to match the offer:
- Match to the right merchant
- Match to one or more valid offers
- Determine qualifying events
Cardlytics then shares the qualifying event through the Publisher-managed Webhook, as described in the section below.
In the end, the Publisher initiates customer messaging, congratulating them on the earned reward.
Activity-based communication is illustrated in the diagram below:
Building Webhooks
To start, you should include the fields shown below in the Webhook that you build.
Once the authorization data has been ingested and the necessary matching logic and verification steps performed, Cardlytics will return valid notifications to the your Webhook API described below.
Caveats: You should pay special attention to the SourceAccountId
. The SourceAccountID provided by Cardlytics corresponds to the ID received from you during transaction imports. This is not necessarily the same as the AccountIDs used throughout other Publisher systems.
Field | Data Type | Description |
---|---|---|
transactionIdentifier | string | Unique ID for authorization transaction record - Should not be the actual account number to protect consumer data. The Publisher will need to be able to match this number to the actual customer number to resolve service issues. |
transactionType | int | 0 = Auth, 1 = Cleared |
externalAccountIdentifier | string (120 char) | Unique ID for account - Should not be the actual account number to protect consumer data. You will need to be able to match this number to the actual customer number to resolve service issues. |
notificationType | EventType | Type of notification |
merchantName | string (350 char) | The description of the transaction as it appears on the customer's statement. This field should contain enough information to determine the merchant and store of the transaction. |
brandingURL | string | The name of the merchant logo associated with an offer. |
brandingURLFileTypeName | string (4 char) | The file extension type of the offer logo |
sourceCustomerID | string | Unique ID for the customer - Should not be the actual account number to protect consumer data. You will need to be able to match this number to the actual customer number to resolve service issues. |