Skip to content

SabbirMMS/Personal-Payment-Verification-System

Repository files navigation

Personal Payment Verification System

Base URL: https://ppvs-mmsstudio.vercel.app/api


Project Overview

The Personal Payment Verification System is a backend-only project designed to manage and verify payment records in a secure manner. This project is intentionally developed without a frontend or homepage, as its primary purpose is to provide reliable and structured API endpoints for payment verification and management.

The system leverages Firebase Firestore as the database and the Firebase client SDK for accessing data securely. All operations are safeguarded using API key validation, ensuring that only authorized requests can fetch or update payment records.


Features

  • Fetch All Payments (Filtered by Redemption Status)
    Endpoint returns all payment records where is_redeemed is false.
    Example:

GET /payments?apiKey=123456

  • Fetch Single Payment by Document ID or Transaction ID
    Flexible endpoints to retrieve payment details by Firestore document ID or txn_id. API key can be optional based on configuration.
    Example:

GET /payment/\:id?apiKey=123456
GET /payment/\:txnId?apiKey=123456

  • Redeem a Payment
    Updates the is_redeemed status to true for a specific payment record using either document ID or transaction ID. API key is required for security.
    Example:

PUT /payment/redeem/\:docId?apiKey=123456

  • Secure API Access
    Every sensitive endpoint validates requests using a hardcoded API key (replaceable with environment variables in production), ensuring the system remains protected from unauthorized access.

Technical Details

  • Backend Framework: Next.js (App Router)
  • Database: Firebase Firestore
  • SDK Used: Firebase client SDK (no admin SDK)
  • Data Security: All environment variables and API keys are protected
  • API Key: Hardcoded in the project for demonstration (123456) but can be replaced with an environment variable in production.

Why This Project Exists

This project is specifically built for backend API purposes to manage personal payment records efficiently. It is not intended to be a full application with a user interface.

The focus is on providing secure, easy-to-use API endpoints for:

  1. Verifying whether a payment has been redeemed.
  2. Fetching payment details.
  3. Updating payment status.

It allows developers or systems to integrate payment verification into other applications or workflows without exposing sensitive backend credentials.


Notes

  • There is no home page or frontend UI; all interactions are API-based.
  • All sensitive data and API keys are protected.
  • Public repository is intended only for documentation and demonstration purposes.

About

Backend API for verifying and managing personal payment SMS, with secure API key validation and Firestore integration.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published