#mpv
1 messages · Page 1 of 1 (latest)
Is this what you're looking for?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Huh, didn't actually expect (want) a solution that only works for checkout. To get the promo code used for any subscription would the best solution be to fetch the first invoice of a subscription and expand out the data.discount.promotion_code? Ruby code would look something like this: Stripe::Invoice.list(subscription:"sub_someid", limit: 1, expand: ['data.discount.promotion_code'])