#sumanth_code

1 messages ยท Page 1 of 1 (latest)

atomic basaltBOT
#

๐Ÿ‘‹ 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.

dry swallow
#

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

finite badger
#

here is a invoice id
in_1T9JfmSH8iTj1WFwrhgz2GTU

dry swallow
#

Looking

dry swallow
finite badger
#

portalSession = await stripe().billingPortal.sessions.create({
customer: customerId,
return_url: clientUrl,
});

through billingPortal.sessions method

sending the portalSession.url to user

dry swallow
#

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

atomic basaltBOT
finite badger
#

can you tell me is there anything wron in stripe().checkout.sessions.create method

finite badger
dry swallow
thin urchin
#

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)

finite badger
#

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

thin urchin
#

just confirming some details - thanks for your patience

#

ok so there are a few things to clarify here

#

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?