skip to Main Content

In my Stripeprovider in App.js I was using the publishable test key with no issues everything was working pretty well, when I changed it to the live key stripe ( I also changed the secret on the backend) loads for split second then closes without any intent made on stripe dashboard.

<StripeProvider
  publishableKey={secret}
  ...
>
.
.
.
</StripeProvider>

2

Answers


  1. You probably need to follow these steps in order to go live if you are willing to use Google Pay:
    https://stripe.com/docs/google-pay?platform=react-native#going-live-react-native

    Login or Signup to reply.
  2. try this step

    1. Be sur the publishable key is in your front and you secret key in your back.

    2. Be sur you use the compatible key ( pk_test_XXX front & sk_test_XXX back) OR ( pk_live_XXX front & sk_live_XXX back)

    3. Be sur you return the good things from your endpoints

    In my case, what i did wrong, i returned the wrong publishableKey from the back.

    I’m using the Composant Element & the hooks

    const {initPaymentSheet, presentPaymentSheet} = useStripe();
    

    You have the documentation from stripe of what you need to return from the back here

    https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=payment-sheet

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search