stripe / stripe-terminal-android

Stripe Terminal Android SDK
https://stripe-terminal-android-nine.vercel.app
Other
81 stars 43 forks source link

Bug in payment process after confirm payment timeout #470

Open tom42530 opened 2 weeks ago

tom42530 commented 2 weeks ago

Summary

After collecting payment method, the firs call to stripe api to confirm payment timed out. Second call and last one have 409 http response code. After that, th result on device is a payment failure (PAYMENT_ERROR.DECLINED_BY_STRIPE_API) but on dashboard payent is sucessfull.

Android version 9

Impacted devices (Android devices or readers)

Stripe M2

SDK version

3.5.0

bric-stripe commented 2 weeks ago

@tom42530 thanks for the report. Could you provide a PaymentIntent id that you hit this with? The 409's are likely from the idempotency key being used on the SDK internal retries but the request is still in-progress. If that /confirm request then finishes and moves the PI to the succeeded or requires_capture state the retried confirm will fail due to the PI already being succeeded/requires_capture state and so can't be confirmed again. But we want to make sure that's what happened here so the PI ID will help us confirm that.

And assuming that is what happened we're discussing improvements we can make for this.

meyer59 commented 2 weeks ago

Hey We have submited a support ticket already with the logs and PI, can you check it ?
https://dashboard.stripe.com/support/sco_QJgdzfJVOwLQUR
@tom42530 and me are from the same team.