#Amazing Parent from Brown Sea
1 messages ยท Page 1 of 1 (latest)
Hi tarzan, what do you mean?
If u mean the redirect from my website to your website checkout, yes, i'm using Checkout
in that case, if your prices are ever-changing, you can disregard creating prices first, and use price_data instead which has this flexibility
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
What's the flow? Because this is what i need:
- Import my catalog on Stripe for the first time, creating first the product and then create the relative price
Then i need just to update the price of my catalog products nothing else
The products have all a static price
you don't need to import your price catalog if it's changing
So i just import my products without the price?
if the products are the same and then the prices change over the time, then yes you can do that
otherwise you can also use https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data-product_data for the products
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
this way you don't have to maintain your catalog both on your side and in Stripe
Ok so the flow it will be something like this:
- import the catalog without any prices
- from the frontend when i call the stripe checkout i'll pass to the endpoint the line_items param with products that the user is trying to buy?
- import the catalog without any prices
you don't even need to import the catalog
Oh wow, i'll try asap thanks for now, tarzan!
I was trying the checkout session, but it asks me anyway the price id of each items, but i can't if i don't have the product imported on stripe. If i create a product on stripe with title, description, image and the price, he give me the price id and if i pass the price id to the line_items[0][price] it works successfully but as u said i don't need to import anything, the final question is: if i don't need to import nothing, how i can pass the price and all the relative params to "generate" the products in real time for the stripe checkout?