CORS issue with Stripe #3031
Replies: 4 comments 5 replies
-
This isn't a SvelteKit issue per-se, it's a cross-origin issue. There's plenty on stack overflow about it, and you can read more here https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS |
Beta Was this translation helpful? Give feedback.
-
Have you seen this repo: https://github.com/srmullen/sveltekit-stripe? I tried it out myself and it worked pretty well |
Beta Was this translation helpful? Give feedback.
-
Normally you just include a normal script tag in the HTML page, e.g. If you are trying to load it via fetch or import it from your own script, that isn't going to work. They do also provide a separate module if you want to incorporate it into your own app script instead of loading it separately. |
Beta Was this translation helpful? Give feedback.
-
I will look at that project when I get a minute and see if I get the issue.
I load stripe in this way for Beyonk and it works without issue.
|
Beta Was this translation helpful? Give feedback.
-
Does anyone have advice on how to best integrate Stripe with SvelteKit? I'm getting CORS issues.
(Also get this message with
https://m.stripe.network
)Beta Was this translation helpful? Give feedback.
All reactions