Stripe has recently released a new toolset called Billing. https://stripe.com/billing
I have created a new product, of which there are 3 plans. I am able to use the Stripe SDK to create a single subscription to all 3 plans for the product. I would like to use Laravel Cashier to do the same but I am either missing how to do this or it is not currently possible.
With the Stripe SDK I can do something like:
$stripeSubscription = StripeSubscription::create(array(
self::PARAM_SUBSCRIPTION_CUSTOMER => $customer,
self::PARAM_SUBSCRIPTION_ITEMS => $subscriptionItems
), array(
self::PARAM_API_KEY => $this->getStripeKey()
));
Where $subscriptionItems
is an array of plans for a given product.
Within the Laravel Cashier Billable trait, this method is used for subscribing:
public function newSubscription($subscription, $plan)
{
return new SubscriptionBuilder($this, $subscription, $plan);
}
As far as I am aware this will create a new subscription to a single plan, requiring 3 subscriptions per user. I would like to create a single subscription where all 3 pricing plans are within it, using the Billable trait.