#inderjeet-Subscription

1 messages · Page 1 of 1 (latest)

fair pagoda
#

Hi there, can you give me the subscription ID?

night pulsar
#

@fair pagoda Subscription Id is sub_1KVWENDpai6JQGGMjh3xqF7K

night pulsar
#

Hi @fair pagoda , Can you see the subscription Id ?

fair pagoda
#

Yes, please give me a sec, let me read the logs

night pulsar
#

Sure

fair pagoda
#

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?

night pulsar
#

Yes

fair pagoda
#

OK, so what's the problem here?

night pulsar
#

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)**
                            ],
                        ],  
        ]);
fair pagoda
#

21 Feb 08:08:10 is it UTC time?

night pulsar
#

Yes

#

2022-02-21 09:13:54 Utc time

#

@fair pagoda Did you find anything ?

fair pagoda
#

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

night pulsar
#

Okay Thanks