Rewards Webhook
Send the reward outputs like points, merchandise, cashbacks, coupons to your servers
Last updated
Send the reward outputs like points, merchandise, cashbacks, coupons to your servers
Last updated
A webhook url can be provided to CustomerGlu to receive the rewards won by users in real-time
A POST request will be made to the specified Webhook URL . Example request body is as follows
Optionally, to verify the authenticity of request, a secret token can be provided to CustomerGlu.
When you set a token, you'll receive the X-CG-SIGNATURE
header in the webhook POST
request. value of this header will be a hmac hexdigest of the request body with the provided token. See on how to validate the requests
You can define your own schema for the webhook payload. Below are the default keys that we will send as part of the payload. You can extend this with additional custom attributes as needed.
campaignId
, type
, rewardType
, userId
, rewardId
, status
, transactionId
, rewardName
, rewardAmount
, body
, rewardExpiry
, tnc
, code
,details
.
Use the $
symbol with Default Keys to access dynamic values, and static values can be accessed without the $
symbol.
Note: If you want to access nested payload values in the root, you can access them using the dot
operator.
Example Screenshots from CustomerGlu Dashboard > Dev Console > Reward Webhook.
Example Payload You Will Receive After Setting Up the Reward Webhook.
The following IP address(es) should be whitelisted by your Server, to receive Webhook requests from CustomerGlu:
20.207.108.216