#dilkw-3ds
1 messages · Page 1 of 1 (latest)
yes, or listen to the event created on your webhook endpoint
@mental bear I don't really understand what you're asking and what your code relates to? What's blocking you? which doc are you following?
Therefore, I should judge whether I need to proceed to the next step according to what conditions, that is, capture.
LastPaymentError? or StripeIntent.Status?
Because in the onSuccess callback method, there may be a verification failure. If the verification fails, the back-end capture does not need to be notified, and if the verification succeeds, the back-end capture needs to be notified. Which condition should I use to determine whether I need to notify the backend to execute the capture? Or, no matter what, as long as the onSuccess method is called back, the backend should be notified to execute the capture?
I'm sorry I don't follow you
Can you please share a bit more context than just the screenshot of code? What doc are you following? Which platform, which product, etc.
What I am doing now is Android integration stripe. At present, our process is that the backend creates paymentIntent, app gets client_secret, app goes to confrimPaymentIntent through client_secret, and then executes 3ds. When 3ds is completed, it calls the onPaymentResult method, which is determined by the callback of onPaymentResult. Do you need to notify the backend to capture. This is our process, can you understand?
Gotcha. So no you don't need to tell anything to your backend
by default we automatically capture the funds if the payment succeeds!
you can test this easily with our test cards like https://stripe.com/docs/testing#regulatory-cards to simulate success/failures
Automatic capture? Is it possible to add any parameters when creating paymentIntent?
I'm not sure what you're asking
what does "add any parameters" mean? https://stripe.com/docs/api/payment_intents/create covers all our parameters
If we have some orders that need to be reviewed, is it okay to follow the process you said?
yes, or you can switch to capture_method: 'manual' and manually capture when ready
I have to run but @odd schooner on my team can help further if you need!
👋
👋
You can look at my chat history to see if there is a problem with the process I said?
Feel free to follow up and I would be happy to help
If I need to notify the backend to capture, is it possible to do so?
Or is there no need to notify the backend to capture at all?
You already decided to follow this process, correct?
our current process is to create paymentIntent on the backend, app confrim, and then capture on the backend
Is there such a process now, or do you have better suggestions?
It's totally fine as a process, and depends on the needs from your business. I just want to confirm you want to go down that specific usecase
Okay, I want to continue using this process
Okie, that you would want to have some way for your backend to be notified to Capture, that's correct
I currently notify the backend through the request interface
There are 2 ways (1) Rely on webhook at the backend solely, and (2) Inside your onSucceed judge the result and send a request to your backend to Capture
Yes so you are using (2). Both ways should work, I believe
I'm in the onSuccess method, but I don't know which condition should be used to determine whether notification is required in the end, because I tested it and it will execute the onSuccess method when the 3ds verification code is incorrectly filled in.
I believe you would need to check the lastError to see the result. Let me find the code
But, actually let's use the easier way around (1) listen to payment_intent.amount_capturable_updated event
For an example in ruby: https://github.com/stripe-samples/placing-a-hold/blob/master/using-webhooks/server/ruby/server.rb#L78-L83
We have other language example as well: https://github.com/stripe-samples/placing-a-hold/tree/master/using-webhooks/server
Moreover, this situation occurred online. The card issuing bank does not support 3ds, but the payment can still be continued, but the order needs to be reviewed, but when we manually captured it in the stripe background, the final order status was inconsistent.
The reason we now guess is that the background capture is not notified.
If you set up an automatic capture, how will we get the payment result?
I believe if 3D Secure failed due to a processing error, you shouldn't receive the payment_intent.amount_capturable_updated, so isn't it expected?
Because this is an online problem, there is currently no way to troubleshoot it.
Please keep in touch, I will sort out the whole process and send it to you
StripeIntent.Status status = paymentIntentResult.getIntent().getStatus();
if (status == StripeIntent.Status.Succeeded) {
//Notify the backend capture
}
Is it appropriate to execute in the onSuccess method?
Like above statement, yes you could do that, but we commend to not doing it, instead listen on webhook on Backend
Is there the following situation: When LastPaymentError is not empty, but the status of paymentIntent is requires_capture?
Hmm I don't think so
But what I encountered is this
Cau you paste in the Payment Id?
or Request Id
Did you receive payment_intent.amount_capturable_updated on that case?
I think you should received it
paymentMethod id or paymentIntent id ?
PaymentIntent Id
pi_3JqBeKERyqAJHa2o0ei70bz1
Could you please help me look at the specific reason. When the review is completed and manually click on capture, the order status is not synchronized to our backend, but the stripe console has been updated.
@mental bear i'm stepping in for orakaro, looking at that particular PaymentIntent, it's showing that the person who did the review cancelled the payment - https://dashboard.stripe.com/payments/pi_3JqBeKERyqAJHa2o0ei70bz1
are you sure that you've shared the correct PaymentIntent that shows the review being approved?
Wait a moment, I will confirm the order
Let me add the back-end process. When the back-end is notified by the app to go to cpature, the back-end first checks whether it needs a review. If it is needed, it will not capture, and it will capture if it is not needed. Instead, wait until the review is completed, manually click on capture, and then pass The webhook is used to update the order status of our database, but I found that the order status of our database is different from that seen by stripe DashBoard.
okay, can you share a PaymentIntent id as an example, and what specifically is different? What is the status in your DB and what is the status being shown in the Dashboard?
We reject this order. The status seen on stripe Dashboard is cancerd, but our database is not updated. Normally, it will reject
pi_3Jr7HFERyqAJHa2o1gqn26Ie
@mental bear are you listening to and actioning upon payment_intent.canceled event?
when you cancel it via the review, a payment_intent.canceled will be generated
You mean to listening to payment_intent.canceled event through webhook?
yes
Now it’s not just that the status of the order that is rejected is not synchronized correctly, and the status of the approved order will also be incorrectly synchronized.
We looked at the overall data and found that this is the case if the issuing bank does not support it.
That’s why it will only appear in this case
to fulfil an order, wouldn't you only need to know if the final status of the PaymentIntent is successful?
yes
the only status that would matter is whether the PaymentIntent is successful right? In both of the example PaymentIntent that you provided, neither of the PaymentIntents were successful.
Earlier you mentioned that the status of the order is not synchronized correctly - what do you expect the status of the order in your database to be?
If the status of stripe dashbrao is canceled, the status of our database should be rejected
alright, is your server listening to this event payment_intent.canceled?
I have confirmed with the back-end staff that I did this step
Now it’s not just that the synchronization rejected by the review is incorrect, but the review passed is incorrect.
If the status of stripe dashbrao is successful, the status of our database should be confirmed
But the state synchronization of this pen is correct pi_3Jqu9QERyqAJHa2o05N6BUJ6 , I hope you can help find out the reason.
@mental bear i just looked at your account setup, your webhook is not listening for the payment_intent.canceled event
these are the events which your webhook is listening for
Why can this order be synchronized? pi_3Jqu9QERyqAJHa2o05N6BUJ6😇
unfortunately, i have no idea, you're going to have to trace through your code to see what events you're listening to such that the statuses of some orders are correct but some are not
This is my online code:
PaymentIntent.Error error = paymentIntentResult.getIntent().getLastPaymentError();
if (error != null) {
//Notify the backend capture
}
There will be onSuccess callback, but the error is not empty?
sorry i don't understand what you mean - are you querying the PaymentIntent in your frontend after the user successfully confirms the PaymentIntent in the browser?
@mental bear what is the error?
LastPaymentError for paymentIntent
yep, but what is the error message?
I mean to judge whether the backend needs to be notified to capture according to LastPaymentError, I don’t care about the message
Do you think this is okay?
i guess my question would then be when exactly are you evaluating this section of code? Is it when you attempt to capture payment?