#benoit-subscription-trial
1 messages · Page 1 of 1 (latest)
Hi 👋
Can you share the API request ID for the request that creates this Subscription?
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
There are no trial settings on that request: https://dashboard.stripe.com/test/logs/req_GYtxqodddCyHmJ
You will want to pass trial_period_days with a value of 7 to get the outcome you are looking for. https://stripe.com/docs/api/subscriptions/create#create_subscription-trial_period_days
benoit-subscription-trial
I never had to specify the trial period, as i have defined it when i created the plan (long time ago). It worked before i update my code to use the Stripe Payment Element form
@dense veldt https://stripe.com/docs/upgrades#2018-05-21
specifically this change:
When creating or updating subscriptions, the default value of trial_from_plan is now false, meaning that a subscription will not automatically inherit a plan’s trial_period_days. If a subscription is already trialing, switching to a new plan without specifying trial_from_plan will maintain the trial. We recommend setting an explicit trial per subscription instead of setting trials on plans.
My guess is that you recently upgraded your integration to use the most recent version of stripe-node which is pinned to the latest API version by default which would include this change from 5 years ago.
Indeed, i upgraded from v6 to v12.10.0
Looking at your requests, you were already using that version back in June so it's not recent at least
But yeah when you switched you missed that the latest version is pinned to the latest API version and I assume you used to have a really old API version
That would apply to all your API requests which also would change the shape/behaviour
i was on the NPM Stripe v6 until this May
Look at the changelog: https://github.com/stripe/stripe-node/blob/master/CHANGELOG.md
The most recent version for v6 is 6.36.0 https://github.com/stripe/stripe-node/blob/master/CHANGELOG.md#6360---2019-05-14 which was released in May 2019, over 4 years ago
You just jumped to v12 which is recent so you jumped through 4 years of numerous API changes and breaking changes
https://github.com/stripe/stripe-node/wiki has the list of all migration guides
Yes, i jumped to v12.10.0 this May
(But i never tried to subscribed to my old "trialed" plans, that's why i didn"t see my problem)
Could you tell we why the trial period is still possible to set via the Dashboard, if this trial period cannot be used by default when i subscribe to the plan via the API ?
Mostly for old compatibility for old platforms/code that relies on this.
Ok, like mine until some month ago
Ok, i understand, i will do what must be done, thank you very much for your answers !
Sure thing, sorry this was confusing, it's tough when you just many major versions at once without realizing the impact