#hemant-subscription-bca

1 messages · Page 1 of 1 (latest)

rotund coyoteBOT
twin adder
#

hemant-subscription-bca

#

Hey @blazing echo ! I'm not sure I follow what you mean. If you create a Subscription now, wait 1 minute and then update billing_cycle_anchor: 'now' then you should see the time reset to now (a minute later what it was)

blazing echo
#

It meant the same. The expected time should be now (a minute later) but it's not getting update.

It updates if I try to update with next day's timestamp

#

@twin adder ^^

twin adder
#

Sure but I'm certain it just works, so I need a lot more details to help you

blazing echo
#

@twin adder

So I just created a subscription and I am using stripe node library to update the subscription with these updates

{
                            payment_behavior: 'pending_if_incomplete',
                            billing_cycle_anchor: 'now',
                            proration_behavior: 'none',
                            items: [
 {
                                    id: currentSubItem.id,
                                    plan: newPrice.id,
                                    quantity: data.quantity
 }
]
}

I am confused that why isn't it updating the subscription billing cycle. And if there is any issue with the key values then why does that works when I try to update the next day ?

twin adder
#

Is the subscription incomplete or in pending?

blazing echo
#

It was active before and after update

#

In subscription update response previous_attributes object only latest_invoice key was there

twin adder
#

I don't really know what you mean

#

Can you give me an exact Subscription id sub_123 because I don't really follow what you're discussing

blazing echo
#

Sure here is the subscription id: sub_1MOk8zKrMsGaMR4gxnuiKIOs

#

@twin adder

twin adder
#

This subscription is using a Test Clock. Does it work without a Test Clock first?

blazing echo
#

I haven't tried that. lemme check

#

@twin adder yes it works without test clock.

twin adder
#

okay so did you advance the Test Clock before doing the update?

blazing echo
#

@twin adder it works after advancing the test clock as well

The only case it's not working fine is when test clock is attached and doing the updates without advancing

twin adder
#

I mean that makes sense since in that case the time is still the original one

#

that's the whole point of the TestClock feature, to be able to simulate time changes

blazing echo
#

Ah... that's right. I was just updating the subscription and didn't thought that the attached test clock time will remain same until changed. Thanks a lot for the quick help.