Skip to content

NUCCASJNR/PaystackPyAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PaystackPyAPI

PaystackPyAPI is a Python package designed to simplify and streamline Paystack API integration, enabling secure online payment processing in your Python applications.

Installation

You can install the package using pip:

pip install paystackpyAPI

Getting Started

1. Obtain API Key:

Sign up for a Paystack account if you don't have one: Paystack Signup.

Log in to your Paystack dashboard and obtain your API key.

  1. Initialize PaystackAPI:
from paystackpyAPI.transaction import Transaction

# Replace 'your_api_key' with your actual Paystack API key
api_key = 'your_api_key'
transaction = Transaction(api_key)
  1. Initialize a Transaction
email = 'user@example.com'
amount = 100
initialize_response = transaction.initialize_transaction(email, amount)
print("Initialization Response:", initialize_response)
  1. Verify a Transaction
reference = initialize_response['data']['data']['reference']
verify_response = transaction.verify_transaction(reference)
print("Verification Response:", verify_response)
  1. Optional parameters

The initialize_transaction method supports the following optional parameters:

  1. currency

  2. reference

  3. callback_url

  4. plan

  5. invoice_limit

  6. metadata

  7. channels

  8. split_code

  9. subaccount

  10. transaction_charge

  11. bearer

Pass these parameters as keyword arguments when calling the initialize_transaction method.

  1. Examples

Check the examples directory for sample scripts demonstrating various use cases.

  1. Contributing

If you find a bug or have a feature request, please open an issue. Contributions are welcome!

1. Fork the repository
2. Create a new branch (git checkout -b feature/awesome-feature).
3. Commit your changes (git commit -am 'Add awesome feature').
4. Push to the branch (git push origin feature/awesome-feature).
5. Open a Pull Request.
  1. License

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

About

PaystackPyAPI: A Python package designed to simplify and streamline Paystack API integration, enabling secure online payment processing in your Python applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages