#dominikganic_unexpected
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/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.
- dominikganic_best-practices, 5 hours ago, 22 messages
- dominikganic_best-practices, 3 days ago, 47 messages
- dominikganic_api, 4 days ago, 44 messages
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.
Hi hi! Just give me a sec to read things over. π
The new subscription after the schedule took action is sub_1QoqXeLZihhBkt1cKxG7a3PK
It has no metadata applied. Sadly :/
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.
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
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 π
phases.metadata
Should I apply it to the phases array o
Ahhh
yes that might be a point
I'll test it asap! π
sounds good! let me know if that works for ya. metadata propagation can be tricky π
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:
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
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
Yes easy don't worry !!
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
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"? π
canceled is an expected possible value here, but i am struggling to remember what exactly determines that
https://docs.stripe.com/billing/subscriptions/overview#failed-payments
i think it's in your billing settings
https://dashboard.stripe.com/settings/billing/automatic
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.
ahhhhh yes. if it's ok can i circle back to you on that one in a bit?
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
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?
Okay weird. I have set βreleaseβ as behavior and it creates a new subscription out of this schedule. Well, βcancelβ does actually the same
Sorry I wasnβt there π¦