I'm using Razorpay's Payment API to get details of a payment:
const paymentData = await axios.get(
`https://api.razorpay.com/v1/payments/${paymentId}`
);
console.log("paymentData", paymentData);
After this is run, I get this error in the console:
Access to XMLHttpRequest at 'https://api.razorpay.com/v1/payments/{my-payment-id}' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
How do I overcome this?
Thanks in advance.