laravel / cashier-stripe

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.
https://laravel.com/docs/billing
MIT License
2.38k stars 679 forks source link

Support invoiced subscriptions #895

Closed h3r2on closed 4 years ago

h3r2on commented 4 years ago

Maybe this is possible and I'm just not seeing the option to do this. I need to implement subscriptions that have no initial payment method, and are directly invoiced, Stripe has support for this via:

$subscription = \Stripe\Subscription::create([
    'customer' => 'CUSTOMER_ID,
    'items' => [['plan' => PLAN_ID]],
    'collection_method' => 'send_invoice',
    'days_until_due' => 30,
]);

Is this supported in cashier and if not I'd like to make a enhancement request.

driesvints commented 4 years ago

Hi there,

Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!

Thanks.

h3r2on commented 4 years ago

My issue is here: https://github.com/laravel/cashier/blob/10.0/src/SubscriptionBuilder.php#L262

The payload for subscriptions is hard coded. This should take an array of options so we can add to the payload.

driesvints commented 4 years ago

This has been fixed on master and will be in the next release: https://github.com/laravel/cashier/pull/868