#zzawaideh

1 messages ยท Page 1 of 1 (latest)

tired frostBOT
quartz ice
#

Hello! Do you have a question about this code?

runic swallow
#

This is allowing me to create a product for a stripe connected account
But the price creation throws and error

quartz ice
#

What's the error?

runic swallow
#

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?

quartz ice
runic swallow
#

req_SHn8zVXVhd4TnG

quartz ice
#

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
});
runic swallow
#

Yes I have tried this

#

It tells me I have a missing parameter

#

It says that "name" is the missing parameter

quartz ice
#

Can you paste the stripe.products.create code you're using here?

runic swallow
#

Yes!

quartz ice
#

Not a screenshot?

runic swallow
#

const product = await stripe.products.create({
name: 'Gold Orange',
price: 1000,
stripeAccount: 'acct_1LnQdRCQcM1qFgue'
});

quartz ice
runic swallow
#

for price arguement are you referring to "default_price"?

novel crescent
#

๐Ÿ‘‹ Hopping in here since Rubeus needs to head out soon

runic swallow
#

Okay, thank you

novel crescent
#

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)

runic swallow
#

I figured out the issue

#

@quartz ice Gave me the resource I needed

novel crescent
#

๐Ÿ‘ awesome! glad to hear you got it working