#Terry_Kap - update schedule

1 messages ยท Page 1 of 1 (latest)

crisp igloo
#

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?

misty veldt
#

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',
],
]
]
);

crisp igloo
#

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'

misty veldt
#

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

grave spade
#

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.