#salim-bt_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/1382001131755933827
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- salim-bt_api, 17 hours ago, 20 messages
- salim-bt_api, 18 hours ago, 32 messages
- salim-bt_finalize-on-server, 21 hours ago, 11 messages
- salim-bt_ece-errors, 22 hours ago, 67 messages
- salim-bt_api, 4 days ago, 12 messages
- salim-bt_api, 4 days ago, 13 messages
and 3 more
I can't interrupt the purchase process. I need to create a subscription with trial status. At the moment, there are only 2 options. Either the payment is paid or not.
If 3d confirmation is required, I can't return client secret in some cases
Hello, can you tell me more about why you can't return the client secret?
How it is intended to work is that your client reaches out to your server and if 3DS is required that is indicated by the server's response
So it shouldn't be interrupting the process, it should be adding a new branch to what the client does based on how the server responds
If I answered the frontend, the process is over no?
the payment should be made in one request.
No, there are payment methods like cards that sometimes require an extra step and therefore more calls
If the server responds to something there, the frontend will not be able to return to this event again.
Right, but this can be a part of the initial response
When you initiate the payment server side, you can get one of three types of responses: a success, a decline, and that further action is needed
So just like you tell your client whether the payment succeeded or failed, you can tell the client that further action is needed so that it can call handleNextAction on the intent's secret
I can make a payment using the payment method or using the c_token. but there must be one request. the requirement to pass 3D secure does not give a successful payment status. This means that a number of actions will not be performed, the old subscription will not be canceled, and a new subscription will not be created.
I am sorry but I'm not clear on what you are saying here. As noted, it is fully possible to do this flow with only one call to your server. If you can't trigger any additional actions based on what the server says, then you can't use a confirmation token flow and should move to using another one
ok Question, please bear with me
Okay, let's say I returned the client secret. What will happen next?
the payment process will be completed on the frontend.
What should the backend do about it?
stripe.handleNextAction
What is the exact result of this?
When you make that call, the 3DS modal shows, after the user completes it the charge will either succeed or get a decline
Your server can listen to payment_intent.succeeded and payment_intent.payment_failed events to get the result of that. Your client can also try to tell the server whether the payment succeeded, but it is possible for your customer's connection to last just long enough to complete 3DS and then fail to tell your server about it, so listening to webhooks is the best way to guaruntee that you hear about the payment succeeding.