Skip to content

This repository contains code for integrating Paystack payment gateway into your application.

Notifications You must be signed in to change notification settings

kobiowuquadri/paystack_integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paystack Integration

This repository contains code for integrating Paystack payment gateway into your application.

Postman Screenshot

Getting Started

  1. Clone this repository to your local machine:

    git clone https://github.com/kobiowuquadri/paystack_integration
  2. Install dependencies:

    npm install
  3. Set up environment variables:

    Create a .env file in the root directory of the project and add the following variables:

    PORT=your_port_number
    MONGODB_URL=your_mongodburl 
    PAYSTACK_BASE_URL=<Paystack API base URL>
    PAYSTACK_SECRET_KEY=<Your Paystack Secret Key>
  4. Run the application:

    npm run dev

Usage

To initiate a payment, make a POST request to the /make-payment endpoint with the following JSON payload:

{
  "email": "customer@example.com",
  "amount": 5000,
  "fullName": "Quadri Kobiowu"
}

The server will respond with a JSON object containing the payment details, including the payment URL.

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

This repository contains code for integrating Paystack payment gateway into your application.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published