Skip to main content
Question

I am having trouble creating coupons for a period of 1 year from submission.

  • February 11, 2025
  • 7 replies
  • 62 views

Forum|alt.badge.img+3

Hello, I have a problem with creating coupons that expire exactly one year after a customer purchases a specific product. I want to generate codes that expire one year after the purchase. The idea is that when a customer buys a specific product, they should receive their unique code in the Post-Purchase Flow, with a validity of one year.

However, when I start creating the codes, I have two options:

  1. Never expire,
  2. Set an expiration date for a specific time on the calendar.

This makes them expire on a set date, but I want them to expire exactly one year after being received by the customer.

Can anyone explain how this can be done, or if it’s not possible? I’ve read all the available articles on this topic and see that some people have done it, but it seems this was done a while ago because I only have these two options: never expire or expire on a specific calendar date, which makes them expire on a fixed date rather than a period of time after being received.

Did this topic or the replies in the thread help you find an answer to your question?

7 replies

retention
Partner - Platinum
Forum|alt.badge.img+62
  • 2025 Champion
  • 932 replies
  • February 11, 2025

Hi ​@Nikolay, first of all, welcome to the community!
I’m not sure what platform you’re on, but if you’re on Shopify for example, you can create a unique coupon code that expires from the time the coupon code is generated (at send time from your Post Purchase Flow message), and set it to be 365 days (1 year).

See here:

 

You can follow these instruction's to set this up and how to use it in your email template:

 


Forum|alt.badge.img+3
  • Author
  • Contributor I
  • 1 reply
  • February 11, 2025

Hello, ​@retention ! The platform is WooCommerce. I will also send you two pictures so you can see the options I have when trying to do it from Klaviyo through WooCommerce and directly from Klaviyo. I don’t have that option on my end :(

 


Christiannoerbjerg
Expert Problem Solver II
Forum|alt.badge.img+12

Hi ​@Nikolay 

Thank you for posting in the Community!

I would follow this article: https://help.klaviyo.com/hc/en-us/articles/22168739689627

Hope that helps or else let me know! :-) 

Christian Nørbjerg Enger
Partner & CPO
Web: Segmento.dk
LinkedIn: @christianfromsegmento
Voldbjergvej 22b, 8240 Risskov


Byrne C
Community Manager
Forum|alt.badge.img+12
  • Community Manager
  • 82 replies
  • February 12, 2025

Hi ​@Nikolay,

If you create a WooCommerce coupon in Klaviyo, you should be able to have them expire after a certain number of days, like your first screenshot shows! Were you looking to create a coupon through a different method, or seeing errors when trying to set them to expire after a year?

Let me know, and I’ll see what’s going on.

-Byrne


emma.owens
Community Manager
Forum|alt.badge.img+10
  • Community Manager
  • 58 replies
  • February 19, 2025

Hi ​@Nikolay ! 

Just following up on this - were you were able to successfully create this coupon? 


Forum|alt.badge.img+2
  • Contributor I
  • 4 replies
  • February 20, 2025

Hi ​@Nikolay ,

Your platform only supports fixed expiration dates, but you need dynamic expiration (1 year after purchase). Here’s how you can do it:

Solutions:

  1. Use a Third-Party App – Apps like Bulk Discount Code Generator or Shopify Scripts allow dynamic expiration.
  2. Automate via API – Use webhooks or Zapier to create unique discount codes with a 1-year expiration.
  3. Single-Use Codes – Issue one-time-use coupons without expiration but track usage.
  4. Email Automation – Send the code in post-purchase emails and remind customers before expiry.

Best Option: If your platform allows API automation, set expiration dynamically. Otherwise, use a third-party app or email reminders.


Forum|alt.badge.img+2
  • Contributor I
  • 2 replies
  • February 20, 2025

Hi, @Nikolay.

Solution for Setting Coupon Expiry One Year After Purchase in Klaviyo

Unfortunately, Klaviyo’s native coupon expiration settings only allow you to either set a fixed expiration date or leave the coupon without an expiration. However, you can still achieve the desired outcome by using Klaviyo’s dynamic expiration workaround.

Workaround Using Shopify’s Discount API (for Shopify users)

If you’re using Shopify, you can generate discount codes dynamically via Shopify’s Discount API. Instead of creating a Klaviyo coupon, use a third-party integration or Shopify Flow to generate a discount that expires one year after purchase. Then, use Klaviyo’s Post-Purchase Flow to send that discount code to the customer via email.

Alternative Solution Using Klaviyo & Zapier

If Shopify’s Discount API isn’t an option, you can use Zapier to create dynamically expiring discount codes. Here’s how:

  1. Trigger: Set up a Zapier automation that triggers when a customer purchases the specific product in Shopify, WooCommerce, or your eCommerce platform.
  2. Generate Code: Use Zapier to create a unique coupon code with a 1-year expiration.
  3. Store Expiry Date: Save the generated expiry date as a custom property in Klaviyo.
  4. Send Email: Use Klaviyo’s Post-Purchase Flow to pull the unique coupon code from the Zapier integration and include the expiry date dynamically.

Manual Workaround Using Dynamic Expiry Messaging

If integrations aren’t an option, you can use Klaviyo’s default “Never Expire” setting and simply communicate the expiration dynamically in the email:

  • Set the coupon to Never Expire in Klaviyo.
  • Use a dynamic expiration message in the Post-Purchase email:
    • Example: "This coupon is valid until {{ event.date|date:'Y-m-d'|add:'365d' }}."
  • This way, customers will see an expiry date one year from their purchase, even though Klaviyo doesn’t enforce it. You’ll need to manually deactivate old codes if necessary.

Final Thoughts

Since Klaviyo doesn’t currently support true dynamic expiry on coupon generation, using Shopify’s API, Zapier automation, or a dynamic messaging workaround will be the best solutions. Hopefully, Klaviyo will introduce more flexible coupon expiration options in the future!