#supreeth-test-clock-billing-cycle-anchor

1 messages · Page 1 of 1 (latest)

formal mauveBOT
tepid trellis
#

Hi, taking a look here at these requests

#

Can you try these sequentially and make sure that the test clock advances matches the sequency?

formal mauveBOT
#

supreeth-test-clock-billing-cycle-anchor

runic dune
#

ill try that out. so is it something to do with the test clock?

rigid horizon
#

👋 it could be

runic dune
#

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.
rigid horizon
#

if you introduce a delay of a few seconds, does that change anything?

runic dune
#

no ! let me test it out

#

but the response for the resume operation is still paused

rigid horizon
#

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.

runic dune
#

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

rigid horizon
#

billing_reason seems to be subscription_cycle

runic dune
#

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

rigid horizon
#

which invoice are you asking about exactly?

runic dune
#

so the invoice gets voided when i resume and set
billing_cycle_anchor: 'now', proration_behavior: 'always_invoice' -
the invoice id is in_1OUbtvCxlassJY00ZK9Yc8wN

rigid horizon
#

ah actually when you deleted the sub