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.
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. 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
The list shows a general structure of a webhook payload set in Project settings. Indented bullet points mean that an object contains further properties or objects.id(string): Unique identifier of the send out for this webhook. Example:whs_0e16e42bc6e0c65b57project_id(string): Unique identifier of the Voucherify project. Example:proj_5T4Rpl4T1nuMcreated_at(string): The exact moment when the webhook was created. Example:2024-01-01T11:11:11.111Ztype(string): Name of the event that triggered the webhook send out. 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.updateddata(object): Payload depends on the event that triggered the webhook send out. Project settings cover the following events:- 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.updated
- 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_tier.created
- campaign.promotion_tier.deleted
- campaign.promotion_tier.disabled
- campaign.promotion_tier.enabled
- campaign.promotion_tier.updated
- campaign.promotion_stack.created
- campaign.promotion_stack.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.vouchers.generation.completed
- campaign.vouchers.generation.failed
- campaign.vouchers.generation.started
- campaign.vouchers.added
- customer.created
- customer.deleted
- customer.confirmed
- 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
source(object): Contains details about the source of the webhook send out. Properties:id(string): ID number of the webhook. Example:wh_j56Vfy47Vx9YOX7QYD1fzHncobject(string): Determines the type of the object. Available values:webhookExample:webhooktarget_url(string): The address where the webhook will be sent.
event(object): Contains other data of the event that triggered the send out.id(string): Unique identifier of the event that triggered the send out. Example:evred_1f3611301g3127begbtype(string): Determines the type of the event. Example:redemption.succeededcreated_at(string): The exact moment when the event was created. Example:2024-01-01T11:11:11.111Zentity_id(string): Unique identifier of the entity that triggered the send out. Example:r_1f3611302bf107befbgroup_id(string): Unique identifier of the request that triggered the event. Example:v-1f36113948e50fc4geevent_source(object): Contains the source of the object that triggered the send out. Properties:channel(string): Determines the channel that triggered the send out. Available values:USER_PORTAL,API,CLIENT_API,INTERNALExample:APIuser(string): Defines the user who triggered the event.api_key(object): Determines the API key used to initiate the send out. Properties:name(string): Channel name in the application keys.app_id(string): Contains the application ID from the Voucherify API key pair. Example:1XXXX5XX-0XXX-XXXb-X7XX-XX2XXaXXX6XX
Voucher published payload example

