Webhooks will allow your application to receive server to server messaging from Finfare Connect. This will enable you to make real time decisions.

The three events that you can receive are -

Event
Transaction Received
Promotion Added/Updated
User Archived/Updated

In order to verify that the incoming message has been sent by Finfare Connect, you must always verify the signature that is transmitted in the header of the message.

Create a string using your “API Key”, timestamp from the “Nimda-Timestamp” header and your given url API_Key+Timestamp+URL Hash the created string using the “secret key” with “HMAC-SHA256” and then encode it with Base64. Compare the signature you created with the one sent in “Nimda-Signature” header

Transaction Received Example

[{
“records” : 1,
“transactions” : [{
“nimda-user-id” : “NetB-54ahap-biew7hyn-cvkx-g1hrnz-fzcsc92”,
“promo-id” : 10,
“card-id” : “ashdjsh-asd9-87asd-as765”,
“transaction-id” : “ashdjsh-asd9-87asd-as765”,
“merchant” : “Debenhams”,
“amount” : 10,
“currency” : “GBP”,
“cashback-amount” : 0.5,
“cashback-percentage” : 5,
“scheme” : “visa”,
“last-4-digits” : “0214”,
“payment-issuer-mid” : “123,456,789”,
“added” : “2020-03-01 10:41:25”,
“last-updated” : “2020-03-01 10:41:25”,
“auth-code” : “A12345”,
“status” : 0,

“marked-invalid” : “yes”, // no
“network” : “awin”
}],
“response” : 200
}]

**

Promotion Added/Updated Example**

[{
“total-promos” : 1,
“new-promo”: “yes”, // other values are “no” or “delete”
“partner-name”: “Benefit Hub”,
“promo-data”: [{
“promo-id”: 1,
“sort-order”: 1,
“type”: “Always On”, // or “Flash”
“medium”: “Online only”, // “In-store only” and “Online and in-store”
“supplier”: “awin”, // or “network b”
“logo”: "https://www.logo.com",
“promo-background”: "https://www.logo.com",
“promo-details-background”: "https://www.logo.com",
“promo-background-category”: "https://www.logo.com",
“promo-details-background-category”: "https://www.logo.com",
“offer-activated-text”: "Promo related text",
“offer-activated-url”: "https://www.someurl.com",
“offer-activated-url-networkattribution”: "&clickref=ABC-",
“brand-id”: 12,
“name”: "H.Samuel",
“featured-brand”: "Yes", // or ‘No’
“payment-issuer-mid”: "123,456,789",
“brand-description”: "description text for brand",
“title”: "5% cashback",
“cashback-percentage”: 6, // or null
“cashback-pound”: 6, // or null
“description”: "Get 5% cashback on your spend.",
“start-date”: “2020-03-31”,
“expiry-date”: “2021-12-31”,
“update-date”: “2021-06-31 00:01:20”,
“on-going-promo”: “yes”,
“categories”: [{
"category-id": 1,
"category-name": "Computers",

              "subcategory": [{
"subcategory-id": 1,
"subcategory-name": "Lenovo",
}],
"category-name": "Mobile",
"subcategory": [{
"subcategory-id": 1,
"subcategory-name": "Iphone",
}],
}],
“terms”: "some terms here",
“user-reg-criteria-data”: [{
"apply": "Yes",
"type": “all_time”,
"from": “2019-12-21”,
"to": “2021-12-31”
}],
“user-transaction-criteria-data”: [{
"apply": "Yes",
"type": “no_trans”,
"from": “2019-12-21”,
"to": “2021-12-31”
}],
“minimum-spend-criteria-data”: [{
"apply": “Yes”,
"amount": 5
}],
“maximum-spend-criteria-data”: [{
"apply": “Yes”,
"amount": 100,
}],
}],
“response”: 200
}]

User Archived/Updated Example

[{
“nimda-user-id” : “NetB-54ahap-biew7hyn-cvkx-g1hrnz-fzcsc92”,
“user-status” : 0,
“pending” : 0,

“approved” : 1,
“payable” : 2,
“withdrawal-limit” : 5,
“paid” : 10,
“totalEarned” : 10,
“currency” : “GBP”,
“withdrawal-account” : “Yes”, // No
“response” : 200
}]