Project-level webhooks in Voucherify are notifications sent automatically to your application whenever certain actions happen in your project. Examples include when a voucher is redeemed, a customer profile changes, or an order is created.
To use these webhooks, provide Voucherify with an endpoint URL where notifications should be sent.
Configuring webhooks
Follow these steps to configure webhooks:
- In Voucherify dashboard, go to Project settings.
- Scroll down to the Webhooks section.
- Click the plus button – Add new webhook.
- Choose v2024-01-01 webhook version.
- Provide the following details:
- Enter the target URL.
- Tick the Is active? checkbox.
- Select the events you want to receive. If you want to receive all the events, choose Send me all events option.
- Click Send test webhook to test your configuration (optional).
- Click Create endpoint.
- If necessary for authentication reasons, enter the Secret key in your system to receive webhooks from Voucherify.
You can add multiple webhooks to your projects following the steps above.
To update webhook details, click the Pencil button – edit. Enter your changes and click Update endpoint.
To delete a webhook, click the trash button and click Delete.
Re-Enabling a Webhook
To re-enable a disabled webhook:
- In the Project settings, go to the General tab.
- Scroll down to the Webhooks section.
- Edit the specific Webhook.
- Click Is active.
- Click Update endpoint.
Webhooks Available in Project Settings
These webhooks are triggered by the events listed in the Project settings.
Documentation in progress
Documentation of some of the events is still in progress.
The following events can send a webhook:
- Redemption events:
- Publication event:
- Customer events:
- Customer created
- Customer deleted
- Customer rewarded
- Customer rewarded loyalty points
- Customer confirmed
- Voucher events:
- Voucher created
- Voucher disabled
- Voucher enabled
- Voucher updated
- Voucher published
- Voucher loyalty card pending points activated
- Voucher loyalty card pending points added
- Voucher loyalty card pending points canceled
- Voucher loyalty card pending points updated
- Voucher loyalty card points added
- Voucher loyalty card points expired
- Voucher loyalty card transaction created
- Voucher gift transaction created
- Voucher gift balance added
- Voucher deleted
- Campaign events:
- Promotion tier events:
- Business validation rule events:
- Earning rule events:
- Earning rule assigned
- Earning rule deleted
- Earning rule disabled
- Earning rule enabled
- Earning rule updated
- Loyalty tier related events:
- Promotion stack events:
- Promotion stack created
- Promotion stack updated
- Referral tier related events:
- Referral tier created
- Referral tier deleted
- Referral tier updated
- Reward assignment events:
- Reward assignment created
- Reward assignment deleted
- Reward assignment updated
- Voucher generation events:
- Voucher generation failed
- Voucher generation started
Project setting webhook payload
Attributes | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
idstring | Unique identifier of the sendout for this webhook. Example:whs_0e16e42bc6e0c65b57 | ||||||||||||||||||||||||||||
project_idstring | Unique identifier of the Voucherify project. Example:proj_5T4Rpl4T1nuM | ||||||||||||||||||||||||||||
created_atstring | The exact moment when the webhook was created. Example:2024-01-01T11:11:11.111Z | ||||||||||||||||||||||||||||
typestring | Name of the event that triggerered the webhook sendout. Available values:business_validation_rule.assignment.created , business_validation_rule.assignment.deleted , business_validation_rule.created , business_validation_rule.deleted , business_validation_rule.updated , campaign.created , campaign.deleted , campaign.disabled , campaign.enabled , campaign.earning_rule.assigned , campaign.earning_rule.deleted , campaign.earning_rule.disabled , campaign.earning_rule.enabled , campaign.earning_rule.updated , campaign.loyalty_tier.created , campaign.loyalty_tier.deleted , campaign.loyalty_tier.updated , campaign.promotion_stack.created , campaign.promotion_stack.updated , campaign.promotion_tier.created , campaign.promotion_tier.deleted , campaign.promotion_tier.disabled , campaign.promotion_tier.enabled , campaign.promotion_tier.updated , campaign.referral_tier.created , campaign.referral_tier.deleted , campaign.referral_tier.updated , campaign.reward.assignment.created , campaign.reward.assignment.deleted , campaign.reward.assignment.updated , campaign.updated , campaign.vouchers.added , campaign.vouchers.generation.completed , campaign.vouchers.generation.failed , campaign.vouchers.generation.started , customer.confirmed , customer.created , customer.deleted , customer.rewarded , customer.rewarded.loyalty_points , publication.succeeded , redemption.failed , redemption.rollback.failed , redemption.rollback.succeeded , redemption.succeeded , voucher.created , voucher.deleted , voucher.disabled , voucher.enabled , voucher.gift.balance_added , voucher.gift.transaction.created , voucher.loyalty_card.pending_points.activated , voucher.loyalty_card.pending_points.added , voucher.loyalty_card.pending_points.canceled , voucher.loyalty_card.pending_points.updated , voucher.loyalty_card.points_added , voucher.loyalty_card.points_expired , voucher.loyalty_card.transaction.created , voucher.published , voucher.updated | ||||||||||||||||||||||||||||
dataobject | Payload depends on the event that triggered the webhook sendout. Project settings cover the following events:
| ||||||||||||||||||||||||||||
sourceobject | Contains details about the source of the webhook sendout.
| ||||||||||||||||||||||||||||
eventobject | Contains other data of the event that triggered the sendout.
|