kit.coupons creates, validates, applies and deactivates coupons and promotion codes. Every coupon StripeKit creates is backed by both a Stripe Coupon (the discount rule) and a Stripe PromotionCode (the customer-facing code), which is why StripeKit's records always carry both a stripeCouponId and a stripePromotionCodeId.| Method | Description |
|---|---|
create() | Create a new coupon and its promotion code. |
validate() | Check whether a plain-text code is currently valid, without throwing. |
applyToSubscription() | Apply a promotion code to a subscription. Thin alias, see notes. |
list() | List active coupons. |
deactivate() | Deactivate a promotion code so it can no longer be redeemed. |
KitCouponRecord shapecode is always uppercased. description is a short, auto-generated human-readable summary, for example "25% off, once".