PayStack Payment
Estimated reading: 2 minutes
Welcome to PayStack! In this guide, you will learn how to sign up for a PayStack account and obtain API keys necessary for integrating PayStack into your website or application.
PayStack is a leading payment service provider that enables businesses in Africa to accept payments from anyone, anywhere in the world.
Why Choose PayStack?
Registered and Unregistered businesses can leverage Paystack's services.
Registered businesses enjoy full access to Paystack's features, while unregistered businesses, known as Starter Businesses, have limited access.
Before proceeding further please check Paypal Supported Currency
Login/Sign Up for PayStack
If you have an existing PayStack Developer Account Log in ,to the account.
Otherwise, Sign up and create a new business account.
Sign Up: Provide your business name, email address, country, and password by following this link.
Complete Setup: After signing up, provide additional information about yourself and your business to complete the setup.
Access Dashboard: Once setup is complete, you'll be redirected to your dashboard.
Testing Integration: Start testing your integration and exploring our product suite in Test Mode.
infoHowever, your account is still in Test Mode and you cannot receive real money. You will have to activate your account to take it Live and start collecting real money from your customers. Follow this link to activate your business: Activate Your Account.
Obtain API Keys
Obtain your Test API Keys
Follow these steps:
Navigate to your Dashboard → Settings.
Click on the API Keys & Webhooks tab.
Scroll to the section labeled API Configuration - Test Mode.
Here you will find your Test Secret Key and Test Public Key.
Once you've completed your testing and are satisfied with your integration, you'll need your Live API Keys to start receiving real money from your customers.
Obtain your Live API Keys
To obtain your Live API Keys, follow the same steps as above:
Navigate to your Dashboard → Settings.
Click on the API Keys & Webhooks tab.
Scroll to the section labeled API Configuration - Live Mode.
Here you will find your Live Secret Key and Live Public Key.
How to Get Your New Live API Keys
[Login] to your PayStack Developer Dashboard
Navigate To Settings
Click on API Keys & Webhooks
Underneath both your live and test secret keys, you will see the option to Generate new secret key. Click on this
infoOnce you've generated a new secret key, you will be unable to process transactions until you update your secret key on your website or server.
Add Generated Keys into config.dart
Now you've successfully generated keys please update values to "config.dart
- Navigate to lib → config.dart.
- Add values for constants shown below.
/// PAYSTACK
const String payStackCurrency = "NGN";
const paystack_secret_key = '';
const paystack_public_key = '';
Congratulations! Your PayPal configuration is done.
Test PayStack Payment
Here we have provided some of testing credentials for App -
If you want to add your new payment gateway then buy our paid support for the same.
Use Only in Test Mode
You can use these test cards to make payments in test mode only. Using these for live mode payments will throw card issuer is invalid or invalid card input error.
Test Cards Details for PayStack payment
There are several test cards you can use in test mode to make sure this integration is ready. Use them with any CVC, postal code, and future expiration date.
Description | Card Number | Expiry Date (MM/YY) | CVV | PIN | OTP | Third Validation |
---|---|---|---|---|---|---|
No validation (reusable) | 4084 0840 8408 4081 | 02/25 | 408 | 1111 | - | - |
PIN validation | 5078 5078 5078 5078 | 02/25 | 081 | 1111 | - | - |
PIN + OTP validation | 5060 6666 6666 6666 | 02/25 | 123 | 1234 | 123456 | Validation Data3 |
Quick links
Here's some additional useful information about Paystack.
Remove PayStack Payment
We are recommended you to follow only second Step if you don’t know about dependency and code
If you want to remove PayStack payment gateway option then follow below Steps:
Go to pubspec.yaml and remove the line mentioned below from the file
flutter_paystack: git: url: https://github.com/Raj-GMITS/flutter_paystack.git ref: master
Step 2 - Remove values of PayStack constants from "lib → config.dart"
Step 3 - Remove file "pay_stack_service.dart" from "lib → payment_gateways"
If you have remove dependency from pubspec.yaml then hit the pub get command. now, remove the code related to flutter_paystack.