My tech stack includes Expo React native, supabase and stripe
I have created an edge function like so with a HTTPS redirect URL
Deno.serve(async (req) => {
// * I want to create the stripe account.
const data = await req.json();
// Initialise the stripe sdk
const stripeKey = Deno.env.get("EXPO_PUBLIC_STRIPE_SK_TEST");
const stripeClient = stripe(stripeKey);
const accountLink = await stripeClient.accountLinks.create({
account: data.body,
refresh_url: "https://bulkapp.com/reauth",
return_url: "https://bulkapp.com/return",
type: "account_onboarding",
});
return new Response(
JSON.stringify(accountLink),
{ headers: { "Content-Type": "application/json" } },
);
});
I am wondering after the user completes their session
which I call using this.
// Create the account link
const linkedStripe = await edgeFunction("stripe-link", user.id, createStripe.data.id);
if (linkedStripe.error) throw new Error(linkedStripe.error.message);
const stripeUrl = linkedStripe.data.url;
let webData = await WebBrowser.openAuthSessionAsync(stripeUrl);
I want the finished session to redirect back to the application.
After some searching on google I have a heard and a mix of the use of Deeplinks (universal links) but I have not seen proper implementation on how to include this. Has anyone done this before?