#kynanb_code
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1250981835895341138
đ Have more to share? Add details, code, screenshots, videos, etc. below.
The trial can be set under subscription_data.trial_period_days field in Checkout Session: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-subscription_data-trial_period_days
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I used the trial _period_days in my session but i receive the error: " Error: Received unknown parameter: trial_period_days"
const session = await stripe.checkout.sessions.create({
success_url: "http://localhost:3000.com/success",
line_items: [
{
price: "price_1PAs94HGb1oNrQcjEUrkFtVR",
quantity: 1,
},
],
trial_period_days: 30,
mode: "payment",
});
return subscription;
}
Did you check the doc I sent earlier?
trial_period_days should be set under subscription_data
oh my apologies, i was misplacing the location of that field. Thank you so much. Have a good evening