#usama_schedule-invoice2

1 messages ¡ Page 1 of 1 (latest)

teal forumBOT
young sparrowBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

teal forumBOT
#

👋 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/1235657146776027239

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

cinder shell
#

usama_schedule-invoice2

lost hull
#

This is the code I have written : // Create the subscription schedule with phases
const subscriptionSchedule = await stripe.subscriptionSchedules.create({
customer: customer.stripeID.toString(),
start_date: startDate,
end_behavior: "release",
phases: phases.map((phase, index) => ({
items: [
{
price: prices[index],
quantity: phase.quantity,
},
],
iterations: 1,
})),
});

// Get the customer default payment method
const paymentMethods = await stripe.customers.listPaymentMethods(customer.stripeID.toString(), { type: "card" });

// Add the payment method to the schedule
let sub = await stripe.subscriptionSchedules.update(subscriptionSchedule.id, { default_settings: { default_payment_method: paymentMethods.data[0].id } });
cinder shell
#

Okay, so where are you using the API I recommended to use? What have you tried?

#

cc @lost hull are you around? I'm sorry but we try to help in real time here

teal forumBOT