`coupon.update` method?

79 views
Skip to first unread message

niftylettuce

unread,
May 15, 2014, 4:06:39 PM5/15/14
to api-d...@lists.stripe.com
Right now there is no ability to update a coupon -- you have to delete it then recreate it -- is there any way we can have a `coupon.update` method in in the API and also in `node-stripe`?

niftylettuce

unread,
May 15, 2014, 5:18:47 PM5/15/14
to api-d...@lists.stripe.com
Also in the documentation you have:

A set of key/value pairs that you can attach to a coupon object. It can be useful for storing additional information about the coupon in a structured format. This can be unset by updating the value to null and then saving.

Key word "and then saving" -- which makes it seem like there should be `stripe.coupon.update` method?

Alex Sexton

unread,
May 16, 2014, 11:11:32 AM5/16/14
to api-d...@lists.stripe.com
You're absolutely right that there should be a `coupon.update` for the metadata stored on a coupon. As of right now, by design, the metadata is the only part of a coupon that is allowed to be updated. We had decided that there was too much ambiguity in what coupons that are currently in use would do. They'd either stay the same as before, and have no addressable location, or they'd update along with the coupon update which is rarely what businesses do. We're totally happy to consider a use-case that you have that you think would outweigh this ambiguity and/or unwanted side-effect.

I've updated the stripe-node bindings to support this (https://github.com/stripe/stripe-node/pull/103/files) - and will get an official release of the bindings out sometime today.


--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at http://groups.google.com/a/lists.stripe.com/group/api-discuss/.

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

Nick Baugh

unread,
May 16, 2014, 11:57:15 AM5/16/14
to api-d...@lists.stripe.com

My use case is that'd I'd want to update a field like max_redemptions.  This is because my cart system allows stackable coupons, which Stripe doesn't support against charges API.  So I have to coupons.del and coupons.create and decrease by 1.

fe...@edokiacademy.com

unread,
May 11, 2018, 6:08:08 PM5/11/18
to Stripe API Discussion
+1 for updating more than metadata

My use case is that we want to provide customers the ability to use multiple coupons, and Stripe doesn't allow that, so updating the coupon's percent_off would come in handy.

Remi J.

unread,
May 11, 2018, 6:54:03 PM5/11/18
to api-d...@lists.stripe.com
Hey Felix,

That's definitely something we've considered but no short-term plans to make coupons editable that way. For now, the best solution is to create a separate coupon and put that one one the customer or subscription instead.

Best,
Remi

On Fri, May 11, 2018 at 6:02 PM, <fe...@edokiacademy.com> wrote:
+1 for updating more than metadata

My use case is that we want to provide customers the ability to use multiple coupons, and Stripe doesn't allow that, so updating the coupon's percent_off would come in handy.

--
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.

Felix Paradis

unread,
May 11, 2018, 7:00:07 PM5/11/18
to api-d...@lists.stripe.com
Cheers, it's what I ended up doing and although it's not perfect,  it's really not much of an hassle.
Reply all
Reply to author
Forward
0 new messages