Srtipe downgrade
Если понимажает клиент подписку,она применяется в конце текущей подписки.
$this->user->stripe()->subscriptionSchedules->update(
'sub_sched_1KtsXdLueT3PfXuFDuOxZBAb',
[
'phases' => [
[
'start_date' => Carbon::parse($this->user->subscription()-
>created_at)->timestamp,
'end_date' => Carbon::parse($this->user->subscription()-
>created_at)->addDays(30)->timestamp,
'items' => [
[
'price' => $this->user->subscription()->stripe_price,
]
]
],
[
'start_date' => Carbon::parse($this->user->subscription()->created_at)->addDays(30)->timestamp,
'items' => [
[
'price' => $request->plan,
],
]
],
],
]
);
}
но мне страйп возвращает "message": "You can not modify the start date of the current phase." Не могу понять в чем причина.