#vashist_api
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/1387789094310117537
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, I can confirm that the responses from the requests have updated the metadata. You can also confirm that it's reflected on the Dashboard: https://dashboard.stripe.com/subscriptions/sub_1RFGxrI5vSu94Gk8BArRoPn9 :
Can you confirm where you're exactly not seeing the metadata?
If you already updated the metadata on the Dashboard, hence us able to see it now... Can you try another subscription that does not have a metadata and share that request with me please?
No. I haven't updated in the dashboard.
Check this request - req_pCIOZ5aSoWsSRL - this was updated on 18th April, with patient id as patient:1713987379a0e9edf0$patient:2024-06-05T02:15:29:701 and this value was changed on 25th April to patient:1713987379a0e9edf0$patient:2025-04-25T19:39:07:913_92aa in the request id req_6Kgq1VAV94YTyU
But now the metadata is still reflecting the value submitted on 18th but the new value is not reflecting
I see what you mean, taking a further look
Is this the only instace where the metadata was not udpated?
I haven't checked other cases, we have a prod issue regarding this subscription and just figured this out
Ok, from testing this on my end I was unable to reproduce the issue.
Can you make the update request again please and see if that updates the subscription's metadata?
Update the subscription please not the subscription schedules
from dashboard?
No via the API
would need a few minutes, could you hold?
sure
Tried
Did it work?
It worked this time
Are you taking a look? I would like to try and update the schedule as well
Where in the subscription schedule are you looking on the Dashboard?
I'm not too familiar with teh Dashboard and I was under the impression the subscription schedules metadata does not surface. I could be wrong
No it does directly surface on the dashboard, if you click on the update subscription option, it would open a draw with schedule details. I prefer not updating there but just for viewing purpose
Can you also try updating the schedules via the API?
Did it work?
actually the metadata are reverted now. I see the API is successful but the metadata values are back to previous value both in the subscription and schedule
Can you share the request ids with me?
This one for subscription - req_xLDNTQiabwutLM
This one for schedule - req_a0wk0yexDf43hP
req_xLDNTQiabwutLM does show patient:1713987379a0e9edf0$patient:2025-04-25T19:39:07:913_92aa in the reponse.
What did you expect to see? Earlier, you mentioned that was the correct metadata
Hey there, just stepping in for pgskc who needs to step away.
Can you please be super crisp with a single example object and the expected vs actual metadata, and where you're seeing that?
There are multiple updates on both the schedule and subscription (which have separate metadata, to be clear).
Give me a few minutes, I am on a call
Lets consider the last 2 updates - one for subscription - req_xLDNTQiabwutLM and one for schedule - req_a0wk0yexDf43hP
In first request, I changed the value of the metadata key - patient_id from x to y and I did the same on the second request i.e., change the value from x to y for patient_id this time on the schedule
Both the API requests gave me a success response i.e., 200 ok
but now if I go to the dashboard and check it, the metadata value is x
and I am expecting to see y
Ok, you might be mixing up some concepts or overlooking something
Your requests are setting the object level metadata on the subscription and schedule, yes
But there is also metadata defined in each phase of your schedule
When you schedule phases transition, that metadata is applied to the subscription via merge
So what i think is happening is that you have stale metadata in your schedule phases which is overwriting your subscription metadata changes
when the phase changes are applied
phases.metadata
dictionary
Set of key-value pairs that you can attach to a phase. Metadata on a schedule’s phase will update the underlying subscription’s metadata when the phase is entered, adding new keys and replacing existing keys in the subscription’s metadata. Individual keys in the subscription’s metadata can be unset by posting an empty value to them in the phase’s metadata. To unset all keys in the subscription’s metadata, update the subscription directly or unset every key individually from the phase’s metadata.
ok, is it possible to update the phase metadata via API?
Or I guess, could we reverse the order of update and try
Looking at sub_1RFGxrI5vSu94Gk8BArRoPn9 in your dashboard, the metadata I see is patient:17...701 which is the latest update and happened with this request via schedule phases: https://dashboard.stripe.com/logs/req_a0wk0yexDf43hP
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Yes, you can update the phase metadata by providing new/updated phases to the schedule. Note you need to specify all required details of each phase.
https://docs.stripe.com/api/subscription_schedules/update#update_subscription_schedule-phases-metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok, let me try that