如何在当前结束时更改订阅? [条纹]

I want to be able to change the current subscription of a customer in the PHP Stripe package, but only at the end of the subscription. In the documentation, it only shows how to change the current subscription exactly at the moment of the request, but I want to delay a change of subscription at the end of another.

Thanks for helping.

Are you using Cashier provided through Laravel? If so, both cases are trivial, as the users current subscription end date is stored on the subscription model. Then its simply a matter of running a scheduled task that checks which subscriptions are ending and making the changes.

https://laravel.com/docs/5.4/billing#creating-subscriptions

You can use update subscription API to upgrade/downgrade plan to a customer.

As it mentioned: Updates an existing subscription to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month(for monthly plan or end of the current subscribed plan period) to make up for any price changes.