#Xythantiops

1 messages ยท Page 1 of 1 (latest)

proud pewterBOT
mental halo
#

Hi ๐Ÿ‘‹

Do you have an example Subscription ID I can review?

proud karma
#

Sure. Let me get that for you

#

"sub_1MqIL9KK98Vh9V55Xu95g24e"

mental halo
#

Thanks, looking now

#

Ah, that is because you paused payment collection but that does not put the Subscription in a status of paused

proud karma
#

I see that now.

We were using something like:

['pause_collection[behavior]' => Stripe\Invoice::STATUS_VOID]

#

What should I send to actually pause the subscription?

mental halo
#

Subscriptions are state machines so you cannot directly manipulate the status

proud karma
#

Out of curiosity, how do subscriptions trigger paused and resumed statuses if it is not something I trigger directly?

mental halo
#

It has to with customers providing payment method information. I'm looking for some docs on this I can share

proud karma
#

Oh, ok. That makes sense. I was envisioning the paused and resumed events in the wrong way.

#

I also see there is this property after we resume payment collection, so I can use that to determine when payment collection has been restored:

"previous_attributes": { "pause_collection": { "behavior": "void", "resumes_at": null } }

#

Thank you, I see how I can handle the functionality I was trying to do without the paused and resumed events. This was extremely helpful

mental halo
#

Great ๐Ÿ™‚ I'm happy you found it useful.