#sylom
1 messages ยท Page 1 of 1 (latest)
I don't have access to the dashboard for this project, so it's gonna be hard.
You might also be able to get the request ID when you make the API request
https://stripe.com/docs/api/request_ids
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
req_G9gjyAwMMXvZE8
That's just a GET request to retrieve a price
price_1NknhpAEtzv5ktGK2edMcVAu
Seems like it succeeded too
Yeah, the price was retrieved, but updating the price won't work.
Oh, hold up a minute.
Gotcha. Yeah you can't update the interval of the price
https://stripe.com/docs/api/prices/update
That's not something the API supports today. I believe with dashboard, you can only only change a price if it hasn't been used in a subscription or an invoice.
The ideal way would be to create a new price, update the sub to use the new price and archive the old price
That's a GET request too similar to the one before๐
Bummer.
So basically, it never sends anything.
I tried just to update the amount, but even that results in an error.
'unit_amount'=>$amount*100,
]]);````
Yeah, like I mentioned not a lot about prices can be updated, checkout the API ref here
https://stripe.com/docs/api/prices/update
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I read that. It says that with currency_options.<currency>.unit_amount, you can technically update the amount charged.
That's what I wrote, I believe. Or maybe I missed something?
I managed to update the subscription name by fiddling with its product, so that's a start.
That's if you have multi-currency prices
Just tried and yup. It's now asking me to update the top-level parms instead.
Getting closer to actually update the fudging price.
Can't get it to work. I'll put that aside until I find a way.
Thank you for the help.
I already mentioned this earlier that you can't update the interval/unit amount of an existing price via the API ๐
You can create a new price and archive the older one
Oh sorry. I thought you only talked about the interval.
Hence why I tried to push for the amount.
My bad.
No worries. I should've been more clear ๐
One last question to make sure I understood correctly.
Sure
Let's suppose I have a few people subscribed to a certain Price.
Or Subscriptions using said Price, if you prefer.
If I want to change the interval and/or amount of said Price, I basically have to create a new one, archive the old one then update the Subscriptions to use the new Price?
Correct
1/ Create new price
2/ Update all the subscription individually (subscriptions can't be updated in bulk)
https://stripe.com/docs/billing/subscriptions/upgrade-downgrade
3/ Archive the old price
I see. That answers what I wanted to do. Thank you very much.