#JohnTheFrog

1 messages · Page 1 of 1 (latest)

fathom falconBOT
long thicket
#

you can view the price in Dashboard and see what request created it

wintry fern
#

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

long thicket
#

This price seems archived

wintry fern
#

DIdn't see that notice before O.o

long thicket
#

Um yeah it was automatically created via the /v1/subscription API

#

And you did edit metadata from here?

wintry fern
#

Lazy question, why this price got archived?

#

It still tends to allow me to edit it

long thicket
#

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

wintry fern
#

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
#

tks

#

Probably a weird state when advance the clock too fast

wintry fern
#

@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

radiant wagon
#

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

wintry fern
#

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 🙂

radiant wagon
#

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