#limit_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/1367876841943334933
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
Yeah that sounds contradicting.. I'm actually not 100% sure about the current state. I believe we do support Universal Links.. Have you already tried it and are seeing errors?
yeah i have set the success and cancel urls with my app uri, but im getting a 500 error
That doesn't seem like a Universal link though? That is just your custom URL scheme?
We support Custom URL Scheme for Payment flows. We recommend using Universal links for Onboarding
Sorry, im terribly new to app development. I am also referring to this documentation
The doc you're looking at is a complete doc that covers onboarding + payment flows
which it mentions that universal links arent supported
i was following this section
which i presume to put the deep link instead
Ah that's a totally different doc than you originally shared ๐
yes im referring to both at once, sorry about that
All good. So like I said above, we do support universal link for account onboarding.. Are you using Stripe Connect? (As in are you building a platform?)
IF not, we can focus on just the payment flows and debug the issue
for context, im trying to get checkouts enabled in my ios app.
i have a backend that syncs to a webapp that generates the checkout session and redirects the user to the checkout url. im using the same api for my app
this is the snippet of the backend
// Handler for POST /subscription/checkout
const createCheckoutHandler: express.RequestHandler = async (req, res) => {
try {
const { userId } = getAuth(req)
if (!userId) {
res.status(401).json({ error: "Unauthorized" })
return
}
const { tier, successUrl, cancelUrl } = req.body
if (!tier || !successUrl || !cancelUrl) {
res.status(400).json({ error: "Missing required fields: tier, successUrl, cancelUrl" })
return
}
const user = await prisma.user.findUnique({ where: { id: userId } })
if (!user) {
res.status(404).json({ error: "User not found" })
return
}
const session = await createCheckoutSession({ user, tier, successUrl, cancelUrl })
res.json({ url: session.url })
} catch (error) {
console.error("Database error fetching user or creating session:", error)
res.status(500).json({ error: "Failed to process checkout request" })
return
}
}```
yes, i dont plan to integrate my own checkout ui in the app
Got it. Checkout Sessions API does not support custom URL scheme. You'd need to provide a Universal Link there instead.
If you were to integrate Mobile Payment Element and build your own UI then you could use custom URL scheme but with Checkout + WebView; you need to use Universal Link
ahh gotcha. so i can still use my backend api, but pass a universal link to generate the session. is that the correct intepretation?
Correct
okay perfect. let me try that real quick