This project implements backend APIs for Stripe Payment Gateway integration. It provides functionality to create payment intents, capture intents, create refunds, and get a list of all intents using the Stripe API.
This project implements backend APIs for Stripe Payment Gateway integration. It provides functionality to create payment intents, capture intents, create refunds, and get a list of all intents using the Stripe API.
Clone the repository:
git clone https://github.com/kiranwankhade/PortOne.git
cd your-repo
Install dependencies:
npm install
Set up Stripe Sandbox Account:
Create a .env
file in the root directory:
STRIPE_PUBLIC_KEY=your-stripe-public-key
STRIPE_SECRET_KEY=your-stripe-secret-key
PORT=8000 # Set your desired port
Run the application:
npm start
Access the APIs:
POST /api/v1/create_intent
POST /api/v1/capture_intent/:id
POST /api/v1/create_refund/:id
GET /api/v1/get_intents
Configure Stripe keys in the .env
file.
Run unit tests:
npm test
https://portone.onrender.com/api/v1
https://portone.onrender.com/api-docs