#kun_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/1333349135742533683
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there, alternatively you can consider collecting the card details first (i.e., use setupitnent and payment element). Once the setupIntent was confirmed successfully, use the collected payment method to create a subscription.
I am thinking of another soultion
once the card declined
I should delete the subscription using api?
You can do that, but it isn't something I'd recommend.
Yes
so once I have the subsctription is setup on stripe I will have subscription id
if my card declined ill take this id and remove the subscription else keep going with the normal flow
I can only cancel subscription right?
and can i have the official api for deleting or canel the subscritpion
Yes you are right. Again I won't recommend this path.
what are the bugs I can face inthis flow?
furthermore
how can I confirm card without client secret?
No you can't
This is the main issue
that is why I need to create Stripe Setup intent
and create customer and subscription
to get client secret
hence I get this client secret then I can confrim the card details
No, you don't need to create subscription to get a client secret.
You can just create a setupIntent and use its client secret.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Thank for your help really appricaite
One quick question
you have mentioned
Yes you are right. Again I won't recommend this path.
can you mention me some of important flaws or outcomes I can face with this flow
Instead of cancelling a subscription right away, you should ask the customer to use another payment method to try again. Payment failures are common and you should handle it properly in your integration.
Got it
https://docs.stripe.com/billing/subscriptions/cancel you can also read this page to learn more about subscription cancellation