#hemant-subscription-bca
1 messages · Page 1 of 1 (latest)
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)
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 ^^
Sure but I'm certain it just works, so I need a lot more details to help you
@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 ?
Is the subscription incomplete or in pending?
It was active before and after update
In subscription update response previous_attributes object only latest_invoice key was there
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
This subscription is using a Test Clock. Does it work without a Test Clock first?
okay so did you advance the Test Clock before doing the update?
@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
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
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.