This is a sample application implementing a Stripe payment module with React and NestJs.
- Frontend Deployment: https://react-nestjs-stripe.vercel.app
- Backend Deployment: https://nestjs-stripe.onrender.com
Before you begin, ensure you have met the following requirements:
- Node.js and npm installed
- Stripe account and API keys (Test mode for development)
- Git installed
-
Clone the repository:
git clone https://github.com/shaikahmadnawaz/react-nestjs-stripe.git
-
Navigate to the project directory:
cd client -
Install dependencies:
# Install server dependencies cd server npm install # Install client dependencies cd ../client npm install
-
Configure environment variables:
Create a
.envfile in theserverdirectory with the following content:STRIPE_SECRET_KEY=your_stripe_secret_key
Replace
your_stripe_secret_keywith your actual Stripe secret key.Create a
.envfile in theclientdirectory with the following content:VITE_STRIPE_PUBLISHABLE_KEY=your_stripe_public_key
-
Start the server:
cd ../server npm startThe server will run on
http://localhost:3000. -
Start the client:
Open a new terminal window:
cd ../client npm run devThe React app will run on
http://localhost:5173.
Visit http://localhost:5173 in your browser to access the Stripe payment page.
To view event logs, navigate to http://localhost:5173/event-logs.
I encountered a specific error related to international payments, in line with Indian regulations. The error states that only registered Indian businesses can accept international payments. I have reviewed my Stripe account settings and ensured compliance with the regulations, but the issue persists.
- Make sure to use test API keys during development.
- Feel free to customize the application based on your requirements.

