#edward_api
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/1245664028588511242
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
๐ happy to help
we really don't recommend using setup intents
with subscriptions
instead you can follow this guide https://docs.stripe.com/billing/subscriptions/build-subscriptions
We have a 7 day free trail and I want to confirm card details before giving free trail
In this flow no payment is required from the user since first invoice is of zero
We implement this flow and try
Thanks
let me know if you need any more help
Hi Thanks
This flow works great.
What is recommended way to handle payment failure for future invoices
like if payment fails for later months
also is there any flow for canceling subscription?
Can we collect card details for free trail also is there any flow for that?
got it had missed subscription_data.trial_period_days
oh now I see what you mean, like how to create the subscription with trial days rather than how to collect the details
are you using Checkout Sessions?
I have a subscription with free trail created with stripe.checkout.sessions.create
there is no default payment here. Will this cause any issue?
is the value of default_payment_method set on the Subscription object?
AFAIR that is what Checkout does(instead of seting the default on the customer level).
stripe.checkout.sessions.create({
customer: customerId,
mode: 'subscription',
line_items: [
{
price: process.env.STRIPE_SUBSCRIPTION_ID,
quantity: 1
}
],
subscription_data: {
trial_period_days: process.env.TRIAL_DAYS
},
ui_mode: 'embedded',
return_url: 'http://localhost:3000/checkout/return?session_id={CHECKOUT_SESSION_ID}'
})
these are things set
should I add anything extra?