1. Coupons
Documentation
  • Back to home
  • StripeKit
  • Installation
  • Getting Started
  • Choosing a Mode
  • Type Reference
  • Setup
    • Configuration
    • Timezones
    • Storage Adapter
    • Money and Currency
    • Error Handling
  • Stripe
    • Elements
  • Modules
    • Overview
    • Customers
      • Overview
      • List
      • Retrieve
      • Find or Create by Email
      • Create
      • Update
      • Sync
      • Delete
    • Payment Methods
      • Overview
      • Create Setup Intent
      • List
      • Attach
      • Detach
      • Set Default
      • Sync
    • Payments
      • Overview
      • Pay With Saved Method
      • Create
      • Retrieve
      • Confirm
      • Cancel
      • Sync
    • Checkout
      • Overview
      • Get
      • Create
      • Submit Fields
      • Apply Coupon
      • Mark Complete
    • Subscriptions
      • Overview
      • Create
      • Retrieve
      • Cancel
      • Resume
      • Toggle Collection Method
      • Update Fields
      • Apply Promotion Code
      • List By Customer
      • Find By Metadata
      • Sync
    • Invoices
      • Overview
      • Retrieve
      • List By Customer
      • List By Subscription
      • Pay With Saved Method
      • Void
      • Finalize
      • Sync
    • Coupons
      • Overview
      • Create
      • Validate
      • Apply To Subscription
      • List
      • Deactivate
    • Webhooks
      • Overview
      • Process
      • Events Reference
    • Sync
      • Overview
  1. Coupons

Apply To Subscription

$kit->coupons->applyToSubscription()#

Applies a promotion code to a subscription. This is a thin convenience wrapper around $kit->subscriptions->applyPromotionCode(), kept on the coupons module so both directions of the relationship (coupon → subscription and subscription → coupon) are discoverable from either module.

Signature#

Example request#

Example response#

The updated KitSubscriptionRecord, same shape as $kit->subscriptions->retrieve().

Errors#

Identical to $kit->subscriptions->applyPromotionCode().

Notes#

Behaves identically to calling $kit->subscriptions->applyPromotionCode() directly, pick whichever reads more naturally in your codebase.
Previous
Validate
Next
List
Built with