#ididit0836

1 messages · Page 1 of 1 (latest)

summer wagonBOT
earnest coral
#

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`,
    });
buoyant moat
#

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?

earnest coral
#

subscription id is the same

#

did you mean the session id ?

buoyant moat
#

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_.

earnest coral
#

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

buoyant moat
#

Not seeing a trial period on the one where you said it should've worked.

earnest coral
#

hmm

#

makes me wonder if it ever worked in the first place

#

do you see anything wrong w/ my code up top?

buoyant moat
#

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?

earnest coral
#

yeah it could be... im dbl checking. if you dont hear back from me, i probably solved it. thanks in advance.

summer wagonBOT
earnest coral
#

so on the test / staging environment, i have this subscription id which 30 days is working:

sub_1NnA7QHUyM24RTmKNzj9E5js

stray kettle
#

do you have a question about the above subscription?