#kelvin_docs
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/1376772344525226037
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- kelvin_error, 3 days ago, 32 messages
- kelvin_error, 4 days ago, 28 messages
- kelvin_docs, 6 days ago, 11 messages
Hi! Can I check if you implemented deep linking: https://docs.stripe.com/payments/mobile/accept-payment?platform=react-native&type=payment#set-up-return-url ?
yes already did
but it just show the viewview in app, and call the redirect url doesn't close the webview
sure
this is my init payment sheet setup:
await initPaymentSheet({
merchantDisplayName: 'Pelago',
appearance: customAppearance,
customerId,
primaryButtonLabel: payLabel,
allowsDelayedPaymentMethods: true,
returnURL,
defaultBillingDetails: {
address: {
country: getCountry() ?? 'SG',
},
},
intentConfiguration: {
mode: {
amount: price * 100,
currencyCode: currentCurrencyId ?? FALLBACK_CURRENCY,
},
confirmHandler: confirmHandler,
},
})
this is handle url:
const handleDeepLink = useCallback(
async (url: string | null) => {
if (url) {
const stripeHandled = await handleURLCallback(url)
if (stripeHandled) {
console.log('stripe handle')
// This was a Stripe URL - you can return or add extra handling here as you see fit
} else {
const isKFLoginCallback = url.includes('app/KF/callback')
const isKFRedeemCallback = url.includes('app/KF/redeem')
if (isKFLoginCallback) {
kfSignIn(url)
}
if (isKFRedeemCallback) {
const [_, searchQuery] = url.split('?')
const queryParams = qs.parse(searchQuery, {decode: false})
pubSub.publish('kfLoginForRedeemComplete', queryParams)
}
}
}
},
[handleURLCallback, kfSignIn],
)
Thanks!
Hi there, I’m jack and I’m also an engineer from stripe
even i don't set the returnURL, it always redirect to my website everytimes 3ds finish, it's something like : 'pelago.com/en-SG/?peyment_intent=pi_xxxxxx'
hi Jack
Is the handleDeeplink function used in your useEffect hook?
yes
useEffect(() => {
const getUrlAsync = async () => {
const initialUrl = await Linking.getInitialURL()
handleDeepLink(initialUrl)
}
getUrlAsync()
const deepLinkListener = Linking.addEventListener(
'url',
(event: {url: string}) => {
handleDeepLink(event.url)
},
)
return () => deepLinkListener.remove()
}, [handleDeepLink])
Ok. So you set pelago.com as your returnURL, and your customer will be redirect to pelago.com instead returning to your app?
Have you set up universal link for your returnURL?
i try to set return url : "pelago://pelago.com/en-SG/checkout/bookingId
but it always go to: "https://pelago.com/en-SG/?payment_intent=xxxxx"
event i try to completely remove returnURL from setup , it also point to "https://pelago.com/en-SG/?payment_intent=xxxxx"
universal link is already setup and work well with google ads, search result, ads link. etc...
Ok. Can you share with an example payment intent ID so that I can check the logs?
i try to use pelago:// scheme instead of http scheme because Stripe docs says universal ink aren't support
yes: piTransactionId": "pi_3RTF7xEOhqD74pZ21inZgi8Z_secret_3IWAbaaHVJTVlkgUEOHubPhcC
https://dashboard.stripe.com/test/logs/req_rxSVTga7YfsZv1 based on the log, your server set the return_url to https://traveller.dev.pelago.com
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
it's set as urlScheme for StripeProvider
can i assume that i need to set urlScheme and returnURL exact the same?
No, actually urlScheme is optional.
Your customer is redirected to "https://pelago.com" because your server set the return_url to https://traveller.dev.pelago.com
Can you remove the return_url from your server side confirmation call, and try again?
cool, let me talk to backend team, might i ask what is the expected behaviour when i remove return_url from sever side?
one sec, let me test it out
Once your customer completes the 3DS auth, they'll be redirected to the returnURL, i.e., pelago://pelago.com
cool, thank Jack, testing
hi Jack, BE team is working, meanwhile might i ask is there any way to force ios open Web App (chrome, safari, etc..) rather than in app WebView for 3ds ?
Why do you want to navigate your customer to external web browser to for 3DS authentication?