#fabricio1970mata
1 messages · Page 1 of 1 (latest)
Hello
Can you provide the request ID (https://support.stripe.com/questions/finding-the-id-for-an-api-request) instead of a picture of the error you are seeing ?
Can you provide the actual ID (req_xxxxx) instead of the screenshot as well @finite shadow
You can find that in the request-id response header
I registered a product via API and want to change the price but I can't? Would you have any example of how to pass the parameter via postman?
What are you trying to do with this price?
The error suggests you're passing currency options for the top level price, which isn't supported
to alter
Change the amount on an existing price?
If so, that is not supported. You need to create a new price.
So far I understand but I don't know how to proceed because I created a single price when registering the product via API, now I want to change the price via API, would you be able to help me on how to proceed?
If you create a new price, does it overwrite the old one?
I managed to create it but now it has 2 prices, I just want it to be 1, how can I do it via api?
not inactive
Yes that's expected
You can update the old price to set active=false and "archive" it
https://stripe.com/docs/api/prices/update#update_price-active
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
What are you trying to do that is not working?
Please share specific request IDs so I can see what you're trying to do
eg req_123
You may need to first update the product to switch to the new price as default: https://stripe.com/docs/api/products/update#update_product-default_price
then archive the old price
Here's the thing, I'm new, I don't know how to use the Stripe API, so I'm having difficulty, so I created a product via the API using a default price.
Ok, that created a price automatically under the hood
But you should be able to update it
It sounds like you might prefer to use the dashboard for managing this if you're not comfortable with the API
You can manage products and prices in the Dashboard here: https://dashboard.stripe.com/test/products
The product was created with an ok price but this default price that was created in the product cannot be changed via the API?
You should be able to updat ethe product and set the new price as the default_price
That's what I don't want because there will be more than 10000 products I need to change via api
Sure, then use the API to update this
I'm not able to do this via API, would you have an example with Postman?
I'm not sure what you mean. Postman is making API requests.
curl --request POST \
--url https://api.stripe.com/v1/products/prod_123 \
-u sk_test_123: \
--data default_price=price_456
this default price is changed in product or prices
on the product
You seem to be retrying with various parameter guesses, but you can refer to the docs
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
You need only default_price -- remove the second parameter
See my snippet above, it has only one parameter, default_price
yes I did this in postman but it doesn't work look at the image above
Would you have an example using postman?
What do you mean? You did not try this, you sent additional parameters
See this in your dashboard
There, this succeeded: https://dashboard.stripe.com/test/logs/req_RXwLkktqCaXpPs
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
usando assim não dá erro mas não conssigo alterar o preco
Using it like this doesn't give an error but I can't change the price
Correct, you cannot change the amount on an existing Price
I said this earlier
You create a new price with the new amount, then set that new price as the product default price
which parameter do I use to define that this new price is the default, if it is active, it does not work for prices created together with the product.
👋 In order to set a new default price, you'd call Update Product API endpoint with default_price parameter with the new Price ID
https://stripe.com/docs/api/products/update#update_product-default_price
beauty worked, that's right, thank you.