#lucaswork_code

1 messages ¡ Page 1 of 1 (latest)

torpid charmBOT
#

👋 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.

weary herald
#

"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?

manic leaf
#

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

weary herald
#

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"
torpid charmBOT
manic leaf
#

what about other "active" states?

For example, I paused a subscription but it still shows as active for the status instead of paused

tight moth
#

hey, I'm around now. Those are Dashboard labels, can you check what the underlying Subscription ID is?

manic leaf
#

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

torpid charmBOT
manic leaf
#

sub_1S04HaGb3V14nGM3wkEtlK7a (paused via stripe dashboard)
sub_1S05Q3Gb3V14nGM3FLgcBnpw (paused via ThriveCart)

tight moth
#

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

https://docs.stripe.com/billing/subscriptions/overview#:~:text=The subscription has ended its trial period without a default payment method and the trial_settings.end_behavior.missing_payment_method is set to pause. Invoices are no longer created for the subscription. After attaching a default payment method to the customer%2C you can resume the subscription.

#

does that help? those are active, only paused collections

manic leaf
#

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