Skip to main content

Applying Coupons

Coupons can be applied at the point of subscription creation, or to an existing active subscription.

Applying at checkout

Pass a coupon option to CreateSubscription:

Applying to an active subscription

Use the ApplyCoupon action to attach a coupon to a subscription that already exists:
The coupon is pushed to the gateway (e.g., attached to the Stripe customer) and stored locally. The discount takes effect on the next invoice.

subscriber.coupon-redeem component

For custom checkout flows that don’t use subscriber.plan-picker, the subscriber.coupon-redeem Livewire component handles validation and session storage:

How it works

  1. The user enters a coupon code and submits the form.
  2. The component validates the code using Coupon::isValid() — checking expiry and maximum redemptions.
  3. On success, the code is written to session('subscribd.pending_checkout')['coupon'].
  4. When subscriber.checkout processes the subscription, it reads the session key and passes the coupon to CreateSubscription.
  5. The browser event subscribd:coupon-validated is dispatched with { code }.

Named subscription slot

Scope the component to a named slot when using multiple subscriptions:

Removing a coupon

Remove a coupon from an active subscription:

Checking whether a coupon is applied

Next steps