Webhook notifications

Instead of polling data from the endpoints, you can use webhooks to get notified about:

  • redemption details (redemption is done, redemption failed, etc.)
  • triggering a referral reward
  • redemption rollback

Redemptions webhook

You can configure the  webhook in the Project's settings view, in the Webhooks section

Voucherify makes it possible to define multiple redemption webhooks. To add one, you should press the Plus and start off by providing a target URL. 
Then, you can configure when the URL should be called. 
There are 2 options:
  • call a webhook for every redemption
  • call a webhook given the one or many of following redemption statutes occurred: `redemption succeeded`, `redemption failed`, `redemption rollback succeeded`, `redemption rollback failed`
When all the webhook features are set, confirm it with CREATE ENDPOINT. 
From now on when Voucherify will call your endpoint providing redemption information in the payload.

Referral webhook reward

The webhooks are also an integral part of referral programs. The endpoints are defined while defining a referral program and they are invoked when the referrer becomes eligible to receive a reward. The configuration is described in this tutorial.


Responding to a webhook

Voucherify expects your webhook to return a response with a `2XX` HTTP status code, indicating that the webhook has been received successfully. If a webhook is not successfully received for any reason, Voucherify will continue trying to send the webhook once an hour for up to 3 days.