Create Dynamic Coupons using Klaivyo Webhooks

To create WooCommerce coupons using Klaviyo flows, you need to use the Webhook settings created by the plugin. You can find these settings on the Dynamic Coupon page. Follow the steps or the video tutorial below for details.

Step 1: Create a Klaviyo Flow to Trigger Coupon Creation

  1. In Klaviyo, go to Flows and click Create Flow.
  2. Name it (e.g., “10% Off for New Customers”) and click Create.
  3. Set the desired trigger, such as Added to List.
  4. Save the trigger.

Step 2: Add a Webhook Action in Klaviyo

  1. In the flow, drag the Webhook action into your sequence.
  2. From the plugin’s Dynamic Coupons page, copy the Webhook URL and paste it into the Webhook settings in Klaviyo.
  3. Add two security headers:
    • woo-api-key (value from the plugin)
    • woo-api-secret (value from the plugin)
  4. Add the JSON body for the coupon (use the example from the plugin’s instructions).
  5. Save the webhook.

Step 3 – Create the Coupon Email in Klaviyo

  1. In the flow, add an Email action after the webhook.
  2. Name it (e.g., “Coupon Email”) and set the subject
  3. Choose an existing template or create your own.
  4. Replace any hardcoded coupon code in the email with the Woo coupon field created by the plugin:
    – Search for dck in personalization fields.
    – Select Woo coupon and insert it into the email body.
  5. Save the email.

Step 4 – Activate & Test Klaviyo Flow

  1. Review your flow.
  2. Turn it on and save.
  3. Subscribe to the form that triggers the flow.
  4. Check your email inbox for the coupon email.

Step 5 – Verify Coupon Creation

  1. In WooCommerce, go to Coupons to see the newly created coupon.
  2. In Klaviyo, go to the customer’s Profile to see the coupon code and expiry date.

Configuring Coupon Settings

To configure coupon settings:

  1. Navigate to WooCommerce > Klaviyo Coupons > Dynamic Coupons
  2. Scroll to Coupon Settings section
  3. Set the coupon prefix you want to use. All coupons created from Klaviyo webhooks will use this prefix.
  4. Set the default expiry days. This determines the validity of the created coupons.
  5. Enable Auto Cleanup to automatically remove expired coupons.
Browse our plugins

Lightweight WooCommerce plugins built for speed. No bloat, no frameworks -- just clean code that works.

View all plugins