#andrea-skuola - start date
1 messages ยท Page 1 of 1 (latest)
what request ID?
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
req_afrj32SgVMe6Ek
Take a look on your dashboard: https://dashboard.stripe.com/test/logs/req_afrj32SgVMe6Ek. You aren't passing start_date
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
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
You're passing start_date in the wrong place
Needs to be within phases
I recommend reading our api spec: 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.
this: req_tHF7mNFjAnX2lf
why i cannot modify the start date of the current phase, i'm creating it now
That's not a creation request
That's an update request
It was already created that's why
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
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
In reality I have to make subscriptions with installments based on customer choice and I was told that scheduling was the only possible method
Yeah that's right: https://stripe.com/docs/billing/subscriptions/subscription-schedules/use-cases#installment-plans
So how can I create a phase with 3 installment if customer choose 3 installment?
if I already have subscription
so via update method
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?
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
but if i don't pass start_date it returns error as you saw
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
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
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
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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?
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.
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
We do have functionality for that, but you'll need to create new objects for that.
We recently introduced Test Clocks which allow you to create objects inside of a sandbox where you do have the ability to advance time.
https://stripe.com/docs/billing/testing/test-clocks