#gabrielctavares
1 messages · Page 1 of 1 (latest)
Sure, which code are you using to redirect to the Checkout page?
var service = new SessionService();
Session session = service.Create(options);
Response.Headers.Add("Location", session.Url);
return new StatusCodeResult(303);```
Thank you, looking in to what may cause that error
Are you able to do other 303 redirects from your server like this?
The solutions that I am seeing here mostly involve including that header or using a CORS proxy https://stackoverflow.com/questions/43871637/no-access-control-allow-origin-header-is-present-on-the-requested-resource-whe
I followed this documentation exactly, and it doesn't work due to a problem with CORS, my backend and frontend won't be on the same domain, how does it work in this case?
https://stripe.com/docs/billing/quickstart#redirect
StackOverflow couldn't help me, as far as I found, the Stripe api does not accept "Access-Control-Allow-Origin"
ChatGpt response: In your case, it seems that you're making a request from 'http://localhost:8100' to 'https://checkout.stripe.com', but the server at Stripe is not returning the 'Access-Control-Allow-Origin' header in its response. This header is required to explicitly allow requests from specific domains.
I don't think the issue is with the Stripe API per se, it is the response from your server that is triggering the error. The call to the Stripe API isn't necessarily affecting this.
I will see if any of my colleagues have a stronger idea of how to fix this CORS error
ok, my api is running on localhost:44336 and the app is localhost:8100, the api code is the same as the documentation example and the app is running on ionic/angular
Hello 👋
Taking a look here