-
Notifications
You must be signed in to change notification settings - Fork 658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing IdempotencyKey, Workaround? #1025
Comments
@mrmarcsmith I removed |
Hi @mshafrir-stripe, Thanks for your prompt reply. To clarify I was never able to use "Idempotency-Key" in this framework but the documentation here says that I should be able to using the RequestOptions builder to add an idempotencyKey.
|
I believe that documentation is for stripe-java, which is for server-side Java integrations, where we use the secret key. None of the API methods that can be called from the SDK using the publishable key can actually capture payment, so you shouldn't need an idempotency key to prevent double-charging. We can implement idempotency in the SDK for double-adding a card and similar scenarios (i.e. it was never implemented in the first place). Can you give me more details about the scenarios you're encountering that result in double-added cards? |
Unfortunately I don't have a lot of information as to why the double cards are happening because its all real users who report the issue. We can't reproduce it in our dev environment but enough people have reported it that I know it's a problem with the code and not just a once-off issue. Maybe network requests are failing resulting and two tokens being created therefore 2 cards? I will keep you posted as to what we learn about this bug. |
If you have an "add card" form, is it possible that users are quickly tapping twice on the "submit" button? |
I suppose its possible but for us the "best" solution be the one that fixes both network requests or double taps. |
Summary
We are currently experiencing an issue where when a customer adds a card it sometimes adds the same card 2-4 times. I noticed that the IdempotencyKey was removed from this framework somewhere along the line. What are we supposed to use instead to block double adding of cards to customers?
Code to reproduce
Android version
All
Impacted devices
Galaxy S6
Installation method
build.gradle
SDK version
6.1.2
Other information
The text was updated successfully, but these errors were encountered: