Leat Docs

Vouchers

How voucher codes issued in Leat become WooCommerce coupons your customers can redeem at checkout.

A voucher in Leat is a unique discount code attached to a promotion rule. The promotion rule decides what the code is worth (percentage off, fixed amount, free shipping, restrictions, expiry); the voucher is just one issued instance of that rule.

This page is about getting those codes into your store as WooCommerce coupons. There are three ways a voucher can reach your store:

  1. Real-time webhooks from Leat for any voucher that's created, updated, redeemed, or deleted.
  2. Manual sync under Leat > Sync, useful for backfilling or reconciling.
  3. Selling voucher products in WooCommerce. This is a separate flow with its own settings: see Selling Vouchers.

Promotion rules themselves are managed under Leat > Promotions. See Promotions for how to create the rule that backs a voucher.


Real-time delivery via webhooks

When you activate the plugin, it registers a set of webhooks with Leat automatically. From that point on, Leat pushes voucher events to your store as they happen, and the plugin keeps the matching WooCommerce coupons in sync:

  • Voucher created: the plugin creates a WooCommerce coupon for the voucher, with discount, restrictions, and expiry pulled from the linked promotion rule.
  • Voucher updated: the existing coupon is updated with the latest data.
  • Voucher redeemed: if the coupon is still active, it's flipped to draft so it can't be used a second time. This matters because a voucher can be redeemed in another channel (a physical store, for instance), and the WooCommerce coupon needs to follow.
  • Voucher deleted: the matching coupon is removed.

You don't need to configure anything for this to work. The plugin re-checks the webhook subscriptions daily and reinstalls them if they go missing.

If a voucher's promotion rule isn't synced to your store yet when the webhook arrives, the plugin creates a placeholder coupon with the code so it's never lost. The coupon picks up the full configuration on the next webhook or sync once the rule is available.

Manual sync from the Leat platform

If you need to backfill vouchers, for example after first connecting your store, or after a period where webhooks weren't reaching you, go to Leat > Sync and run a voucher sync. The plugin walks through every active promotion rule, fetches its vouchers from Leat, and creates or updates the matching WooCommerce coupons.

The sync runs in the background and won't hold up your admin panel. It might take a few minutes if you have a large number of vouchers.

You don't normally need a manual sync during steady-state operation. Webhooks keep coupons up to date in real time. Reach for this when you suspect something has drifted.

How coupons are configured

Each WooCommerce coupon created from a voucher is configured to mirror what you'd expect from a one-time voucher code:

  • Single-use per customer: usage limit and per-user limit are both set to 1.
  • Email-restricted: when the voucher is tied to a contact, the coupon is restricted to that contact's email. The customer must check out with the same email.
  • Expiry: pulled from the voucher's expiration date, if one is set.
  • Discount, products, and minimum spend: pulled from the linked promotion rule.

If you change the rule in Leat, those updates flow back to the coupon on the next webhook or sync.


How customers redeem vouchers

Voucher codes work exactly like any other WooCommerce coupon. The customer pastes the code into the coupon field at checkout and the discount is applied. After the order goes through, the voucher is marked as redeemed in Leat, and the WooCommerce coupon is moved to draft via the redemption webhook so it can't be used again.

If the customer's checkout email doesn't match the email the voucher was issued to, the coupon won't apply. This is intentional, as it's what keeps vouchers from being shared.

On this page