Overview
Paystack is a payment gateway for African businesses, supporting card payments, mobile money, and bank transfers. TelemanAI integrates with Paystack for seamless subscription payments.Prerequisites
- Paystack business account
- API keys (Public and Secret)
- Verified business in Nigeria, Ghana, or South Africa
Configuration
Environment Variables
Add these variables to your.env file:
Your Paystack public key for initializing payments
Your Paystack secret key for API authentication
API endpoint (default: https://api.paystack.co)
Your business email registered with Paystack
Currency code: NGN (Nigeria), GHS (Ghana), ZAR (South Africa)
Set to
YES to enable, NO to disableSupported Currencies
- NGN - Nigerian Naira
- GHS - Ghanaian Cedi
- ZAR - South African Rand
- USD - US Dollar (for international cards)
Setup Steps
Create Paystack Account
Register at paystack.com and complete KYC verification.
Payment Methods
Paystack supports multiple payment methods:- Card Payments - Visa, Mastercard, Verve
- Bank Transfer - Direct bank transfers
- USSD - Mobile banking codes
- QR Code - Scan to pay
- Mobile Money - MTN, Vodafone, Airtel
Testing
Test Cards
| Card Number | Type | CVV | PIN | Result |
|---|---|---|---|---|
| 4084084084084081 | Visa | 408 | 0000 | Success |
| 5060666666666666666 | Verve | 123 | 0000 | Success |
| 507850785078507812 | Verve | 884 | 0000 | Insufficient funds |
Test Mode Keys
Webhook Events
Paystack sends webhook notifications for:charge.success- Payment successfulcharge.failed- Payment failedsubscription.create- Recurring subscription createdsubscription.disable- Subscription cancelled
Troubleshooting
Payment initialization fails
Payment initialization fails
- Verify API keys are correct
- Check
PAYSTACK=YESis set - Ensure email matches Paystack account
- Clear config cache
Webhook not working
Webhook not working
- Verify webhook URL is publicly accessible
- Check webhook secret is configured
- Test webhook using Paystack dashboard
- Enable HTTPS for production
Currency not supported
Currency not supported
- Verify your Paystack account country
- NGN, GHS, ZAR only for local accounts
- USD requires international verification
Security
- Store keys securely in
.env - Use HTTPS in production
- Verify webhook signatures
- Monitor for suspicious transactions
- Implement rate limiting
Next Steps
Flutterwave
Alternative African payment gateway
Payment Overview
Compare all payment gateways
Subscription Setup
Configure pricing packages
Stripe
International payment option