#eleanor
1 messages · Page 1 of 1 (latest)
Unfortunately this isn't possible via the api at the moment
You'd have to keep track of this yourself
ok — are there any ways around this, even doing it one by one?
Ah sorry I didn't provide that info earlier! We're using subscriptions and trying to see how many people have redeemed the coupon for diferent plan levels, and annual vs monthly
So the subscription will have an associated discount object: https://stripe.com/docs/api/subscriptions/object?lang=node#subscription_object-discount
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Promo code is expandable on that discount object; https://stripe.com/docs/api/discounts/object?lang=node#discount_object-promotion_code
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
The way i've "hacked" this in the early days of promo_codes was to add it as a metadata to the Subscription.metadata["promo_code"] and then search for it as the metadata JSON is searchable.