In my react-native app, I’m using stripe integration, and when I try to add a card to my UI the action sheet pops up and allows users to enter their card details all of a sudden I’m getting an error from POST https://api.hcaptcha.com/authenticate 401 (Unauthorized)
.
response {"pass":false,"error-codes":["pat-missing-auth"]}
then looked through the SO and found a similar issue. but none of the solutions worked. this integration worked well previously but I have upgraded my SDK after that I’m getting this issue. I also upgraded the all lib related stripes as well but in both version, this error exists
"@stripe/react-stripe-js": "^1.10.0" --> "@stripe/react-stripe-js": "^2.7.0",
"@stripe/stripe-js": "^1.35.0", ---> "@stripe/stripe-js": "^3.3.0",
"@stripe/stripe-react-native": "~0.15.0", ---> "@stripe/stripe-react-native": "~0.35.1",
here is how I’m getting my stripe loaded
import { loadStripe as loadStripeJs } from '@stripe/stripe-js/pure';
export const loadStripe = async (hotel: Hotel) => {
const publicKey = __stripe_test_pk__;
const stripeAccount = org.stripe?.accountId
return loadStripeJs(publicKey, { stripeAccount });
};