#inderjeet-Subscription
1 messages · Page 1 of 1 (latest)
@fair pagoda Subscription Id is sub_1KVWENDpai6JQGGMjh3xqF7K
Hi @fair pagoda , Can you see the subscription Id ?
Yes, please give me a sec, let me read the logs
Sure
Thanks for your waiting, based on the log, the start_date of the phases[1] item is 2022-02-21 07:33:51 UTC, is this the expected timestamp?
Yes
OK, so what's the problem here?
Problem is that I have subscribed the plan at 21 Feb 08:08:10 but I want to downgrade the plan after 10 minutes so i click on downgrade plan button then web hook fired. which instantly downgrade the plan instead after 10 min
$startPeriodDate= strtotime($subStartDate); //08:10:20
$cur_time=date("Y-m-d H:i:s"); //current date
** $duration='+30 minutes';**
$endDate = date('Y-m-d H:i:s', strtotime($duration, strtotime($cur_time))); //after 30 min
$subSchedule = $stripe->subscriptionSchedules->update(
$subscriptionSchedule->id, //$subscription->schedule,
[
'end_behavior' => 'release',
'phases' => [
[
'items' => [
[
'price' => $currentPriceId,
'quantity' => 1,
],
],
'start_date' => $startPeriodDate,
** 'end_date' => strtotime($endDate),**
],
[
'items' => [
[
'price' => $priceId,
'quantity' => 1,
],
],
** 'start_date' => strtotime($endDate)**
],
],
]);
21 Feb 08:08:10 is it UTC time?
I'm sorry but it seems like we cannot resolve the problem in the discord thread, can I ask you to write in to us and we'll follow up from the support ticket? https://support.stripe.com/contact
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Okay Thanks