stripe / stripe-terminal-react-native

React Native SDK for Stripe Terminal
https://stripe.com/docs/terminal/payments/setup-integration?terminal-sdk-platform=react-native
MIT License
110 stars 50 forks source link

Collect payment Failure #673

Open ManiRelavant opened 6 months ago

ManiRelavant commented 6 months ago

Describe the bug When I tried to collect the payment from the stripe terminal using the tap to pay(Simulated mode: YES) React native app, I got an error.

While we working on the stripe reader m2 with simulated mode working fine, unfortunately, tap to pay not working as with the same code

To Reproduce

  1. creating the payment intent from the server
  2. Retrieve the payment intent from the front end (React native - Mobile app) using the client secret key. which key from the server
  3. Collect the payment from the front end, got an error.

//clientSecret from the back-end this.props.retrievePaymentIntent(clientSecret).then((e) => { console.log('retrievePaymentIntent', e.paymentIntent); this. props.collectPaymentMethod({ paymentIntent: e.paymentIntent, enableCustomerCancellation: true, }).then((e) => { //Confirm Payment intend}).catch(e => { console.log('collectPaymentMethodError:', e);})})

Error From the collect payment method function {"error": {"code": "InvalidRequiredParameter", "message": "The PaymentIntent is missing sdkUuid field. This method requires you to use the PaymentIntent that was returned from either createPaymentIntent or retrievePaymentIntent."}, "paymentIntent": undefined}

Expected behavior Should work with Tap to pay

Retrieving payment intent using retrievePaymentIntent function {"amount": 1854, "charges": [], "created": "1713787394000", "currency": "usd", "id": "pi_3P8LaYFy8kPIscdv1snsj00B", "metadata": {"billing_amount_flat": "54", "billing_amount_variable": "1854"}, "offlineDetails": null, "paymentMethodId": null, "sdkUuid": "44E0E5C7-3033-4FC5-95F0-2EE49D92AA98", "status": "requires payment method"}

Stripe Terminal React Native SDK version

Smartphone (please complete the following information):

nazli-stripe commented 5 months ago

hey @ManiRelavant are you still running into this issue on the latest version?