#peppemu-list-prices-product
1 messages ยท Page 1 of 1 (latest)
Hey!
I 'd like to know if there is a way to retrieve all prices linked to a product by using the API.
You can use the endpoint, and pass the product parameter: https://stripe.com/docs/api/prices/list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Np!
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
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
@native blade I wrote 2 steps in my script:
- I retrieve the product
- I list the prices as suggested by ynnoj
- check if there was a price matching the new price
- if price match an old price then retrieve the payment link of the old price
step 4 is where I am stuck now
Gotcha
Let me take a look ๐
thanks hanzo
okay just so that I'm clear, you want to retrieve payment link by the price ID ?
sorry for the delay here
I'm not seeing a way you can retrieve payment links with the price ID / product ID
so the only way is to use the payment link id ?
Currently, yes.
You could use Product metadata to hold on to the Payment Link IDs
If it fits your usecase
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 ?
I mean that's just a workaround but it does allow you to link your payment link to your product and/or price