Skip to main content

Configuring Distribution webhooks

  1. In Voucherify dashboard, go to Distributions in the Engagement section.
  2. Click Create distribution.
  3. Select the appropriate trigger that creates a send out.
  4. In Action, define what kind of distribution action you want to create.
  5. In Channels, add Webhook. You can add many channels within one distribution.
  6. In the webhook channel, provide the event name, URL, and any optional HTTP headers.
  7. Select the attributes to add them to the webhook payload. Optionally, map the attributes to your own keys.
To edit, pause, activate, or delete a distribution, click the three dots icon located on the far right of each row in the Distributions list view. You can also add distribution webhooks while creating a loyalty or referral programs. The process follows similar pattern.

Payload designer

In the default mapping mode, Voucherify sends the full webhook payload without any mapping to other keys. Click Custom to use the payload designer and create webhook payloads in the JSON format. The Payload designer is empty at the start. You can paste any existing payload or write it from scratch. Each key in the payload can have a value that is static, dynamic, or nested:
  • Static values are fixed values you define, such as text, numbers, or boolean.
  • Dynamic values come from Voucherify keys in the webhook payload. Use double curly braces {{}} to search for Voucherify keys. You can also mix static and dynamic values, for example "Hello {{customer.name}}".
  • Nested objects can be created with dots in the key name, such as {{order.status}}.
If you want a value to be a string, wrap it in quotes (""). When the type of a value is unknown, also wrap it in quotes ("") to ensure it is treated as a string.
📘 Available Voucherify webhook keys The available keys supported by Voucherify are limited to a given distribution event that is used in the webhook. For example, if you create a webhook payload for the Customer entered segment, you can use all the keys available in that event, like customer.name or segment.name. However, you can’t use objects that aren’t available in that webhook, like redemption.date. Read Webhooks available in Distributions to learn which webhooks are available. Go to specific webhook pages to learn more about their payloads.

Example: Customer summary with dynamic values

This payload builds a customer summary. All values are taken dynamically from the webhook.
{
  "customer_profile": {
    "ID": "{{customer.id}}",
    "name": "{{customer.name}}",
    "email": "{{customer.email}}"
  }
}

Example: Order confirmation with mixed values

This payload mixes static and dynamic values. The currency is fixed, while the order details and greeting come from Voucherify.
{
  "order": {
    "orderId": "{{order.id}}",
    "total": {{order.total_amount}},
    "currency": "USD",
    "message": "Thank you for your order, {{customer.name}}!"
  }
}

Re-enabling a webhook

To re-enable a paused webhook:
  1. Go to the Distribution Manager.
  2. Click the distribution that has been paused.
  3. Click the set live icon in the upper right corner.

Webhooks available in Distributions

These webhooks are triggered by the events which cause distribution. Some distribution events, for example Customer entered segment, have different purposes:
  • Notify customers about promotion
  • Send and publish unique codes from campaign
  • Send plain message to customers
The table below shows which distributions support webhooks:
Related ActivityEventNotify customers about promotionSend and publish unique codes from campaignSend plain message to customers
SegmentCustomer entered segment
SegmentCustomer left segment
CartOrder update
CartOrder has been paid
CartOrder creation
CartOrder cancelled
VoucherGift credits adjusted
VoucherLoyalty points adjusted
VoucherLoyalty points expired
VoucherLoyalty pending points adjusted
VoucherLoyalty pending points updated
VoucherLoyalty pending points activated
VoucherLoyalty pending points canceled
VoucherVoucher redeemed
VoucherVoucher redemption rolled back
Customer rewardsReward redemption
Manual messagesOne or bulk messages
Publishing codesSuccessfully published
Custom eventsCustom event
Loyalty tier related activityCustomer entered loyalty tier structure
Loyalty tier related activityCustomer left loyalty tier structure
Loyalty tier related activityCustomer loyalty tier upgraded
Loyalty tier related activityCustomer loyalty tier downgraded
Loyalty tier related activityCustomer loyalty tier prolonged
Loyalty tier related activityCustomer rewarded loyalty points
Referral related activityCustomer was referred

Loyalty and referral campaign Distributions

The following campaigns can also trigger webhook send outs as a distribution:

Distribution webhook payload

