#Aby
1 messages · Page 1 of 1 (latest)
No. The way those two interact with each other is such that each Product has only one Price, and vice-versa.
Oh, I see. It's the case then we can create the same product with different prices or it's not recommended either?
Apologies, I think I misunderstood. It looks like Products can have multiple Prices, but the API only allows you to pass one default Price at a time. Is it possible that price_data on the Product object is what you're looking for? That lets you dynamically create Prices:
https://stripe.com/docs/api/products/create#create_product-default_price_data
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Also, are you using Stripe Checkout? Or a custom payment form?
Thank you for your response. In principle, we are using Stripe Checkout
Ah! Okay, you may want to look at dynamically creating new Prices on Checkout then: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data
Not sure if that helps at all, but I'm happy to provide clarity if you have follow up questions
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
That's great, I will take a look into it, and if there's something that I need clarification on it, I will let you know. Thank you, your help is much appreciated!