#Vinny GG
1 messages · Page 1 of 1 (latest)
Where are you looking? What API are you using?
Ok, and what are you expecting to see?
Starting at $0.50 /month
I'm getting the price from an old stripe account and moving it to a new account, I would like to know how I can pass it on when the product has this price
Can you share a price_xxx ID?
price_1LuQelG5ciCKjMS7JjEGeFvE
Is this the new object or the old one you're migrating?
old
You're using the wrong field. You need to look at the tiers array, not unit_amount. Your Price is tiered billing scheme.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Ok, but I can't consult the array of the tier in this endpoint price, right?
I'm not sure what you mean by 'consult'?
You're trying to migrate a Price object from one account to another right?
Then you need to pass the parameters as they are on the old Price when creating the new Price
You're not right now, as tiers is missing. That field is not returned automatically from the API, you need to expand it:
prices->all(['expand' => ['tiers']])
So pass that when querying Prices from the old account, and you'll see the actual unit amount data you need
Thank you very much, this is what I was looking for
np!
Would you help me
I couldn't send the null value, what value could I put?
Don't let me not put the uo_to index either
you can set up_to to the special value "inf" for that tier https://stripe.com/docs/products-prices/pricing-models#tiered-pricing
hmmm
Thank you very much
Prices with type=one_time are not supported with tiered billing
correct, tiered pricing is for our subscriptions product only
that looks like a recurring Price (so not type=one-time) so it wouldn't give you the error you quoted(?)
I'm trying to create new price on a new stripe account with old account data
ok. Not sure I follow really, it's impossible for the other account to have a one_time Price with tiers (since that's impossible), so there must be an issue in your logic for copying
Could you give me an example of price creation with tiers
yep, there are some in that doc linked above.
This here is my data I'm sending, what's wrong?
you're not passing an explicit type
so it defaults to one_time
and then one_time Prices can't have Tiers; hence the error
yeah there's no type on Price
if it's recurring, then you do that by passing recurring with a hash containing the details. Check the docs
sorry for the confusion I added, there is not a type as a parameter, I was wrong, but the idea is if you don't pass recurring => [...] it's one_time and if you do, it's recurring.