I CAN'T SEND POST REQUEST FROM CLIENT SIDE !
I need to send HTTP Post request in Node js Rest API to the payment gateway. Post request needs to have headers and body payload. I have frontend and backend separated, I'm using Rest API with express.js and payment gateway needs server to server communication so I can't to do that from client side. Basically when user clicks on payment I need to send call to my backend server then my backend server needs to send request to the payment gateway.
Payment gateway has documentation with only MVC ( Model View Controller ) and they really can't help.
So logic inside controller should be something like this
exports.payment = (req, res, next) => {
   const { amount, id, currency } = req.body;
   //add headers
   //create body paloyad
   //send request to https://payment....com/api-key/transaction
   //receive response
   res.status(200).json({ status: 'success' });
}


