#JohnTheFrog
1 messages · Page 1 of 1 (latest)
you can view the price in Dashboard and see what request created it
price_1McABBGoLmBCnzj7UTSr1z5U
I can see that price and the UI allows me to edit the metadata. The server returns 400 http error tho
This is rather a bug
And this price wasn't created automatically but from PHP sdk
req_jS6BPBjBRLopIy
This price seems archived
DIdn't see that notice before O.o
Um yeah it was automatically created via the /v1/subscription API
https://dashboard.stripe.com/test/prices/price_1McABBGoLmBCnzj7UTSr1z5U can you see it here?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
And you did edit metadata from here?
Yeah it is so weird. Thanks for reporting. I will file a bug report
If you prefer to have a logged transaction, feel free to write in Support and mention this Discord thread
Just for a context - I created that price with a test-clocked customer subscription, then I updated the test clock few times and now I can't edit it.
My script for using test clock is a loop that waits 10 second if stripe response with an error like "cannot advance the clock since simulation is in progress" (don't remember the exact error but its specific to test clocks) and then reattempts the advance procedure
@long thicket I noticed that when I created a price using price endpoint and passing price id to subscription items it works. It does not work if I used subscription item'sprice_data during creation for some reason.
Yup, I can reproduce it like that. Creating price separately without using price_data solves the problem
Can you share a price_xxx ID? I know we mark inline prices (via price_data) as inactive upon their creation which may be a factor
price_1McPkFGoLmBCnzj7IeKVKJsg
price_1McABBGoLmBCnzj7UTSr1z5U
I believe that if you create a subscription with test clock, the test clocks locks at speciifc second, but subscription and the price itself gets created few seconds later.
This would automatically archive the price since the price got created in the past (test clock timestamp is few seconds behind now)
This or other way it should be a race condition of few seconds 🤔
@radiant wagon here you go 🙂
Which object is an example of what?
Ok, this seems expected to me. If I use price_data with a Checkout Session, for example, the Price object is immutable too:
{
"error": {
"message": "The price was created by Stripe automatically and cannot be updated.",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_fnS1S4vqeAwH9L?t=1676628171",
"type": "invalid_request_error"
}
}
You just can't update inline prices unfortunately
This is explicitly called out in the docs:
You can’t update or reuse inline prices after you create them.
https://stripe.com/docs/products-prices/pricing-models#:~:text=You can’t update or reuse inline prices after you create them. You can also use price_data with these APIs%3A