One time payment multi price product

42 views
Skip to first unread message

Marko Maric

unread,
Aug 8, 2022, 1:37:14 PM8/8/22
to Stripe API Discussion
Hello,

We have a product which price is dynamically created depending on various parameters (date, some other prices, etc). All these payments are one time only. 

My initial idea was to create one product and then dynamically add prices when someone wishes to purchase it and after success/failure/cancel just archive it. Is this good way to go? Or is it better to create new product+price every time and then archive that.

We would always archive it because it is not needed anymore, and it would never be reused. There is really small chance that two people get the same price, and even if that happens, we would recreate price or product (depending now on what you think that it is the best).

Thank you

Remi J.

unread,
Aug 8, 2022, 1:40:13 PM8/8/22
to api-d...@lists.stripe.com
Hello Marko,

That is definitely a good way to approach this. If it's really a one-off you can also use `price_data` in various APIs so that we create what we call an "ad-hoc Price" inline that is archived by default. For example when creating a Checkout Session you can pass `line_items[][price_data]` instead of an existing Price id.

Hope this helps!
Remi


--
To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss...@lists.stripe.com.

Marko Maric

unread,
Aug 9, 2022, 10:27:43 AM8/9/22
to Stripe API Discussion, re...@stripe.com
Thank you very much.

Cheers

Reply all
Reply to author
Forward
0 new messages