#lucaswork_code
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1409594208137904148
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
"We had some subscriptions from 2022 migrate in a customer's account (unsure the original status)." can you expand on this?
Were these subscriptions canceled but they are showing as active?
Hi! Yeah we believe they were cancelled but since they've already been migrated its not 100% confirmed. I was curious if there are other states like paused or failed payment where the status might not be cancelled but also might not be active
Gotcha, we have the following states that you can use when attempting to List Subscriptions
"active",
"all",
"canceled",
"ended",
"incomplete",
"incomplete_expired",
"past_due",
"paused",
"trialing",
"unpaid"
what about other "active" states?
For example, I paused a subscription but it still shows as active for the status instead of paused
hey, I'm around now. Those are Dashboard labels, can you check what the underlying Subscription ID is?
Basically I think I want to change it from
$subscriptionFrom->status === 'cancelled'
$subscriptionFrom->status !== 'active'
but not sure "active" is restrictive enough
yeah one second
sub_1S04HaGb3V14nGM3wkEtlK7a (paused via stripe dashboard)
sub_1S05Q3Gb3V14nGM3FLgcBnpw (paused via ThriveCart)
sub_1S04HaGb3V14nGM3wkEtlK7a (paused via stripe dashboard)
yeah so here's the thing: You're pausing the collection using
pause_collection: {
behavior: "keep_as_draft",
},
, not the Subscription itself. So that only changes that the Invoices stay in draft but the Subscription remains active, just not collecting payments.
What I think you want, a true "pause" is when the Subscription ends a free trial and there's no PaymentMethod on file to charge, so it changes to status: paused
does that help? those are active, only paused collections
that does help the distinction, thank you!
based on that, I think this is probably the only change I need to make so think we're all set here, thank you
Basically I think I want to change it from
$subscriptionFrom->status === 'cancelled' // skip cancelled
$subscriptionFrom->status !== 'active' // skip non active