#SJ057
1 messages · Page 1 of 1 (latest)
Hi there, can you share with me the relevant code?
I am trying to call api on my local machine.
const aiurl = ${EnviormentApiUrl(userContext.environmentMode)}/url;
const fetchres = await fetch(aiurl, {
method: "post",
headers: {
"Content-Type": "application/json",
//"stripe-signature": await fetchStripeSignature(payload),
},
body: JSON.stringify({
user_id: userContext?.id,
account_id: userContext?.account.id,
}),
});
const data = fetchres;
setredirectURL(await data.text());
}
And what does the ${EnviormentApiUrl(userContext.environmentMode)}/url; resolve to?
with respect to stripe app
I'm asking what's the runtime value of ${EnviormentApiUrl(userContext.environmentMode)}/url ?
https://stripe.com/docs/stripe-apps/reference/app-manifest#csprequest you should add the URL to the connect-src of the Stripe app's manifest.