#tbhaxor - subscription

1 messages · Page 1 of 1 (latest)

tulip junco
#

Hi there!

#

Can you clarify where this screenshot is coming from?

marsh spruce
#

subscription schedule

#

sub_1LGMBNHn3Zy4ma8uRgoudwdA

#

check this

#

Bundle item is clear. This payment method is not clear to me

#
 const subscription = await this.stripe.subscriptions.retrieve(id);
    if (subscription.schedule) {
      throw new NotAcceptableException([
        {
          message: 'Subscription is already scheduled for items transition.',
          field: '$stripe.subscription.schedule',
          currentValue: subscription.schedule,
          type: 'FIELD_NOT_NULL',
        },
      ]);
    }
    const schedule = await this.stripe.subscriptionSchedules.create({ from_subscription: id });

    return this.stripe.subscriptionSchedules.update(schedule.id, {
      proration_behavior: 'create_prorations',
      phases: [
        {
          start_date: subscription.current_period_start,
          end_date: subscription.current_period_end,
          items: subscription.items.data.map((item) => ({ price: item.price.id, quantity: item.quantity })),
        },
        {
          start_date: subscription.current_period_end,
          items: items,
        },
      ],
    });

This is the source code of the function I am using to create schedules

tulip junco
#

subscription schedule
But where is this screenshot from? the Stripe dashboard, your own application, or something else?

marsh spruce
#

Yes

#

dashboard :/

tulip junco
#

Thanks for the info! We are not really familiar with the dashboard here on Discord, we prefer using APIs 🙂

#

At least looking at the code you shared, this shouldn't change the payment method of the subscription.

marsh spruce
#

Yeah, please check the code

#

I have implemented this with the API

#

Could you let cj handle this?

tulip junco
#

Yeah, please check the code
I already did, and it looks fine to me. I don't see how that could would change the payment method for the subscription. But if you want to double check, I recommend using test clock as mentioned in my previous message.

marsh spruce
#

Cool will do. Just in case if this thread is locked by the bot, how can I ask to open the same thread.

#

It would be required for providing context later on

tulip junco
#

You can simply post a message in dev-help asking for someone to reopen the previous thread, with a link to this thread.

marsh spruce
#

Got it, thanks

#

Please close this thread. It is sorted for now

vapid hearth
#

Will do, glad you could sort things out!