#Terry_Kap - update schedule
1 messages ยท Page 1 of 1 (latest)
Yes, both are updatable in the update call for the schedule https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-phases-start_date
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You basically need to pass in the full set of phases again even if you aren't editing some of them
Have you been trying to set this already or was this just an initial question?
The subscription schedule update is missing at least one phase with a start_date to anchor end dates to.
i am fcing this error
$a = $stripe->subscriptionSchedules->update(
'sub_sched_1LDq7IJUPfMtme705dN2UyTo',
[
'phases' => [
[
'items' => [
[
'price' => 'price_1KMWQUJUPfMtme70vw4ts8US',
'quantity' => 1,
],
],
'end_date' => 'now',
//'end_date' => '1658582716',
],
[
'items' => [
[
'price' => 'price_1KMWQUJUPfMtme70vw4ts8US',
'quantity' => 1,
],
],
'start_date' => 'now',
//'end_date' => '1658582716',
],
]
]
);
If you already have the subscription phases, I think you need to keep the first phase's start date
Just copy it over from the current phase. 'start_date' => 'some_unix_timestamp' and 'end_date' => 'now'
Uncaught (Status 400) (Request req_VsHPAoPqC2S0fA) start_date must be less than each phase's end_date or its derived end date based on iterations and plans.
thrown in
Hi there ๐ my teammate needs to step away shortly so I'm jumping in, please bear with me a moment while I catch up on the context of the thread.
In that most recent request, I'm seeing both a start_date and end_date for the first phase that you're passing, but the specified start_date is a later date than the provided end_date.