#stephen_price-id

1 messages ยท Page 1 of 1 (latest)

cinder sandBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1303058532828053600

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

royal cove
#

@cursive vault that's impossible, we don't let you set the id of the Price. We generate it ourselves.

#

stephen_price-id

cursive vault
#

It isn't impossible, I can do it from the dashboard

royal cove
#

yes that's a Dashboard only feature that we don't support in the API. It's likely because you use a much older version of our API called the Plans API which we replaces in 2020 with the Prices API

cursive vault
#

hm. good idea. maybe if I use an older API version I can do this?

royal cove
#

We discourage this, we don't want most users to ever do this.
So why do you absolutely need this?

cursive vault
#

i have a very inflexible reporting team that has an annoying, but critical reporting process and they parse meaning from these IDs. I have provided them the same meaning using metadata fields but they can't spare the time to use it, so they continue to extract meaning from the ID fields

royal cove
#

The only way I can think of is to use the Create Plan API https://docs.stripe.com/api/plans/create which is our older API. When you call that one you can pass the undocumented parameter id to what you want. And when you do that it will create a Price with the same exact id. So that might work for you

cursive vault
#

yep. and then maybe i can then use the price API to update it to add the new params that are unsupported in the old API. I will try it. Thank you

royal cove
#

what params are you talking about?

cursive vault
#

billing_scheme for one:
(ruby) price = Stripe::Price.update(plan.id, price_attributes, stripe_version: '2020-08-27')
eval error: (Status 400) (Request req_oVTydbrE8022dv) Received unknown parameters: billing_scheme, unit_amount

#

a few of my products have tiered billing scheme

royal cove
#

that exists on the Plan API too though

#

You can't update a Price's amount/tiers after the fact so you have to set this all up through the Plan API

cursive vault
#

Confusingly, I actually can change the price to tiered, but only via the dashboard :/

royal cove
#

yeah it's a Dashboard only feature in case someone went too fast and before the Price is updated.
I tried to block this feature since it makes developers so confused but I was overruled ๐Ÿ˜ฆ

cursive vault
#

I am considering using the dashboard as an API endpoint. It does exactly what I need, posting to https://dashboard.stripe.com/v1/prices/<price_id>

#

I'm sure this is unsupported, but I gotta get this done, and can't make any typos clicking around the dashboard

royal cove
#

This is a mistake, and we likely will detect you faking the Dashboard and ban you at some point.

cursive vault
#

Its a one-time setup that I need to do. Only maybe 50 requests

royal cove
#

up to you really

cinder sandBOT