#Valaris
1 messages · Page 1 of 1 (latest)
Hi 👋 can you share the ID of a request where you passed in a timestamp for the end date but did not see the corresponding phase get updated?
No, our request IDs begin with the prefix req_ followed by an alphanumeric string.
https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
req_lcMjAAw7r5QkMf
Thank you, pulling that up.
I see in the response of that request (req_lcMjAAw7r5QkMf) that the end_date of phase 0 is being updated to match the value that you're providing in the request.
It changed from 1678369620 to 1677679755.
Yes I changed it to test it with the test timer on stripe
Then on the test timer I put a higher time than the end date and nothing changes
Okay, to restate the problem to make sure I'm understanding. You created a Subscription and Subscription Schedule inside of a Test Clock scenario. You then updated the end_date of the first phase of the Subscription Schedule, but did not see the Subscription get updated when advancing the time of the Test Clock beyond the end_date that you had specified. Does that sound right?
Comparing the logs of the Subscription Schedule and the Test Clock, it looks like you released the Subscription Schedule before advancing the Test Clock beyond the end_date of Phase 0.
Ok, so I need to release after changing the date ? Sounds strange. I also tried without testing clock by puttint strtotime('now + 1 minute') and after 1 minute nothing changed also
No, you need to not release the Subscription Schedule, releasing it breaks the association between it and the Subscription which prevents any future changes from happening.
The flow I'm seeing is that you released the Subscription Schedule with this request:
https://dashboard.stripe.com/test/logs/req_vJiDaNEHANzTis
Before you advanced the Test Clock's time with this request:
https://dashboard.stripe.com/test/logs/req_3mFZoDA4I69Cu0
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
So when the Test Clock was advanced, the Sub Schedule seems to have already been disassociated from the Subscription, so it is expected that no changes were made.
what I wanted to do is "I have a mensual subscription and I wnat to change this subscription to be annual, when I click on change subscription then I create a schedule for the mensual to end at the end of the period and then the annual subscription should start"
Gotcha, none of that process requires releasing the Subscription Schedule, so I would recommend trying your flow again but without that step.
An other moderator told me this
I have a mensual subscription and I wnat to change this subscription to be annual, when I click on change subscription then I create a schedule for the mensual to end at the end of the period and then the annual subscription should start.
And I don't get what you are telling me to advance first the time clock before updating the subscription.
But ok without the time clock I tried this (screen), so one minute after clicking the changing sub button the subscription should change from mensual to annual
I did not say to advance the Test Clock before updating the Subscription Schedule. I was pointing out that your scenario didn't work as expected because you released the Subscription Schedule before advancing the Test Clock beyond the new end_time that you set.
Yes I advanced the time clock beyond because beyond then the subscription should have changed
But you released the Subscription Schedule before you advanced the Test Clock beyond the end_date of the phase. When you release a Subscription Schedule, it is disassociated form the Subscription that it was attached to, so the Subscription Schedule no longer has any influence on the Subscription and will not make any changes.
Please try your flow again, but remove the step that triggered the release of the Subscription Schedule.
the release is the update of the subscription schedule right ?
No
what is the release then ?
This function is used to update the Subscription Schedule:
https://stripe.com/docs/api/subscription_schedules/update
Releasing the Subscription Schedule is a different function, and it breaks the association between the Subscription Schedule and the Subscription that it is controlling:
https://stripe.com/docs/api/subscription_schedules/release
Once you release a Subscription Schedule, it will no longer make any changes to the Subscription.
But I don't do any release in my code, I just create a schedule and I update it I never release it
The release is made automatically
It is not happening automatically, and I recommend that you double check your code. The request to release that Subscription Schedule came from your PHP code and was made with your secret key. Here is the link to that request again:
https://dashboard.stripe.com/test/logs/req_vJiDaNEHANzTis
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sorry, I double check my code and yes the release happened in an other file. Thanks your time, I'll try again
Any time, happy to help!