#poacher2k-price-update
1 messages ยท Page 1 of 1 (latest)
Can you share the ID (req_xxx) of the failing API request? 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.
sure! req_UlRuFqAtqRCVzU
You need to pass a boolean: https://stripe.com/docs/api/prices/update#update_price-transfer_lookup_key
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Not the old price_xxx
ohhhhhhhh ๐คฆโโ๏ธ
how does it know which price to transfer it to?
do I do this with the new price id?
It's transferring it to the Price object you're updating. So in the request you've shared, price_1JkpglFXX7EwAD2MMSoMkXFg
So you actually need to update price_1LScreFXX7EwAD2M1vOM7ImQ
and pass transfer_lookup_key=true
okay! I erroneously thought each price had a lookup id, but this belongs to the product then I reckon!
thanks a bunch! ๐
There's no lookup_key on the Product object. I'm confused
I am too ๐คฃ well, how does it know what price to transfer the lookup_key from/to?
the docs say:
If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.
it doesn't say what "the existing price" means
Well, lookup_key is unique so we just know which Price object to transfer it from
right, so that means the lookup key needs to be provided as well in the request?
Yes
gotcha. that was incredibly unclear by only looking at the documentation
thank you for clearing things up! the correct command is then:
stripe prices update price_1LScreFXX7EwAD2M1vOM7ImQ \
-d "lookup_key"=my_lookup_key \
-d "transfer_lookup_key"=true
Perfect!