#jacques_code

1 messages · Page 1 of 1 (latest)

little thunderBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1315621644034899988

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

glass halo
#

hi! you can't. you'd create a Price first with stripe.prices.create(), and pass the ID of the returned object to phase.items.[i].price

ashen hinge
#

yes I try with this code (screen 1) but a have this error in typescript

No overload corresponds to this call.
  The 2 of 2 overload, ‘(options?: RequestOptions | undefined): Promise<Response<SubscriptionSchedule>>', generated the following error.
    An object literal can only specify known properties, and ‘customer’ does not exist in the ‘RequestOptions’ type.ts(2769)
glass halo
#

what version of stripe-node is your project using?

ashen hinge
glass halo
#

I don't immediately think that code would give that error, because RequestOptions is the second parameter(if you call stripe.subscriptionSchedules.create({...}, {...}) , the second option is RequestOptions and takes things like a per-request API key; the first argument is the object with all the actual parameters like customer/phases etc)

#

we'd need to see a more complete reproduction if you're having an issue and are using the official types from the SDK

little thunderBOT
ashen hinge
#

for example if I add price_data , I get an error directly for the create sub schedule (screen 1)
But if a comment this code (screen 2) it work

#

I think I'll go through your first proposal and create first by price.creates and then I'll pass it on to my subscription schedule.