#supreeth-test-clock-billing-cycle-anchor
1 messages · Page 1 of 1 (latest)
Hi, taking a look here at these requests
If you look at the response of this request to resume the subscription, https://dashboard.stripe.com/test/logs/req_taLKEay0Z7dMD8 the status is still paused. It looks like the test clock time is 2024-04-30 20:19:00 UTC for the resume call and this request, https://dashboard.stripe.com/test/logs/req_tTqHVppft2lSD3 was made at
2024-01-03 20:11:38 UTC.
Can you try these sequentially and make sure that the test clock advances matches the sequency?
ill try that out. so is it something to do with the test clock?
👋 it could be
so in my code the resume and update subscription are in squence with awaits.
let me re run it and i;; send you the new logs
so these are the new req ids
req_YZhHZYeFhNvlwl
req_qAfbSusQnL8YR8
it looks like they are executed in sequence.
my observation -
- the default payment method is attached properly -
req_R2jDD2QdL7jrYy - for some reason the resume is not resuming the subscription and it still stays in paused.
if you introduce a delay of a few seconds, does that change anything?
yeah that's interesting indeed
ah it might be due to invoice still being open
https://stripe.com/docs/api/subscriptions/resume
If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date.
huh ! thats interesting. im not sure how a invoice is getting created. let me check it out
yes. there's an open invoice that created. so i need to charge the existing invoice and then continue
got it
but i need to figure out at what this invoice is getting created
billing_reason seems to be subscription_cycle
these docs go over everything
https://stripe.com/docs/billing/subscriptions/trials#resume-a-paused-subscription
got it
also on the same lines - i was trying to understand
Invoice was voided The invoice was automatically voided because it wasn't paid before the pending update associated with it expired.
i read about it but still seems unclear. would you be able to tell me what this means
which invoice are you asking about exactly?
so the invoice gets voided when i resume and set
billing_cycle_anchor: 'now', proration_behavior: 'always_invoice' -
the invoice id is in_1OUbtvCxlassJY00ZK9Yc8wN
the invoice was voided when you updated the sub by setting prorate: false and invoice_now: true
https://dashboard.stripe.com/test/logs/req_o85V0bQIugtS8M
ah actually when you deleted the sub