Why EXPO standalone app shows url_invalid?

i am working with Expo project using stripe react native , its work fine in local, publish but not working as expected in standalone app,

here i use stripe for payment and when i enter card info its returns erorr 400

400 Error
POST /v1/payment_intents/pi_3JSeHwSJwGztdZyL1BuqSJQq/confirm
"return_url": "myappname:///--/://safepay",
url_invalid - return_url Not a valid URL

here is my code :

            <StripeProvider
            publishableKey="xyz"
            urlScheme={Linking.createURL('') + '/--/'}
            setUrlSchemeOnAndroid = {true}
            .............................../>
 const handleDeepLink = useCallback(
      async (url: string | null) => {
        if (url && url.includes('safepay')) {
          await handleURLCallback(url);
          console.log('url',url)
          navigation.navigate('Checkout', { url });
        }
      },
      [navigation, handleURLCallback]
    );




  useEffect(() => {
    const getUrlAsync = async () => {
      const initialUrl = await Linking.getInitialURL();
      handleDeepLink(initialUrl);
      console.log('initialUrl',initialUrl)
    };

    const urlCallback = (event: { url: string }) => {
      handleDeepLink(event.url);
    };

    getUrlAsync();

    Linking.addEventListener('url', urlCallback);

    return () => Linking.removeEventListener('url', urlCallback);
  }, [handleDeepLink]);

how to achive deep link and how to resole this ?

Using: Standalone app, Expo 42, stripe-react-native :0.1.4

do you have a scheme defined in app.json?

yes,

{
  "expo": {
    "scheme": "myapp"
  }
}

I’m having the same issue. Did you find a solution? Can you manually set the return_url?

I fixed this by removing the <StripeProvider> component in favour of the stripeInit function. I don’t know why this helped but it did. Just putting this here in case it can help someone else or myself in future!

useEffect(() => {
		initStripe({
			publishableKey: 'pk_test_longString',
			merchantIdentifier: 'merchant.org.identifier',
			urlScheme:
				Constants.appOwnership === 'expo'
					? Linking.createURL('/--/')
					: Linking.createURL(''),
		});
	}, []);