The list shows a general structure of a webhook payload set in Distributions. Indented bullet points mean that an object contains further properties or objects.
The list shows the complete, unedited payload. If you customize it with the Payload editor, your data may include fewer fields.
Customer voucher redeemed example
{
  "id": "whs_ID",
  "project_id": "proj_ID",
  "created_at": "2025-10-16T16:54:11.816Z",
  "type": "Voucher-redeemed",
  "data": {
    "customer": {
      "id": "cust_ID",
      "name": "Alex Doe",
      "email": "alex.doe@doe.alex.io",
      "source_id": "4lx-d03",
      "metadata": {
        "acquisition_channel": "Website"
      },
      "object": "customer"
    },
    "order": {
      "id": "ord_ID",
      "source_id": null,
      "status": "PAID",
      "customer_id": "cust_ID",
      "referrer_id": null,
      "amount": 4198,
      "applied_discount_amount": 0,
      "total_applied_discount_amount": 0,
      "total_amount": 4198,
      "items": [
        {
          "id": "ordli_IDD",
          "object": "order_item",
          "product_id": "prod_IDD",
          "quantity": 1,
          "amount": 199,
          "price": 199,
          "subtotal_amount": 199
        },
        {
          "id": "ordli_ID",
          "object": "order_item",
          "product_id": "prod_ID",
          "quantity": 1,
          "amount": 3999,
          "price": 3999,
          "subtotal_amount": 3999
        }
      ],
      "metadata": {},
      "created_at": "2025-10-16T16:54:11.785Z",
      "object": "order"
    },
    "campaign": {
      "id": "camp_ID",
      "name": "Autumn-2025",
      "campaign_type": "DISCOUNT_COUPONS",
      "type": "STANDALONE",
      "is_referral_code": false,
      "voucher": {
        "type": "DISCOUNT_VOUCHER",
        "discount": {
          "type": "AMOUNT",
          "amount_off": 100,
          "units": null,
          "effect": "APPLY_TO_ITEMS"
        },
        "redemption": {
          "quantity": null,
          "redeemed_quantity": 0
        },
        "code_config": {
          "pattern": "########",
          "length": 8,
          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
          "prefix": "",
          "postfix": "",
          "min_desired": 1
        }
      },
      "auto_join": false,
      "join_once": false,
      "active": true,
      "category_id": null,
      "category": null,
      "metadata": {},
      "start_date": null,
      "expiration_date": null,
      "description": null,
      "created_at": "2025-10-14T08:45:08.857Z",
      "updated_at": "2025-10-16T16:51:09.275Z",
      "object": "campaign"
    },
    "voucher": {
      "id": "v_ID",
      "code": "kUs7oM-cOD3",
      "discount": {
        "type": "AMOUNT",
        "amount_off": 100,
        "effect": "APPLY_TO_ITEMS"
      },
      "type": "DISCOUNT_VOUCHER",
      "campaign": "Autumn-2025",
      "campaign_id": "camp_ID",
      "is_referral_code": false,
      "holder_id": "cust_ID",
      "category_id": null,
      "active": true,
      "created_at": "2025-10-16T16:02:41.255Z",
      "updated_at": "2025-10-16T16:54:11.804Z",
      "redemption": {
        "quantity": null,
        "redeemed_quantity": 1
      },
      "start_date": null,
      "expiration_date": null,
      "metadata": {},
      "object": "voucher"
    },
    "holder": {
      "id": "cust_ID",
      "name": "Alex Doe",
      "email": "alex.doe@doe.alex.io",
      "source_id": "4lx-d03",
      "metadata": {
        "acquisition_channel": "Website"
      },
      "object": "customer"
    },
    "promotion_tier": null,
    "promotion_stack": null,
    "redemption": {
      "id": "r_ID",
      "customer_id": "cust_ID",
      "tracking_id": "track_ID",
      "date": "2025-10-16T16:54:11.816Z",
      "order": {
        "id": "ord_ID",
        "source_id": null,
        "status": "PAID",
        "customer_id": "cust_ID",
        "referrer_id": null,
        "amount": 4198,
        "applied_discount_amount": 0,
        "total_applied_discount_amount": 0,
        "total_amount": 4198,
        "items": [
          {
            "id": "ordli_IDD",
            "object": "order_item",
            "product_id": "prod_IDD",
            "quantity": 1,
            "amount": 199,
            "price": 199,
            "subtotal_amount": 199
          },
          {
            "id": "ordli_ID",
            "object": "order_item",
            "product_id": "prod_ID",
            "quantity": 1,
            "amount": 3999,
            "price": 3999,
            "subtotal_amount": 3999
          }
        ],
        "metadata": {},
        "created_at": "2025-10-16T16:54:11.785Z",
        "object": "order"
      },
      "customer": {
        "id": "cust_ID",
        "name": "Alex Doe",
        "email": "alex.doe@doe.alex.io",
        "source_id": "4lx-d03",
        "metadata": {
          "acquisition_channel": "Website"
        },
        "object": "customer"
      },
      "result": "SUCCESS",
      "status": "SUCCEEDED",
      "voucher": {
        "id": "v_ID",
        "code": "kUs7oM-cOD3",
        "discount": {
          "type": "AMOUNT",
          "amount_off": 100,
          "effect": "APPLY_TO_ITEMS"
        },
        "type": "DISCOUNT_VOUCHER",
        "campaign": "Autumn-2025",
        "campaign_id": "camp_ID",
        "is_referral_code": false,
        "holder_id": "cust_ID",
        "category_id": null,
        "active": true,
        "created_at": "2025-10-16T16:02:41.255Z",
        "updated_at": "2025-10-16T16:54:11.804Z",
        "redemption": {
          "quantity": null,
          "redeemed_quantity": 1
        },
        "start_date": null,
        "expiration_date": null,
        "metadata": {},
        "object": "voucher"
      },
      "metadata": {},
      "channel": {
        "channel_id": "user_ID",
        "channel_type": "USER"
      },
      "object": "redemption"
    }
  },
  "source": {
    "id": "distr_ID",
    "object": "distribution",
    "target_url": "https://your.website.io"
  },
  "event": {
    "id": "evcus_115d38459e5318ae94",
    "type": "customer.redemption.succeeded",
    "created_at": "2025-10-16T16:54:11.816Z",
    "entity_id": "cust_ID",
    "group_id": "v-115d384583cfba443b",
    "event_source": {
      "channel": "USER_PORTAL",
      "user": {
        "id": "user_ID"
      }
    }
  }
}
I