#peppemu-list-prices-product

1 messages ยท Page 1 of 1 (latest)

hardy locust
#

Hey!

#

I 'd like to know if there is a way to retrieve all prices linked to a product by using the API.

solar hedge
#

TOP

#

thanks ynnoj ๐Ÿ’ฏ ๐Ÿ™Œ๐Ÿฝ

hardy locust
#

Np!

halcyon currentBOT
#

This thread has been archived. If you need help with anything else please ask in #dev-help or contact Stripe Support: https://support.stripe.com/contact

solar hedge
#

@native blade I wrote 2 steps in my script:

  1. I retrieve the product
  2. I list the prices as suggested by ynnoj
#
  1. check if there was a price matching the new price
#
  1. if price match an old price then retrieve the payment link of the old price
#

step 4 is where I am stuck now

native blade
#

Gotcha
Let me take a look ๐Ÿ™‚

solar hedge
#

thanks hanzo

native blade
#

okay just so that I'm clear, you want to retrieve payment link by the price ID ?

solar hedge
#

at this point yes

#

unless I can do that with product id

native blade
#

sorry for the delay here
I'm not seeing a way you can retrieve payment links with the price ID / product ID

solar hedge
#

so the only way is to use the payment link id ?

native blade
#

Currently, yes.
You could use Product metadata to hold on to the Payment Link IDs

#

If it fits your usecase

solar hedge
#

so u mean adding a list of payment link ids into the product metadata ?

#

or better product id into payment link metadata?

#

then I can retrieve the payment links the way I want it ?

native blade
#

I mean that's just a workaround but it does allow you to link your payment link to your product and/or price

solar hedge
#

I like workarounds

#

๐Ÿ˜‚