This project is a NestJS application that utilizes the Stripe Node library to provide a subscription service through a RESTful API.
-
Clone the repository:
git clone https://github.com/devgrunge/billing-service.git
-
Navigate to the project directory:
cd billing-service -
Install the dependencies:
npm install
Create a .env file in the root of the project and add your Stripe credentials:
STRIPE_SECRET_KEY=your_stripe_secret_keyTo start the application in development mode:
npm run start:devThe application will be available at http://localhost:3000.
To run the tests:
npm run test- Create and manage customers in Stripe
- Create and manage subscription plans
- Subscribe customers to plans
- Cancel subscriptions
- Webhook for Stripe events
billing-service/
├── src/
│ ├── modules/
│ │ ├── customers/
│ │ ├── subscriptions/
│ │ └── plans/
│ ├── common/
│ └── main.ts
├── test/
├── .env
├── package.json
└── tsconfig.json
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License.