CORS Policy issue on create order API

Dear Seniors

We have created our custom page for checkout, we call cart API to fetch cart data, and then we try to hit create order API, but unfortunately, a CORS policy error occurs, We have already tried to add a header, but nothing works.

But there is a very strange thing if we hit the same create order API from the local host, it works fine, and the order is placed successfully.

A custom page for checkout? That could be against TOS so make sure you’re not setting yourself up for an awkward convo later.

How are you making a call to the Orders API in a secure way if you’re getting hit with a CORS error? Are you making the call directly in the browser?