Skip to content

Repository files navigation

Subscription Billing Backend - Laravel API

This backend project is a Subscription Billing System built using Laravel. It handles user subscriptions, payment plans, and transaction management. The core features include:

  • User Plan Subscriptions
  • Payment Method Handling
  • Transaction History Recording
  • Automatic Payment Processing (with Cronjob)
  • API Endpoints ready for frontend integration

This system is designed for SaaS platforms needing flexible subscription management and invoicing.

Features

  • Subscription CRUD (Create, View, Cancel)
  • Transaction recording (success, pending, failed)
  • Transaction history API
  • Unit tested with PHPUnit
  • Cronjob for auto-processing pending payments

Technologies

  • PHP 8.x
  • Laravel 10.x
  • MySQL
  • Sanctum (Authentication)
  • PHPUnit (Unit Testing)

Installation

  • git clone
  • Once the project is created, navigate to its directory using the cd command:
git clone https://github.com/btechspects/subscription-backend.git
cd subscription-backend
  • Install dependencies
composer install
  • Copy .env and configure your database
cp .env.example .env
php artisan key:generate
  • Update database credentials in .env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=my_database
DB_USERNAME=my_username
DB_PASSWORD=my_password
  • Run migrations
php artisan migrate
  • Run seeders
php artisan db:seed
  • Serve the application
php artisan serve
  • Running Cron Job
php artisan schedule:work
  • Run all unit tests
php artisan test

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages