#Xythantiops
1 messages ยท Page 1 of 1 (latest)
Hi ๐
Do you have an example Subscription ID I can review?
Thanks, looking now
Ah, that is because you paused payment collection but that does not put the Subscription in a status of paused
We mention that is a requirement for the .paused event here: https://stripe.com/docs/api/events/types#event_types-customer.subscription.paused
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?
Subscriptions are state machines so you cannot directly manipulate the status
Out of curiosity, how do subscriptions trigger paused and resumed statuses if it is not something I trigger directly?
It has to with customers providing payment method information. I'm looking for some docs on this I can share
If you create a Subscription with a free trial period and don't collect payment info from your customer up front, you can configure the subscription to transition to paused until the customer provides that information: https://stripe.com/docs/api/payment_links/payment_links/create#create_payment_link-customer_creation
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
Great ๐ I'm happy you found it useful.