Getting 500 error when trying to sending POST request to Order controller, but only in production

So I have an ecommerce website that I created using Strapi, React.js, node.js, and using Stripe for the payments. The backend is deployed on Heroku using a PostgreSQL database, and the frontend is deployed on Netlify. Everything on the website works up until the point where I click continue and pay, when this button is clicked, a POST request is made to the Order controller (data structure created by me). In the controller a stripe session is created, and all of the information needed is sent to Stripe, and an Order is also created in the Strapi dashboard. When testing in a local environment, all of this works great, however when using the live site, I get a 500 Internal server error.

I have searched online for days for a solution, but have yet to find something that fixes it in production. I cant seem to think of a way to troubleshoot this since I cant replicate it in my local environment. Any ideas? I can provide code if needed as well, but I’m hoping someone has had a similar issue before.

This topic has been created from a Discord post (1273818773249589360) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord