#Admiral
1 messages · Page 1 of 1 (latest)
Yep that error is accurate
if the sub is already attached to a schedule you can't create a new schedule for it
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?
I did cancel the subscription, but still getting this error, do you want the req id?
yes
req_q7aIcFgyEJEi73
You already attached that sub to a schedule here: https://dashboard.stripe.com/test/logs/req_cuWf3r7yt3XbkO
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
what should I do to cancel that please?
You want to cancel the subscription?
no cancel it's schedule
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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?
Did you include start_date everywhere?
That error message is telling you what's wrong
$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' ?
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
Needs to be a unix timestamp
thanks alot you've been a great help, appreciate that.