post https://example.com/EVENTS.VOUCHER.CREATED
EVENT: "EVENTS.VOUCHER.CREATED"
HTTP method: POST
HTTP method: POST
The EVENTS.VOUCHER.CREATED
event indicates that a new voucher has been successfully created in Voucherify. It informs other systems or applications about the addition of a new voucher. The VOUCHER.CREATED
webhook is sent only when a single voucher is created. When vouchers are created in bulk, this action does not trigger the webhook.
The webhook provides, among others, the following details:
- URLs to the voucher's assets, such as QR code and barcode images,
- Associated campaign and its type,
- Expiration date.
Webhook documentation
This page documents only the event. If you need more details about the webhook payload data that includes this event, go to Webhook v2024-01-01 page.
Example: voucher.created
{
"voucher": {
"id": "v_T3TAfGlOsyjEQkfvUvknNYfcynUEvJ3i",
"code": "Your-applicable-9",
"gift": null,
"type": "DISCOUNT_VOUCHER",
"active": true,
"assets": {
"qr": {
"id": "5a112cc9-900a-4d24-95b7-9680ca7f7133",
"url": "{{voucher_qr_code.url}}"
},
"barcode": {
"id": "c09881b3-b569-492f-82bb-5b977cd07b54",
"url": "{{voucher_barcode.url}}"
}
},
"object": "voucher",
"publish": {
"url": "/v1/vouchers/Your-applicable-9/publications?page=1&limit=10",
"count": 0,
"object": "list"
},
"campaign": "Your-campaign-applicable-to",
"category": null,
"discount": {
"type": "PERCENT",
"effect": "APPLY_TO_ITEMS",
"percent_off": 5,
"amount_limit": 15000,
"aggregated_amount_limit": 30000
},
"metadata": {},
"categories": [],
"created_at": "2024-02-09T11:11:11.111Z",
"redemption": {
"url": "/v1/vouchers/Your-applicable-9/redemptions?page=1&limit=10",
"object": "list",
"quantity": null,
"redeemed_quantity": 0
},
"start_date": "2024-02-17T00:00:00.000Z",
"updated_at": null,
"campaign_id": "camp_18NCNUkQIaXnqbHqhtQnt355",
"category_id": "cat_0e156dab8f2e43873a",
"loyalty_card": null,
"additional_info": "Additional information about the voucher",
"expiration_date": "2024-02-29T00:00:00.000Z",
"is_referral_code": false,
"validity_timeframe": null,
"validity_day_of_week": [
1,
0
]
},
"campaign": {
"id": "camp_18NCNUkQIaXnqbHqhtQnt355",
"name": "Test-campaign-applicable-to",
"type": "AUTO_UPDATE",
"active": true,
"object": "campaign",
"voucher": {
"gift": null,
"type": "DISCOUNT_VOUCHER",
"discount": {
"type": "PERCENT",
"units": null,
"effect": "APPLY_TO_ITEMS",
"percent_off": 5,
"amount_limit": 15000,
"aggregated_amount_limit": 30000
},
"redemption": {
"quantity": null,
"redeemed_quantity": 0
},
"code_config": {
"length": 1,
"prefix": "Your-applicable-",
"charset": "0123456789",
"pattern": "#",
"postfix": ""
},
"loyalty_card": null
},
"metadata": {},
"auto_join": false,
"join_once": false,
"created_at": "2024-02-09T10:16:04.352Z",
"category_id": null,
"campaign_type": "DISCOUNT_COUPONS",
"is_referral_code": false
}
}