How to pass credit card info via POST

Viewed 455

My app workflow is:

  1. Get credit card from user (in React)
  2. Send credit card info to Node server (via Axios POST)
  3. Node server will process the info with the Payment library

The credit card info is not stored.

What parameters do I have to setup in the Axios request and the Node server to make secure the process?

1 Answers

This can be done in 2 ways-

  1. Encrypt the data using crypto module,by converting the body data to string and later encrypt that data and send as post data.
  2. Use JWT token, in this you can send the whole req.body as payload/object and pass the JWT token as post data. Later on backend, decode the JWT token and use your data.
Related