#sumanth_code
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/1481239051854938194
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Can you share the ID of the invoice that is unpaid (in_xxx)?
This is likely because of how you're collecting card information from the customers. Can you share details on that as it won't be done on Checkout
here is a invoice id
in_1T9JfmSH8iTj1WFwrhgz2GTU
Looking
Can you provide some details on this part?
portalSession = await stripe().billingPortal.sessions.create({
customer: customerId,
return_url: clientUrl,
});
through billingPortal.sessions method
sending the portalSession.url to user
OK, I can see that a Payment Method is created and attached to the customer (cus_U2Jc54jokwsQTv). However because this is the initial invoice on the subscription, we won't automatically retry payment on it with the newly collected payment method
You'll need to manually trigger a payment attempt, either be redirecting the user back to the invoice page, or by manually confirming the associated payment in your integration
can you tell me is there anything wron in stripe().checkout.sessions.create method
on what condition i need redirect the user back to the invoice page
Not necessarily, no. It starts a trial subscription without collecting payment details. Optionally you could collect the payment info upfront. If you don't, then the onus is on you to collect payment info prior to an invoice payment
hey there ๐ jumping in as my colleague needs to step away
on what condition i need redirect the user back to the invoice page
you'd want to do this when 3DS authentication is needed to complete the payment (i.e. the invoice.payment_action_required event)
like user will add the card in stripe().billingPortal.sessions.create this method and user can successfully add the card data after that is i need to call this invoice.payment_action_required this event ??
im tottaly confused
request_three_d_secure: "automatic" is i defined in the checkout event is it realli required in free trail without collecting card data flow
just confirming some details - thanks for your patience
ok so there are a few things to clarify here
firstly, and most importantly, since this is an India-based subscription in INR, different rules apply around RBI mandates - you can read more here: https://docs.stripe.com/india-recurring-payments
only certain integration shapes support generating RBI mandates, and currently, the way you're collecting the card (via the Billing Portal) does not support these mandates
this means that every recurring subscription payment will fail, and you'll see the 'invoice.payment_action_required' event
so the solution is typically to use the standard subscription flow (i.e. collect the payment method up front, when starting the trial)
if you collect the payment method up front in the Checkout Session, then that does support generating RBI mandates
does collecting the payment method up front seem like a viable solution for your use case?