#zzawaideh
1 messages ยท Page 1 of 1 (latest)
Hello! Do you have a question about this code?
This is allowing me to create a product for a stripe connected account
But the price creation throws and error
What's the error?
It throws this: Did you mean to pass an options object?
But when I change the object format it does not work
I am not sure if this is a format thing
Again the product uploads but it wont load the price, is there a way to do it all at once?
Can you give me the request ID showing the error? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
req_SHn8zVXVhd4TnG
Oh, okay, your syntax is a bit off. You need to do something like this instead:
stripe.products.create({
name: 'Gold Orange',
description: 'Some description',
// More properties
});
Yes I have tried this
It tells me I have a missing parameter
It says that "name" is the missing parameter
Can you paste the stripe.products.create code you're using here?
Yes!
Not a screenshot?
const product = await stripe.products.create({
name: 'Gold Orange',
price: 1000,
stripeAccount: 'acct_1LnQdRCQcM1qFgue'
});
There are a couple of issues there. For one, there is no price argument when creating a Product: https://stripe.com/docs/api/products/create
Second, the stripeAccount parameter would go in a different object. See here for more details: https://stripe.com/docs/connect/authentication
for price arguement are you referring to "default_price"?
๐ Hopping in here since Rubeus needs to head out soon
Okay, thank you
Is there a specific reason you're trying to set price on a Product? You can just remove that from your code entirely (since it' snot something we support in the API)
๐ awesome! glad to hear you got it working