stripe-react-native icon indicating copy to clipboard operation
stripe-react-native copied to clipboard

confirmPlatformPayPayment times out but succeeds

Open codan84 opened this issue 5 months ago • 4 comments

Describe the bug When using confirmPlatformPayPayment on iPhone it seems to take a very long time and eventually causes the payment to time-out. However, the call eventually resolves and succeeds. Thus I suspect it just takes too long and the phone itself displays 'payment not completed' message. I can see payment successful in Stripe dashboard and in the response from the confirmPlatformPayPayment call.

To Reproduce Code I am running, with some debug logs to see how long the call takes:

    console.log(`>>> ${new Date().toISOString()} >>> about to pay`)
    const { error, paymentIntent } = await confirmPlatformPayPayment(
      clientSecret,
      {
        applePay: {
          cartItems: [
            {
              label: "Goods",
              amount: order.amount, //ie '22.50'
              paymentType: PlatformPay.PaymentType.Immediate,
            }
          ],
          merchantCountryCode: "GB",
          currencyCode: "GBP",
        },
        googlePay: {
         /***/
        },
      },
    );
    console.log(`>>> ${new Date().toISOString()} >>> paid: error=${error} & status=${paymentIntent?.status}`)

Example logs from the above:

 LOG  >>> 2025-06-06T09:05:46.291Z >>> about to pay
 LOG  >>> 2025-06-06T09:06:26.139Z >>> paid: error=undefined & status=Succeeded

And another:

 LOG  >>> 2025-06-06T08:58:46.044Z >>> about to pay
 LOG  >>> 2025-06-06T08:59:22.496Z >>> paid: error=undefined & status=Succeeded

(I pressed the power button twice to confirm payment immediately in both cases, so it is not me delaying)

Expected behavior Payment processing is faster and does not time out on the phone.

Screenshots

Image

Smartphone (please complete the following information):

  • Device: iPhone 12
  • OS: iOS 18.5
  • @stripe/stripe-react-native: 0.45.0
  • expo: 53.0.0
  • react-native: 0.79.2

Additional context

This is running on test data.

codan84 avatar Jun 06 '25 09:06 codan84