Skip to content

PaySmart is a FastAPI-based backend payment system integrating PayPal for real-time transactions, featuring user registration, wallet funding, P2P transfers, and transaction tracking with PostgreSQL.

Notifications You must be signed in to change notification settings

abhinavdev369/Paysmart01

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PaySmart -FastAPI+PayPal Integration

PaySmart is a backend Payment Management System built using FastAPI that integrates PayPal for real-time transactions. It supports user registration, wallet funding, peer-to-peer (P2P) money transfers, and transaction history tracking, with PostgreSQL as the backend database.

🔧 Features

  • 🔐 User registration with hashed passwords
  • 💰 Wallet management (funding and balance tracking)
  • 🔁 Peer-to-peer (P2P) transactions between users
  • 💳 PayPal integration using REST API and SDK
  • 📜 Transaction logging with type and status
  • 🗄️ PostgreSQL backend using SQLAlchemy ORM
  • ✅ Data validation using Pydantic
  • 🧾 Jinja2 templates + static file support
  • 🔑 Password hashing with Passlib (bcrypt)

📡 API Endpoints

Method Endpoint Description
POST /users/register Register a new user
POST /wallets/fund Fund wallet using PayPal
POST /create-order Create PayPal order (REST API)
POST /capture-order/{order_id} Capture PayPal order
GET /payment/success Callback for successful payment
GET /payment/cancel Callback for canceled payment
POST /transactions/p2p Transfer funds to another user
POST /webhook PayPal webhook listener
GET / Basic HTML UI using Jinja2 templates

🧪 Testing

  • 🧾 Use PayPal sandbox credentials for all test transactions.
  • Ensure environment variables like PAYPAL_CLIENT_ID and PAYPAL_CLIENT_SECRET are set in your .env file.

📂 Tech Stack

  • Backend: FastAPI
  • Payment Integration: PayPal REST API & SDK
  • Database: PostgreSQL
  • ORM: SQLAlchemy
  • Authentication: Passlib (bcrypt)
  • Templating: Jinja2
  • Validation: Pydantic

IMAGES: image image image

About

PaySmart is a FastAPI-based backend payment system integrating PayPal for real-time transactions, featuring user registration, wallet funding, P2P transfers, and transaction tracking with PostgreSQL.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published