#delgesu1745

1 messages · Page 1 of 1 (latest)

lavish mesaBOT
mortal fog
#

Also, how exactly do you use a lookup id to get a price object?

trail musk
#

Hello! I don't believe we support custom IDs on price anymore. Generally, I think lookup keys would have a similar benefit to custom prices (where you could set your own unique ID) but lookup keys will be more useful if you need to migrate/change the price because we allow you to transfer the lookup key from one price to another

mortal fog
#

I see. I

#

I'm on a really old version of the api I think lol

#

Ok, so tell me more about migrating or changing price, becasue it looks to me like if we increase our pricing on a product we have to archive the old one to create a new one if we're using a unqiue id.

#

Is it not possible just to actually change the price dollar amount on a price if we increase rates, but everything else is staying the same?

trail musk
#

Correct - once you've created a price it's not possible to update the amount associated to it.

#

So yes, you'd either need to archive the old one to create a new one using the same unique ID

#

or you'd need to switch over to using lookup keys (where your backend is looking up the specific lookup key to know which price to use)

mortal fog
#

Ok so tell me more about transferring the lookup key.

#

How does that work. Because I think I have lookups set on the prices I need to archive and create newly for increaseing rates.

trail musk
mortal fog
#

OK great. And does that automatically archive the old price then or do I still need to do that?

#

And can the transfer just be done from the dashboard or do you have to use the API?

trail musk
#

I don't think transferring the lookup key can be done through the dashboard

#

And you'd still have to archive the price separately

mortal fog
#

Hey so what would you recommend in terms of if we have a bunch of different price points that are liked discounted prices compared to the standard price, is it better to use coupons to reduce the price or just create a bunch of different prices on the same product for the discounted amount?

trail musk
#

Most of the time I'd recommend using coupons for that

mortal fog
#

And the best (only?) way to get a price using a lookup ID is to use the List all prices function?

trail musk
#

yup

mortal fog
#

Hey for the lookup_keys param, what's the type it should be? It doesn't specify in the API. I assume an array of strings, since it looks like it can be multiple, but I'm not getting any prices back when I do that.

#

Oh wait, hahaha. I was updating the lookup keys on the live side but running on the test side. Sorry!

trail musk
mortal fog
#

Right that's on the create side. But on the list side, when you specify which lookup keys to use, what should it be there?

trail musk
#

Oh wow didn't realize our list API doesn't document that very well - looking internally it seems to accept an array of up to 10 strings

mortal fog
#

Yeah, that's what I figured.

#

Alright, thanks so much for your help. Got that all fixed up and working now.

trail musk
#

👍 glad I could help!