#Karan S

1 messages · Page 1 of 1 (latest)

tardy burrowBOT
high surge
#

Hi there!

hallow needle
#

Hii

#

Can you please check this

high surge
hallow needle
#

But why ,
Like I want to understand this,
I schedules a subscription on one specific date,
And when that date arrives default end_behaviour is release so at that time schedule will be release.

#

And subscription will be created

#

but at any point if payment fails will this go back to schedule ?

#

sub_1Lg5TnSDKDxgNBOJTjz3uFmY this is Id. Please check

high surge
hallow needle
#

Yes I got your point but when i created schedule its end_behaviour is release

#

so again need to release ?

#

Can you please explain me this ?

high surge
#

I think the subscription will be automatically released at the end of the current billing period.

hallow needle
#

Even after creation of subscription, it will always be managed by subscription_schedule ?

#

In every case ?

#

Do we have any documentation for this question ?

#

@high surge ?
if I have created a schedule , when will it gets released?
When scheduled date arrives ?

#

Please help

high surge
#

Sorry for the delay, Discord is a little busy. Please be patient. Having a look now.

hallow needle
#

ok

high surge
#

So it looks like you didn't specify an number of iterations or an end_date to your subscription schedule. So that just inherits the interval from the single line item, which is a month.
The subscription will be released at the end of the defined phase iterations. In this case, the end of the initial 1 month billing cycle.

hallow needle
#

So the subscription schedule will be release after first phase of subscription,

Let's say
If I schedule monthly subscription ,it will be released after 1 month and if its yearly schedule will gets released after 1 year ?

high surge
hallow needle
#

Hi @high surge
But those iterations in subscription schedule are for actual subscriptions ?
And not for schedule ?

high surge
#

I'm not sure I understand your question. Can you rephrase?

hallow needle
#

ok

#

So what I want is, create a subscription from a future start date to end_date as forever until cancelled.

What I'm doing is creating a schedule with start date as future date when I want to start that subscription.

Payload I'm passing is

            customer,
            start_date: new Date(`${body.start_date}`) > new Date() ?
                (new Date(body.start_date).getTime()) / 1000 :
                Math.floor(new Date().getTime() / 1000), //converting to timestamp
            phases: [
                {
                    items: plans.data.map(x => ({ price: x.price })),
                    proration_behavior: 'none'
                },
            ],
            default_settings: {
                default_payment_method: body.payment_method
            }
        };```
#

When this future date arrives, I try to cancel subscription after 2-3 days ,But it don't let me do that as schedule is attached to same.

willow cape
#

That will also cancel the associated subscription

hallow needle
#

But I can't directly cancel the subscription ?

Like I'm not sure about this phases concept,

If I don't specify any iterations and pass items and create new subscription at scheduled date from schedule API. And release schedule subscription on webhook call ,then will this line items be attached to subscriptions OR just this schedule ?

#

Can I release schedule on subscription creation ?

willow cape
#

But I can't directly cancel the subscription ?
Not without manually releasing the subscription first

hallow needle
#

If I don't specify any iterations and pass items and create new subscription at scheduled date from schedule API. And release schedule subscription on webhook call ,then will this line items be attached to subscriptions OR just this schedule ?

Can I release schedule on subscription creation ?

willow cape
#

Can I release schedule on subscription creation ?
There's no parameter for that, no

hallow needle
#

Like manually on webhook

willow cape
hallow needle
#

okay thanks

#

If I don't mention iterations, when will schedule get ends ?

willow cape
#

At the end of the initial billing period as @high surge stated earlier

hallow needle
#

ok