#ididit0836
1 messages · Page 1 of 1 (latest)
here is the code:
const session = await this.stripe.checkout.sessions.create({
customer: user.stripeCustomerId,
line_items: [
{
price: membership.plans[plan][billingInterval].priceId,
quantity: 1,
},
],
mode: 'subscription',
allow_promotion_codes: true,
subscription_data: {
trial_period_days: trialDays ? trialDays : undefined,
},
success_url: `${baseUrl}/?choosenPriceSuccess=true`,
cancel_url: `${baseUrl}/?choosenPriceCancel=true`,
});
Hello! Can you give me the ID of one of a Subscription where your customer paid immediately but you expected a trial period? And the ID of a different Subscription where it worked as expected before whatever changed?
No, I mean the Subscription ID. I want one where the trial worked as expected and a different one where the trial did not work as expected.
Two separate Subscriptions.
IDs should start with sub_.
here is where it did not work:
sub_1Nn6eKHUyM24RTmKKduD6tmK
here is from a few months back where i think it should've worked :
sub_1NZqmXHUyM24RTmKRDEq1Shf
Not seeing a trial period on the one where you said it should've worked.
hmm
makes me wonder if it ever worked in the first place
do you see anything wrong w/ my code up top?
That last Subscription you mentioned was created by the Checkout Session you created in this request: https://dashboard.stripe.com/logs/req_816WseY8fy8jPO
You did not set trial_period_days in that request, so I don't think that code is involved, or it's not doing what you think it is.
Perhaps trialDays was not set when the code ran?
yeah it could be... im dbl checking. if you dont hear back from me, i probably solved it. thanks in advance.
so on the test / staging environment, i have this subscription id which 30 days is working:
sub_1NnA7QHUyM24RTmKNzj9E5js
do you have a question about the above subscription?