This project demonstrates the integration of Razorpay API with a React frontend and an Express backend. Razorpay is a payment gateway solution that allows businesses to accept online payments.
- Integration of Razorpay API for payment processing.
- React frontend for user interface.
- Express backend for handling API requests and communicating with the Razorpay API.
- Utilization of Postman for testing API endpoints.
-
Clone the repository:
git clone https://github.com/praball/RazorpayAPI-React
-
Install dependencies for both client and server:
cd RazorpayAPI-React/client npm install cd ../server npm install
- Start the Express Server:
cd RazorpayAPI-React/server npm start
- Start your React Frontend:
cd RazorpayAPI-React/client npm start
- Access the application in your browser at http://localhost:3000.
- Use Postman to test the API endpoints located at http://localhost:YOUR_PORT/api.
-
Obtain API keys from Razorpay by signing up on their website. (You may have to provide your PAN number as well, KYC not required for testing mode)
-
Configure your Razorpay API keys in the Express backend for making requests, thereby set up the .env file.
-
Make sure to configure CORS settings if needed to allow requests from the React frontend.
Contributions are welcome! Please feel free to submit pull requests or open issues for any features, bugs, or suggestions.
This project is licensed under the MIT License - see the LICENSE file for details.