Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

stripe api: multiple plans / subscriptions, single invoice

I've been reading through the docs all day and am having a hard time understanding if this is possible.

What I want is to subscribe a user to multiple plans and have it charged on a single invoice, with recurring payments monthly from when the invoice was originally billed.

In the docs it says:

"Note that multiple subscriptions on a customer results in a separate billing cycle, invoice, and charge for each subscription, even if the plans have the same billing interval and the subscriptions are created at the same time."

Which is not promising

But then the api explicitly allows for creating invoices with multiple items through the InvoiceItems api. It seems this is mostly for custom/unique actions on the customer, like applying discounts or one off charges outside of the regular subscription cycle.

I suppose I could manually keep track of billing cycles and manually create multi-item invoices, but I would much rather have this automated through Stripe.

Is this possible?

like image 464
Christopher Reid Avatar asked Jan 09 '17 23:01

Christopher Reid


People also ask

Can a customer have multiple subscriptions Stripe?

A customer can be subscribed to multiple products or even to a single product multiple times. Each subscription has a unique ID and its state is handled independently from the customer's other subscriptions.

Can you split an invoice in Stripe?

Split the invoice into two separate invoices When creating a free-form invoice, you can manually split your line items into two invoices. You can then send the client only one of the invoices for the first part of the payment.

Can Stripe handle subscriptions?

Stripe Billing is the fastest way for your business to bill customers with subscriptions or invoices. Capture more revenue, support new products or business models, and accept recurring payments globally.

Can you create recurring invoices in Stripe?

You can send single or recurring invoices automatically to your customers using Stripe Billing.


2 Answers

What you are describing is now supported in the Stripe API: https://stripe.com/docs/subscriptions/multiplan. The idea is to add multiple plans to a subscription, a restriction being that all plans must share the same interval.

// Set your secret key: remember to change this to your live secret key in production
// See your keys here: https://dashboard.stripe.com/account/apikeys
var stripe = require("stripe")("xxxxxxxxxxxxxxx");

stripe.subscriptions.create({
  customer: "cus_91elFtZU3tt11g",
  items: [
    {
      plan: "basic-monthly",
    },
    {
      plan: "additional-license",
      quantity: 2,
    },
  ]
}, function(err, subscription) {
  // asynchronously called
});
like image 180
Stone Avatar answered Sep 29 '22 21:09

Stone


Each subscription would have its own invoice and charge on Stripe's end for each new billing cycle and there is no way to bundle all of those into one without some custom development.

If you want to group all subscriptions on a customer into one charge, the best solution would be to use Invoice Items. You'd create a $0 monthly plan for all of your customers and then, each month, when you get the invoice.created event indicating that a new invoice has been created you'd create one invoice item for each "subscription" you want to charge your customer for. Stripe would then charge the total amount at once for that invoice automatically.

like image 21
koopajah Avatar answered Sep 29 '22 22:09

koopajah