#spharian_return-url-reactnative
1 messages Ā· Page 1 of 1 (latest)
š Welcome to your new thread!
ā²ļø We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
ā±ļø We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
š This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1319422726565400679
š Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello! You need to provide a return_url as mentioned in the error message.
Specifically, you need to provide it when you confirm, in the confirmation request.
I did on the server side. Where else should I do it?
const { error, setupIntent } = await confirmSetupIntent(clientSecret,
{
returnURL: 'shinylive://stripe-redirect',
paymentMethodType: 'PayPal',
paymentMethodData: {
billingDetails: {
name: ${currentUser.firstname} ${currentUser.lastname},
phone: currentUser.phone,
email: currentUser.email,
address,
},
},
},
{
setupFutureUsage: 'OffSession',
}
)
tried with returnUrl and returnURL
It should be returnURL. What happened when you tried that?
same error (error ID on Stripe : req_lJaGPdJHWLT0r0)
You must provide a return_url when confirming a SetupIntent with the payment method type paypal.
There's no return URL in that request. Are you sure that was made with the updated code?
No, I mean, are you sure the code change you made is actually the code that's running?
Oh, you're using React Native, hang on...
Hm, there doesn't seem to be a way to specify the return URL in React Native. There's an issue for it here with others encountering the same problem: https://github.com/stripe/stripe-react-native/issues/1562
People talk here https://github.com/stripe/stripe-react-native/issues/1562 about activating Recurring payments, but as you see on screenshot, i am on test mode
One of those people fixed it by making sure recurring payments was enabled for PayPal in their Dashboard. Can you confirm that?
Haha we are on the same page
heh
How can I pass the approval on test mode?
Ah, so if you require approval there that might be the issue.
I think there's an option to request approval in the ā¢ā¢ā¢ button?
On the right, next to Active
Ah, hang on...
if you need, my account ID is acct_16CvvlKZwi6wapvm (+ test Mode)
Hm, I'm not sure, actually. I think you'll need to contact Stripe support to request approval: https://support.stripe.com/contact
I was asking about this internally and someone pointed out that setting the urlScheme on StripeProvider might be a path forward: https://docs.stripe.com/payments/save-and-reuse?platform=react-native&mobile-ui=payment-element#stripe-initialization
Oh will try
Let me know if that makes any difference or not. If so I'll add a comment to that GitHub issue.
Awesome!
I'll flag that internally and have someone comment on that GitHub issue.
Well not sure what should I do after this haha buuuut one step forward
Have a look here since you're running this on iOS: https://docs.stripe.com/payments/save-and-reuse?platform=react-native&mobile-ui=payment-element#set-up-return-url
Ok thanks seems to help, will continue tomorrow, it's late here š Can I leave this discord open with you or it's better to close?
We close idle threads after a bit, but you can always use the buttons in #help to get more help if you have other questions!
Ok, thanks a lot for your help!
Happy to help!