Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kiranwankhade/portone
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.
https://github.com/kiranwankhade/portone
chai jest mocha mongodb mongoose nodejs stripe supertest swagger
Last synced: 2 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/kiranwankhade/portone
- Owner: kiranwankhade
- Created: 2024-06-06T09:10:52.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-06-08T12:14:34.000Z (7 months ago)
- Last Synced: 2024-10-10T22:41:27.468Z (2 months ago)
- Topics: chai, jest, mocha, mongodb, mongoose, nodejs, stripe, supertest, swagger
- Language: JavaScript
- Homepage: https://www.postman.com/telecoms-specialist-23382147/workspace/kiran-public-workplace-postman/collection/25625653-630ba5d6-1357-4c8a-9f9c-a75e42a7ffdd?action=share&creator=25625653
- Size: 14.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Portone Assignment
## Description
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.## Installation
1. Clone the repository:```bash
git clone https://github.com/kiranwankhade/PortOne.git
cd your-repo
```2. Install dependencies:
```bash
npm install
```3. Set up Stripe Sandbox Account:
- Create an account on Stripe Dashboard.
- Obtain your Stripe Access Keys and Secret Keys.4. 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
```## Usage
1. Run the application:```bash
npm start
```2. Access the APIs:
- Create Intent: `POST /api/v1/create_intent`
- Capture Intent: `POST /api/v1/capture_intent/:id`
- Create Refund: `POST /api/v1/create_refund/:id`
- Get List of Intents: `GET /api/v1/get_intents`## Configuration
Configure Stripe keys in the `.env` file.## Testing
Run unit tests:```bash
npm test
```## Deployed Link
https://portone.onrender.com## Test the Endpoints
https://portone.onrender.com/api/v1## Swagger
https://portone.onrender.com/api-docs## Postman Link
https://www.postman.com/telecoms-specialist-23382147/workspace/kiran-public-workplace-postman/collection/25625653-630ba5d6-1357-4c8a-9f9c-a75e42a7ffdd?action=share&creator=25625653