Webhook for subscription discount expired?

270 views
Skip to first unread message

Suzanne Jacobs

unread,
Oct 6, 2016, 9:46:12 AM10/6/16
to api-d...@lists.stripe.com



That says it all.

I see there's a webhook for when the discount is applied to a customer.  But I don't see one for when the discount is applied to a subscription.


Thanks for any advice,
Suzanne





Remi J.

unread,
Oct 6, 2016, 9:54:00 AM10/6/16
to api-d...@lists.stripe.com
Hey Suzanne,

The `customer.discount.created` event would be sent in that situation too. This event represents a Discount object [1]. When you apply the coupon to the customer, the corresponding discount has the `customer` property set while the `subscription` property is null. If you apply the coupon to the subscription directly, then both the `customer` and the `subscription` properties are set. This lets you confirm how the coupon was applied in the first place.

Hope this helps!
Remi


--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss+unsubscribe@lists.stripe.com.
To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at https://groups.google.com/a/lists.stripe.com/group/api-discuss/.

Suzanne Jacobs

unread,
Oct 11, 2016, 11:35:19 AM10/11/16
to api-d...@lists.stripe.com

We apply the discount to a subscription only, not a customer.

So a customer could have some subscriptions that have a discount and some subscriptions that do not have a discount.

We'd like to know when a specific subscription's discount expires.  Is there an event for that?


Thanks,
Suzanne



From: 'Remi J.' via Stripe API Discussion <api-d...@lists.stripe.com>
To: api-d...@lists.stripe.com
Sent: Thursday, October 6, 2016 6:53 AM
Subject: Re: [stripe-api-discuss] Webhook for subscription discount expired?

To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss...@lists.stripe.com.

Remi J.

unread,
Oct 13, 2016, 10:40:27 AM10/13/16
to api-d...@lists.stripe.com
Hey Suzanne,

We don't send an event whenever a coupon is removed from a customer or a subscription after it expired. This is something you'd need to keep track of on your end if you want to know when a coupon might be removed.

We have some related events but they happen on different occasions. `customer.discount.updated` is sent when you change the current coupon applied to a customer or a subscription. `customer.discount.deleted` is sent when you explicitly remove a discount from a customer or a subscription via the API.

Hope this helps!
Remi

To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss+unsubscribe@lists.stripe.com.

To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at https://groups.google.com/a/lists.stripe.com/group/api-discuss/.

--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss+unsubscribe@lists.stripe.com.
Reply all
Reply to author
Forward
0 new messages