A Next.js-based payment application that enables SMEs to process USDT payments and convert them to NGN (Nigerian Naira) using the Paycrest Sender API.
- Real-time bank account validation
- Institution/Bank search functionality
- USDT to NGN conversion
- Secure payment processing
- Transaction status tracking
- Webhook integration for payment updates
- PostgreSQL database integration
- Frontend: Next.js 15.2, React 19, TailwindCSS
- Backend: Next.js API Routes
- Database: PostgreSQL with Prisma ORM
- Type Safety: TypeScript
- API Integration: Paycrest Sender API
- Node.js (Latest LTS version recommended)
- PostgreSQL database
- Paycrest API credentials
- Yarn/NPM/PNPM/Bun package manager
Create a .env
file in the root directory with the following variables:
DATABASE_URL="postgresql://user:password@localhost:5432/your_database"
CLIENT_ID="your_paycrest_client_id"
CLIENT_SECRET="your_paycrest_client_secret"
- Clone the repository:
git clone https://github.com/yourusername/paycrest-payment-app.git
cd paycrest-payment-app
- Install dependencies:
npm install
- Run database migrations:
npm run migrate
- Start the development server:
npm run dev
├── src/
│ ├── app/ # Next.js app directory
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Shared utilities
│ └── types/ # TypeScript type definitions
├── prisma/ # Database schema and migrations
└── public/ # Static assets
POST /api/initiate-order
- Create a new payment orderPOST /api/verify-account
- Validate bank account detailsGET /api/institutions
- Fetch available banking institutionsPOST /api/webhook
- Handle payment status updatesGET /api/transactions/[id]
- Get transaction status
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Paycrest API for payment processing
- Next.js for the application framework
- Prisma for database ORM