#rohail-kamran_unexpected
1 messages ¡ Page 1 of 1 (latest)
đ 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/1409538085431283752
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Here is my code for the trial, for your reference:
freeTrialSubscription = await stripe.subscriptions.create({
customer: customerId,
items: [{ price: product.default_price }],
payment_behavior: 'default_incomplete',
payment_settings: { save_default_payment_method: 'on_subscription' },
expand: ['pending_setup_intent'],
// trial_end: Math.floor(Date.now() / 1000) + (60 * 60 * 24 * 7), // 7 days trial
// trial_period_days: 30, // 1 days trial
trial_end: Math.floor(Date.now() / 1000) + (60 * 10), //10 minutes
// trial_end: Math.floor(Date.now() / 1000) + (60 * 60 * 24 * 30), //30 days
trial_settings: {
end_behavior: {
missing_payment_method: "cancel"
}
}
});
Hi, can you share the request id where this happened? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request