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 |
Voucher Added |
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
}]
Voucher Added
[{
"total-vouchers":1,
"partner-name":Frontier,
"voucher-code-data":
"voucher-id": 16309,
"voucher-code": 58,
"supplier":"rakuten",
"logo":"https://netb-live.s3.amazonaws.com/logos/sams-club-cashback-logo.png",
"promo-background":"https://netb-live.s3.amazonaws.com/lifestyle-small/sams-club-cashback-lifestyle-small.png",
"promo-details-background":"https://netb-live.s3.amazonaws.com/lifestyle-large/sams-club-cashback-lifestyle-large.png",
"promo-background-category":"https://netb-live.s3.amazonaws.com/lifestyle-small-cat/1-3.png",
"promo-details-background-category":"https://netb-live.s3.amazonaws.com/lifestyle-large-cat/1-5.png",
"voucher-url":"https://someurl.com",
"voucher-activated-url":"https://click.linksynergy.com/fs-bin/click?id=fgzhfz5NV04&offerid=1594332.7189306&type=3&subid=0",
"brand-id":310,
"name":"Sam's Club",
"voucher-description":"$40 off Plus membership. Become a Plus member for only $70.",
"voucher-activated-url-networkattribution": "&u1=PUBLISHER_PREFIX-",
"title":"$40 Off Plus Membership",
"start-date":"2024-08-20 00:00:00",
"expiry-date":"2024-10-31 00:00:00",
"terms":
}],
"response": 200