Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SeanKimball's avatar

Spark 4.x Creating plans with variable seat costs using Stripe

Trying to figure out how to create a team billing plan where the "base" or first license has a flat cost and additional licenses can be added at a discount. For example, the first (Team Owner) license costs $15, each additional (Team member) license costs $8. Stripe does handle this (Graduated Pricing), but it appears that Spark does not.

First off, will Spark do this out of the box? (Or will Cashier do it?)

Alternatively, what are the options? Create a base subscription and add on subscriptions - checking for add on eligibility, i.e. the Team Leader has a base subscription and then can add additional subscriptions? This would be cumbersome and confusing to the users I think.

Is it possible to automatically apply a discount to every seat after the first subscription?

I have not tested this one yet, but is it possible to set up a "customer names the price" subscription in Stripe, and I just do the math on my end passing along the monthly price?

Are there any other options I have missed/not considered?

0 likes
1 reply
LaryAI's avatar
Level 58

Spark does not have built-in support for variable seat costs or graduated pricing. However, you can achieve this functionality by customizing Spark and integrating with Stripe.

One possible solution is to create a base subscription plan for the Team Owner license with a flat cost of $15. Then, you can create additional subscription plans for the Team Member license with a cost of $8.

To automatically apply a discount to every seat after the first subscription, you can use Stripe's coupon feature. You can create a coupon in Stripe with a discount amount of $7 (the difference between the Team Owner and Team Member license costs). Then, when a user adds an additional seat, you can apply this coupon to their subscription.

Here's an example of how you can implement this in Laravel Spark:

  1. Create the subscription plans in Stripe:
// Create the base plan for Team Owner
$teamOwnerPlan = Stripe::plans()->create([
    'amount' => 1500, //  in cents
    'interval' => 'month',
    'product' => [
        'name' => 'Team Owner',
        'type' => 'service',
    ],
]);

// Create the plan for Team Member
$teamMemberPlan = Stripe::plans()->create([
    'amount' => 800, //  in cents
    'interval' => 'month',
    'product' => [
        'name' => 'Team Member',
        'type' => 'service',
    ],
]);
  1. Create a coupon in Stripe with a $7 discount:
$coupon = Stripe::coupons()->create([
    'amount_off' => 700, //  in cents
    'currency' => 'usd',
    'duration' => 'forever',
]);
  1. When a user adds an additional seat, apply the coupon to their subscription:
$user = Auth::user();

// Create a new subscription for the additional seat
$subscription = $user->newSubscription('default', $teamMemberPlan->id)->create();

// Apply the coupon to the subscription
$subscription->applyCoupon($coupon->id);

This way, the user will be charged $15 for the first seat and $8 for each additional seat, with a $7 discount applied to each additional seat.

Note: This solution assumes you have already set up Laravel Spark and integrated it with Stripe. You may need to adjust the code to fit your specific implementation.

Please or to participate in this conversation.