#ilyoTheHorrid (Endstream)

1 messages ยท Page 1 of 1 (latest)

velvet sparrowBOT
steel jacinth
#

Hi ๐Ÿ‘‹ can you share the IDs of requests where you were receiving those messages?

kindred ice
#

Actually, it was solved by adding recurring and not type:

   const price = await stripe.prices.create({
      unit_amount: stripePayments.allPayments * 100,
      currency: 'usd',
      recurring: {
        interval: 'month',
        usage_type: 'licensed'
      },
      product: process.env.SCRIPE_PRODUCT
    })
#

Could this be a mistake in the docs?

steel jacinth
kindred ice
#

Because of how the error is written I assume it was the price parameter that was missing

#

type=recurring

steel jacinth
#

Can you share the ID of the request that raised that error?

kindred ice
#

Sure, req_tXm7MPwhq7aEa9

steel jacinth
#

Thank you. That request isn't trying to create a Price, which is why the error message doesn't contain advice on what parameters to provide to create a Price. Instead that function is trying to create a Subscription, but a one-time Price was provided while the function was expecting the ID of a recurring price to be provided in items[0].price.

kindred ice
#

Ah OK, thank you

steel jacinth
#

Any time!