#Admiral

1 messages · Page 1 of 1 (latest)

north hornetBOT
steady lodge
#

Yep that error is accurate

#

if the sub is already attached to a schedule you can't create a new schedule for it

polar herald
#

hi I cancelled subscription and re-subscribed again, does that cancel its schedule?

#

and another question, by default the subscriptions come with a defualt schdule?

steady lodge
#

Yeah

#

No

polar herald
#

I did cancel the subscription, but still getting this error, do you want the req id?

steady lodge
#

yes

polar herald
#

req_q7aIcFgyEJEi73

steady lodge
polar herald
#

what should I do to cancel that please?

steady lodge
#

You want to cancel the subscription?

polar herald
#

no cancel it's schedule

steady lodge
polar herald
#

thanks a lot.

#

Exception Occurred in createSchedule: The subscription schedule update is missing at least one phase with a start_date to anchor end dates to.

#

now I'm getting this error

#

would you please take a look?

steady lodge
#

Did you include start_date everywhere?

#

That error message is telling you what's wrong

polar herald
#

$stripe->subscriptionSchedules->update($schedule->id, [
'phases' => [
[
'items' => [
[
'price' => $itemPrice,
'quantity' => $itemQuantity,
],
],
//'trial_end' => time() + 5 * 60,
'iterations' => 1,
],
],
'end_behavior' => 'cancel'
]);

#

this is my code, would you please tell me I need to set starting date to what value?

#

also if I want to include 1 day free trial in my schedule, I should add 'trial_end' => time() + 5 * 60, to my 'phases' ?

steady lodge
#

When you update a schedule you need to pass all existing phases

#

So, the start_date needs to match the one from the existing schedule you created

polar herald
#

thanks alot you've been a great help, appreciate that.