#CHIΞFMCCONNΞLL.ΞTH - connect products

1 messages · Page 1 of 1 (latest)

mint tide
#

Hello, can you tell me a bit more about your connect setup here? Are the accounts connected to your platform Standard, Express, or Custom accounts?

vital burrow
#

standard accounts

#

@finite ice

finite ice
#

Hi Popmey, thanks for the help with this!

#

So we are building a marketplace for digital files and want to use Stripe Connect

#

But we don't quite understand how to create a checkout session. Is it possible to send over the information for the checkout session when creating it or do we need to create products in stripe ahead of time?

mint tide
#

It would probably be easier to do that. If you go the path of creating the prices and products on your connected account, you would need to do it for every account you are connected to and you would need to manage updates and whatnot for each of them yourself. Here it would probably just be easier to keep all the data on your side and pass it in as product_data and price_data as appropriate

finite ice
#

I agree, we have been trying to do that but have run into problems with the calls

vital burrow
#

when I performed a product_data only call it ended up creating a product in the strip account

#

if I add the price_data call will it not create a product?

mint tide
#

I don't believe that that happens on Checkout but can double check

mint tide
finite ice
#

Ideally we wouldn't create a product, just pass the user to the checkout session

vital burrow
#

also this was on a /prices session.. and it created a product in the stripe dashbaord. when we tried what we actually need using /checkout/sessions it would not take the price_data and threw some errors, and checkout sessions is what we are really trying to use. this was just some testing in postman to strip everything away and see what was working or not

mint tide
#

The /v1/prices endpoint doesn't make a session, just a price object

#

What errors did you get on the checkout session call?

vital burrow
mint tide
#

This line indicates that we got an empty price parameter from you rather than the price_data param that we are talking about line_items: { 0: { quantity: "1", price: "" } }

#

Can you show me how you tried to send price_data?

vital burrow
#
[{"key":"0.price_data","value":"500"},{"key":"0.quantity","value":"1"}]
mint tide
vital burrow
#

we would have to add all of these params as well right?

mint tide
#

Correct

vital burrow
#

so in the code that I have above would it just be to add keypairs of price_data.currency , etc etc with values along with the original code?

#

or would it understand those as keypair values on their own in the context of price_data

so currency: usd, product: xyz.. etc

mint tide
#

I am unclear on the distinction that you are trying to make. Can you show me examples of each?

vital burrow
#

for this snip of code [{"key":"0.price_data","value":"500"},{"key":"0.quantity","value":"1"}] would I just add another object inline with the price_data object

Im guessing it would look like [{"key":"0.price_data.currency","value":"usd"},{"key":"0.price_data.product_data.name","value":"new product"}, etc etc

#

or is this not the right way to add these parameters?

mint tide
#

I am unfamiliar with that format unfortunately. Can you try each and see if either work here?

vital burrow
#

maybe something like this

[{"key":"0.price_data.currency","value":"usd"},{"key":"0.price_data.product_data.name","value":"CMS_NAME"},{"key":"0.price_data.unit_amount_decimal","value":"CMS_PRICE_DECIMAL"},{"key":"0.price_data.product_data.description","value":"CMS_DESCRIPTION"},{"key":"0.price_data.product_data.images":"value":"CMS_IMAGE_HERO"}]

vital burrow
#

brb

vital burrow
#

ok. tried with everything above and this is what we got back

subtle vector
#

👋 Hopping in since @mint tide had to head out