This project demonstrates how to integrate the Paystack payment gateway into a backend application built with Express.js and MongoDB.
This project provides a simple example of integrating the Paystack API for processing payments within a Node.js and Express.js environment. It showcases basic functionalities such as creating transactions, verifying payments, and handling callbacks from Paystack.
-
Create Transactions: Allows users to initiate transactions through Paystack.
-
Verify Payments: Verifies payment status and details using Paystack API.
- Node.js: JavaScript runtime environment
- Express.js: Web application framework for Node.js
- MongoDB: NoSQL database for storing transaction data
- Paystack API: Payment gateway for processing online payments
- Clone the repository:
git clone https://github.com/dhelafrank/Paystack-API-Integration.git
- Install Dependencies
cd Paystack-API-Integration
npm install
-
Set up enviromental variables by using the sample from
.env.sample
make sure to replace the placeholder with your actual data -
Start the server
npm start
- Access your application from the port logged on the console
- Use the provided endpoints to interract with the Paystack API
- Refer to the API documentation for detailed instructions
- POST /api/v1/initialize: Initiate a new transaction
- GET /api/v1/verifyPayment: Verify a transaction
- POST /api/v1/getPayment: Get a transaction reciept
This project is licensed under the MIT License