#kun_api

1 messages ¡ Page 1 of 1 (latest)

little smeltBOT
#

👋 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/1272945869746077809

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

minor pecanBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

random verge
#

Hello! The client secret from the Payment Intent associated with a Subscription's Invoice should only be used when you're collecting payment. If you want to have a free trial, you need to create the Subscription with a trial period, then use the client secret from the pending_setup_intent on the Subscription to save the Customer's Payment Method for future use instead of using a Payment Intent.

velvet swallow
#

My point is
I can create subscription with trail_period key

but form the frontend I want to do the confirmCardPayment verfication at the time when I am creating the subsription
so that after 7 days subscription automatically charge the customer without asking 3ds or SCA adain

#

so I explain it further more with steps?

#

??

random verge
#

If you have a trial period you wouldn't use confirmCardPayment because there is no payment at that time. You should be using confirmCardSetup instead.

#

And you should be using the client secret from the pending_setup_intent on the Susbcription when you call that.

velvet swallow
#

instead of latest_invoice?

random verge
#

Correct, because the Invoice should be $0 and have no Payment Intent and, thus, no client secret, right?

#

If the Invoice is not zero there's some amount to charge now and you should use the client secret from the Invoice's Payment Intent.

velvet swallow
#

ok on frontend which method I should use and on backen end I just add a key "trail_end" and thats it?

random verge
#

On your backend you create a Subscription with a trial (which you can use trial_end for). The Subscription should have a pending_setup_intent which has a client secret. Pass that to your frontend and call confirmCardSetup to save payment info for later use without charging anything now: https://docs.stripe.com/js/setup_intents/confirm_card_setup

velvet swallow
#

got it
A quick question?
confirmCardSetup will this method ask user consent of 3SA and SCA?

and what will happens lets say after 7 days trail do subscription needs another approval from frontend or itcharge automatoically

#

??

random verge
#

Yes, it will prompt for 3DS/SCA if needed. If another approval is needed when the later charge happens the payment will fail. Depending on how you have things set up, the Customer may get an email from us to retry. Let me find you the guide for this...