#lucas
1 messages · Page 1 of 1 (latest)
hello! ive been using sub_1NGhsaEk6sr5GyDhutjZFJLW
for the record, i think if this is a dead end, i can solve in a different way, but i'll have to explain for context
actually this canceled sub was probably the one i experienced the error on sub_1NDs0NEk6sr5GyDhFtrf7TOd
You can use cancel_at_period_end parameter, it works with trials too: https://stripe.com/docs/api/subscriptions/update#update_subscription-cancel_at_period_end
okay, i dont want to cancel the sub, just sidestep the trial
we can close this thread down,
What would be the state if it's not a trial, but you also don't want to charge the customer?
Maybe if you could share your specific use case I would be able to suggest a better solution.
long story long i had a previous developer that was using the trial period to move next invoice date around, i would like to use subscription schedules and phases, using that approach ended trial and charged immediately. i want to keep the customer active & not charge them till a specified date
end user request is - i want to get charged/shipped product earlier or later than current recurrence next upcoming invoice
(we charge and ship products, no proration for our use case, metered time, etc)
so my solution here that i think is working instead is to carry the trial with the first phase, ending it when the first phase ends. rather than try to force end it prior to setting up the phases
here's the relevant code
return stripe.subscriptionSchedules.update(subSchedule.id, {
end_behavior: 'release',
phases: [
{
items: subModItems,
start_date: subSchedule.current_phase.start_date,
end_date: Math.floor(millis / 1000),
...(sub.status === 'trialing' && { trial_end: Math.floor(millis / 1000) }),
proration_behavior: 'none',
},
{
items: subModItems,
start_date: Math.floor(millis / 1000),
proration_behavior: 'none',
billing_cycle_anchor: 'phase_start',
},
],
});
...(sub.status === 'trialing' && { trial_end: Math.floor(millis / 1000) }),
ensures that we dont end the trial and bill
walked through a test clock and all seems well
no worries i'm good, i think