#supreeth_20471

1 messages ยท Page 1 of 1 (latest)

buoyant whaleBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

thick lotus
#

Hey there ๐Ÿ‘‹ hm, not sure why yet, but in the response to your request where you tried to resume the Subscription, the status is still paused.

oak halo
#

yup i noticed that too

#

am i missing a param or soemthing. also the response isnt thowing a failed a resonse. its a 200

thick lotus
#

Trying to figure that out

#

Hm, I'm not seeing a request to pause this Subscription, do you know what caused it to pause offhand?

oak halo
#

i used test clocks to dod that. i initially set a 2 day trial. ran the test clock. and it aut paused

thick lotus
#

Oh oh I see, it was set to pause at the end of the trial (which is exactly what you described initially that didn't click for me for some reason)

oak halo
#

no worries ๐Ÿ™‚

buoyant whaleBOT
thick lotus
#

Sorry for the delay, have a better idea of what is going on here, but need another couple minutes to confirm.

#

Alright, so when you made the request to resume the Subscription, that generated an Invoice to handle collecting the payment from the Customer. That Invoice needs to be handled before the Subscription will be unpaused.

It looks like the Invoice that was created was marked uncollectible before it could process the payment:
https://dashboard.stripe.com/test/logs/req_vqP0rp1wxwvggs

Now that it's been marked as uncollectible, I'd expect you to see that the Subscription transitioned to a non-paused status (expcet that it looks like the Subscription was cancelled while I was digging)

oak halo
#

so the invoice was left in the open state, so it was never techinically completely resumed because it wasnt paid

#

am i right?

thick lotus
#

Correct, the Invoice was finalized, but not paid, so the Subscription didn't progress to a non-paused state until that Invoice progressed to a terminal state. Since it was marked as uncollectible, the Subscription moved to an active status. Had that Invoice payment happened and failed, the Subscription should have moved to a past_due state.

#

That's the one that cleaned up the Invoice

oak halo
#

i checked the time stamps

so the initial request and the request you sent are 20 mins apart.

i dont think the mark as uncollectible was the issue but something similar.

when i resume the subscription the invoice was opened but for some reason it didnt charge automatically. because of that the invoice status was left in the open state which technically isnt considered a success operation which is why it didnt resume the subscription

#

so when i resume the subscription does charge automatically not work?

thick lotus
#

I believe that's expected, that the Invoices wait about an hour until after finalization to process their payment.

#

Oh actually, that might not be right

#

Looking at the Invoice object, it looks like auto_advance is off

oak halo
#

ohhh ! how do i set it to true then? can i pass it as a param to the resume call? i dont see it the doc though

thick lotus
#

I'm not spotting a way for you to do it as part of the resume call. What I would recommend instead, is to pull the ID of the Invoice from the latest_invoice field after resuming the Subscription (you may want to double check the Subscription actually created a new Invoice when being resumed though).

I think it'd be easier to make a request to pay the Invoice than it would be to update auto_advance and wait for it to kick in:
https://stripe.com/docs/api/invoices/pay

oak halo
#

yea that makes sense ! thats an approach i was think about too. well any idea why it isnt a part of the resume endpoint ?

#

feels like it should be there? no ?

thick lotus
#

No clue, but that's a great idea I can file feedback for.

oak halo
#

awesome ! thank you soo much though ๐Ÿฅณ