#andrea-skuola - start date

1 messages ยท Page 1 of 1 (latest)

leaden flower
#

Can you share the request ID?

uneven sable
#

what request ID?

leaden flower
uneven sable
#

req_afrj32SgVMe6Ek

leaden flower
uneven sable
#

I said it in the first message, when I pass start_date i receive this error:

Received unknown parameter: start_date

#

req_5mE1S9tke5QJCt

#

this is the request with the error

leaden flower
#

You're passing start_date in the wrong place

#

Needs to be within phases

uneven sable
#

this: req_tHF7mNFjAnX2lf
why i cannot modify the start date of the current phase, i'm creating it now

leaden flower
#

That's not a creation request

#

That's an update request

#

It was already created that's why

uneven sable
#

it's an update request because the create request is this:

$scheduledSub = $stripe->subscriptionSchedules->create([
'from_subscription' => $subscription->id
]);

#

when passing from_subscription field you can pass only that field

#

so for adding a phase i need to update it

leaden flower
#

Ah ok so you want to keep that first phase (current phase) the same and just add new phases

#

You'll have to pass the current (existing) phase data in for phase 1 and then add the new phases in after

uneven sable
#

In reality I have to make subscriptions with installments based on customer choice and I was told that scheduling was the only possible method

leaden flower
uneven sable
#

So how can I create a phase with 3 installment if customer choose 3 installment?

#

if I already have subscription

#

so via update method

leaden flower
#

Yeah so you're close

#

The issue is you have to pass the phase that currently exists in the first position

#

So if you want a schedule with 3 phases and the subscription you created is the first phase, you have to pass all 3 in the update command (including the one that already exists)

#

That make sense?

uneven sable
#

i need 1 phase with 3 iterations (installments) I think

#

why 3 phases?

leaden flower
#

Oh I see you're doing iterations. Apologies

#

So then you pass the same data that's currently on the first phase in the update request and just add iterations

#

The issue in your update command is you were changing the startdate

#

That you can't change if the phase has already started

uneven sable
#

but if i don't pass start_date it returns error as you saw

leaden flower
#

You have to pass the existing start date

#

Just don't change it

uneven sable
#

it is not very natural to pass the same date if it has already been entered, don't you think?

#

i need to do another api call to get it

leaden flower
#

Yeah I get that it's a bit weird

#

I don't quite know why it's designed that way but that's how it is

sullen mauve
#

HI ๐Ÿ‘‹ jumping in so my teammate can take a break.

On this point:

i need to do another api call to get it
Are you using an ID that you stored on your end, or are you pulling the ID of the Subscription Schedule from another object that you retrieved like the Subscription? If the latter, then you can use our Expand functionality to expand the Subscription Schedule within the response of the request you're already making:
https://stripe.com/docs/api/expanding_objects

uneven sable
#

i noticed i already have stat date without do another api call

#

now it seems the operation has succedeed, can I verify from Dashboard if schedule was set?

sullen mauve
#

Awesome! I'm not as familiar with the dashboard side of things, so please bear with me while I take a couple minutes to look into that.

#

When reviewing that Subscription, I am seeing a tag near the top-right of the page that is showing the Subscription is scheduled to be canceled.

uneven sable
#

i have created this subscription sub_1LJIRvK6jaF9EpCmrYKVzpnC with schedule, can I make time go ahead to pay the next invoice and see what happen?

#

because dashboard says next invoice on Aug 8

sullen mauve