#dominikganic_unexpected

1 messages Β· Page 1 of 1 (latest)

glad masonBOT
#

πŸ‘‹ 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/1336397232215429150

πŸ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

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.

lilac bobcat
#

The active subscription has metadata (picture)

#

Here I'm creating a schedule once he downgrades which works fine, the schedule has been created:
sub_sched_1QoqSoLZihhBkt1ckqBRplMe

#

Like in the official API docs I've passed "metadata" which is a supported property.

proven swan
#

Hi hi! Just give me a sec to read things over. πŸ™‚

lilac bobcat
#

The new subscription after the schedule took action is sub_1QoqXeLZihhBkt1cKxG7a3PK

It has no metadata applied. Sadly :/

glad masonBOT
deep perch
#

hi! fyi i'm stepping in for my colleague as he has to go. i think i know what's going on here but there are several open threads i need to catch up on so i'll get back to you ASAP.

lilac bobcat
#

Haha easy! Take your time πŸ™‚

#

No worries, I'll stay here

deep perch
#

i could be wrong but i think by default metadata doesn't propagate from the schedule to the subscription

#

let me dig around in our docs to find what i'm thinking of

lilac bobcat
#

Ah okay, this might be tricky for me but I think I'll navigate the metadata from the schedule through the webhooks to the new subscription, but I'll wait for you πŸ™‚

deep perch
#

i think you should be using the phases.metadata property as per this doc

lilac bobcat
#

phases.metadata

Should I apply it to the phases array o

#

Ahhh

#

yes that might be a point

#

I'll test it asap! πŸ™‚

deep perch
#

sounds good! let me know if that works for ya. metadata propagation can be tricky πŸ™ƒ

lilac bobcat
#

Hell yeah, but tbh I love working with Stripe, it's complicated at first but day for day I get better into it, your support is incredible good, that's so epic as dev.

Will be back in 1 min πŸ™‚

#

Yes it works now.

FYI: When a schedule expires & a new subscription has been created it will pass the metadata to the new sub! πŸ₯³

#

I have another small question now, more theory related:

deep perch
#

ok cool! i might have to circle back to it as a few other threads have opened up, but i will get to it asap

lilac bobcat
#

The property end_behavior of the subscription schedule can be

release and cancel

What I have understood, release will "update" the existing subscription to the new price / plan - but the subscription id will stay the same!

Cancel will delete the previous subscription and create a new subscription - with a new subscription id.

Is that right so far? As it doesn't work really how expected in my case.

I have set "end_behavior" to "release". But my previously active subscription is now with status "canceled" and there exists now a new subscription after the schedule took action with the new price id / plan.

That means: Even when I've set "release" - it still has created a new subscription instead of taking the old one?

https://docs.stripe.com/api/subscription_schedules/object#subscription_schedule_object-end_behavior

deep perch
#

ok i'm back! catching up

#

do you have an example schedule i can look at? that's surprising behavior to me too, but i have to admit i haven't tested this in a bit

lilac bobcat
#

In a second yeah 1 min πŸ™‚

#

sub_sched_1QorEGLZihhBkt1cHquhan1X

#

I'll forward now the time of the test clokc to invoke the schedule to take action

#

Quick question in meanwhile:

When a payment for an active subscription has failed, stripe will set the status to "past_due"

When the iteration count for tries has reached the maximum, it sets my status to "canceled" instead of expected "unpaid"

Is that a normal behavior here that past_due switches to "canceled" instead of "unpaid"? πŸ™‚

deep perch
lilac bobcat
#

Ah I've read the docs now and I've seen that I can configure what happens next after failed payments πŸ™‚

#

Thanks a lot!

#

I think you have answered all my questions yet and I've learned a lot new things πŸ™‚

#

The only thing is the end_behavior which I don't understand.

deep perch
#

ahhhhh yes. if it's ok can i circle back to you on that one in a bit?

lilac bobcat
#

suuure

#

easy

#

(:

deep perch
#

ok let's see

#

i might need to set up a repro of this

#

ok, in my test the same subscription ID is being persisted on release

#

so i think we're doing something different

glad masonBOT
frail bone
#

Hello
I'm taking over here.. While I catch up, can you give me a quick summary of the outstanding question?
It'll help be on the same page quicker πŸ™‚

#

@lilac bobcat When the subscription is configured to cancel as end behavior then it shouldn't create a new subscription.. Can you share the subscription ID that you're seeing was created after sub_sched_1QorEGLZihhBkt1cHquhan1X was released?

lilac bobcat
#

Okay weird. I have set β€šreleaseβ€˜ as behavior and it creates a new subscription out of this schedule. Well, β€šcancelβ€˜ does actually the same

lilac bobcat
frail bone
#

Can you share the relevant IDs?

#

Like what Subscription Schedule ID you're testing with and the IDs of the newly created subscriptions?