You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Stripe.SubscriptionSchedule.Phase type in TypeScript is missing the trial property. I am currently using SubscriptionSchedules to sign up my users for a free 30-day trial of my product, then, I move them to the free tier. If a user wants to make changes to their subscription before the trial runs out, I have to know this since they can only make certain changes to the trial. To create the first phase, I am using trial: true and end_date: _in 30 days_, since this phase should only be a trial. When checking currentPhase.trial, TypeScript complains that trial isn't part of Phase. But when I log out my phases to the console, the first phase has trial: true and the rest of the phases just don't have trial, so this should be an optional property. Currently, I have to extend the Phase type into my own custom type and add trial.
To Reproduce
Create a Subscription Schedule where the first phase is a trial phase
Hi @alexiz10 Although you can set trial to a phase when creating a subscription schedule, the resulting subscription schedule object doesn't have a trial property in their phases.
Can you share with me the subscription schedule ID so that I can take a further look?
Describe the bug
The
Stripe.SubscriptionSchedule.Phase
type in TypeScript is missing thetrial
property. I am currently using SubscriptionSchedules to sign up my users for a free 30-day trial of my product, then, I move them to the free tier. If a user wants to make changes to their subscription before the trial runs out, I have to know this since they can only make certain changes to the trial. To create the first phase, I am usingtrial: true
andend_date: _in 30 days_
, since this phase should only be a trial. When checkingcurrentPhase.trial
, TypeScript complains thattrial
isn't part ofPhase
. But when I log out my phases to the console, the first phase hastrial: true
and the rest of the phases just don't havetrial
, so this should be an optional property. Currently, I have to extend thePhase
type into my own custom type and addtrial
.To Reproduce
trial
property set totrue
.trial
property in the first phaseExpected behavior
When attempting to access the
trial
property in a Phase, I should not see an error saying that thetrial
property does not exist in my phase.Code snippets
OS
macOS
Node version
Node v20.12.1
Library version
stripe v17.7.0
API version
2025-02-24.acacia
Additional context
No response
The text was updated successfully, but these errors were encountered: