#ondrejkamaryt
1 messages · Page 1 of 1 (latest)
Not sure I understand the use case, can you elaborate some more?
Specifically 'begins its expiry period' – not sure what that means
Sure. We will be sending the coupon to someone but we want them to use it in lets say 14 days from the moment he/she recieves it.
But we are sending these coupons on a daily basis so it can not be a fixed date.
I think you'd use the redeem_by field when you create the Coupon: https://stripe.com/docs/api/coupons/create#create_coupon-redeem_by
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
By the way thank you for helping me with this. 🙂 Appreciate it.
You can't unfortunately make that date dynamic
I guess your integration would create the coupon with a now + 14 days timestamp in the redeem_by field when it's sent out
And is it possible to create a coupon which would be created everytime that its sent out? The coupon would be the same but the redeem_by date is changing everytime someone uses the coupon.
Sure, there's no limit on the # of coupons you can create
It's an implementation detail of how you send the coupons out. I guess an email service that creates the coupon(s) programatically and emails them to your customers
So let´s say that this could by possible if we are using Hubspot for our B2C communication?
I've no idea how HubSpot works. But I guess if they have functionality that allows you to call our API, sure!
So if we would use the API during the email (coupon) generation itself - then it could be "dynamic" when sent out?
Yes I guess you could have something that triggers an email to a customer and part of that flow calls the Stripe API to generate a Coupon for them with a redeem_by date set 14 days in future and then include that coupon in the email
As I said, that's an implementation detail of your app and whatever other APIs/services you're using. But as long as you can make API calls to us it should work!
Okay. 🙂 Thank you very much for your help, ynnoj. Hope that you have great rest of the day!
you too!