#numericity

1 messages · Page 1 of 1 (latest)

elder fossilBOT
unborn anchor
#

Hello! Yep, what's up?

ionic field
#

Hey @unborn anchor. I'm implementing the Checkout Sessions API, and I'm passing product_data and price_data in the line_items property. This creates the price and product as expected, but the product is archived. Am I doing something wrong, or is this process correct, where the stripe account will be filled with single-use products?

#

I was expecting the API to create a product/price and for me to have to store those ID's for the next time a customer purchased that item

unborn anchor
#

That's the correct approach if you want to specify unique Product and Price data every time instead of using existing Products and Prices.

ionic field
#

Ok, so I need to create the product/price ahead of time to reuse

unborn anchor
#

If you want to reuse Products and Prices you should create those explicitly in separate API requests, then create the Checkout Session.

#

Yep!

ionic field
#

Ok, thanks for the clarification!

unborn anchor
#

Happy to help!