stripe / stripe-react-native

React Native library for Stripe.
https://stripe.dev/stripe-react-native
MIT License
1.29k stars 263 forks source link

MobilePay is not supported, while specified otherwise in the docs #1786

Open romantseg opened 1 day ago

romantseg commented 1 day ago

Describe the bug In Stripe Documentation for MobilePay, it is clearly specified how to accept a payment. However, this doesn't seem to be possible:

  1. In ConfirmParams there is no mention of MobilePay.
  2. When trying to confirm the payment (ignoring typescript errors) with
            void confirmPayment(stripePaymentIntentClientSecret, {
              paymentMethodType: "MobilePay",
            })

    consistently get `"This payment type is not supported yet". At the same time, payment appears in Stripe Dashboard in incomplete status, and expires after some time.

To Reproduce Steps to reproduce the behavior:

  1. Integrate MobilePay according to the docs
  2. Attempt to pay
  3. Payment appears in Stripe Dashboard
  4. Attempt to confirm payment on mobile

Expected behavior Confirmation flow for MobilePay gets started

Smartphone (please complete the following information):

romantseg commented 1 day ago

Update a bit later. I made this work in "undocumented" way, by first attempting to confirm the payment in the API, which in turn produces redirectUrl and somehow after that, it is possible to confirm on mobile.

The idea for this case from Direct API flow on web, where first confirm happens on the API.

so it seems that at the very least documentation is missing a crucial step and TypeScript error remains