2.0 KiB
2.0 KiB
Paystack Subscriptions Sample App
This sample application shows how to integrate Paystack's Subscriptions API in your apps. For the official documentation for Paystack Subscriptions, head over to the docs
Demo
View a live demo of the app here.
Get Started
Requirements
- A Paystack account: If you don't already have one, sign up for a Paystack account. You'll need to do this to get your API keys.
- API keys: You can grab these from your Paystack dashboard
- Existing plans: You'll need to have existing (active) plan objects that you can subscribe your customers to. If you don't already have any plans, you can just create a couple from your Paystack dashboard
Running the sample locally
- Clone this repo:
git clone https://github.com/PaystackOSS/sample-subscriptions-app
- Navigate to the root directory and install dependencies
npm install
- Rename the
.env.examplefile to.envand add your Paystack secret key. You can also change the default port from 5000 to a port of your choosing:
PAYSTACK_SECRET_KEY=sk_domain_xxxxxx
- Start the application
npm start
- Visit http://localhost:5000 in your browser to interact with the app. You should be able to signup/login, subscribe to a plan, and view/manage your existing plan(s).
Contributing
If you notice any issues with this app, please open an issue. PRs are also more than welcome, so feel free to submit a PR to fix an issue, or add a new feature!
License
This repository is made available under the MIT license. Read LICENSE.md for more information.