#DV_Void
1 messages · Page 1 of 1 (latest)
Hello
Generally to avoid duplicates you want to disable your event handler
You wouldn't use idempotency keys for this really, they are meant to be used for server-side errors where there is an ambiguous response. See: https://stripe.com/docs/error-low-level#idempotency
Thanks for your response, can you please point me to the documentation to disable event handler?
There isn't really documentation on that. You as the Android dev should know how to handle disabling something in your view
You can do some basic google searches if you need
But this isn't something specific to Stripe
are you referring to disable the button to start the payment process, if yes, then I am already doing that, however, I still see that sometimes duplicate transactions within the same second
Yes that is what I am referring to. In that case you need to debug your code as there seems to be a bug that is causing duplicate payments.
You should ensure that only one payment is being created for each session.
For instance, if the customer retries after the first attempt are you using the same PaymentIntent?
Or do you create a new one each time?
No, if there is a retry then there would be new PaymentIntent
Okay well that could help with duplicate payments.
You can re-confirm the same PaymentIntent again
I don't think the retry is the issue I am facing, as retry would not happen within the same second, it is the same payment intent processed twice
Okay well then we are back to what I said before about there being a bug in your app or server code that is duplicating a request. Overall if you are disabling your "pay" button on press until you show the result of the payment attempt (and continuing to disable if that is succcessful) then there should not be a duplicate unless there was a bug