presentPaymentSheet not working with live publishable key
See original GitHub issueI am using this library in one of my react native app for iOS to receive payments using credit cards only.
The library work fine for test keys but as soon as I start using publishable live key, It starts giving me error:
Error code: Failed No valid API key provided. Set STPAPIClient.shared().publishableKey to your publishable key,
I double checked the publishable key from my stripe account and it is the correct live key.
Here is the code
<StripeProvider
publishableKey={
'pk_live_XXXXXXXXXX'
}>
<App />
</StripeProvider>
Because in the above code as soon as I change the publishable key from live key to test key, everything starts working as expected. Is there any setting that I am missing in case of Live in iOS apps?
Please help
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
Stripe not working with live publishableKey React Native
In my Stripeprovider in App.js I was using the publishable test key with no issues everything was working pretty well ...
Read more >API keys | Stripe Documentation
Live mode publishable key: Use this key, when you're ready to launch your app, ... The key stops working after the expiration date...
Read more >Mastering Stripe PaymentSheet in React Native with Expo
We don't need the publishable key for now, but we will use it later in our React Native app. Copy the secret key...
Read more >Payment Sheet - Flutter Stripe - docs.page
Securely accept payments online. Integrate Stripe's prebuilt payment UI into the checkout of your app with the PaymentSheet class.
Read more >flutter_stripe | Flutter Package - Pub.dev
All you need to do is add your stripe publishable key to the payment profile. ... This plugin requires several changes to be...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
merchantIdentifier
is only necessary for Apple pay. If everything works correctly, and the only thing you change is the actual text values of the publishable keys, then I would double-check that key if I were you. You may also want to confirm that the value you’re getting from your server is the value you’re expecting it to beIt is resolved, yes @charliecruzan-stripe you are absolutely correct, due to copy paste one of the character was coming in different format somehow, due to which it was failing, it was looking correct but was getting read incorrectly. Now its working fine. Apologies for wasting everyone’s time. Thanks again.