Paystack test mode is activated by using your test API keys (sk_test_... and pk_test_...) instead of live keys. In test mode: no real money moves, test cards are accepted, webhooks still fire to your registered URL, and all API endpoints work the same as live. To switch environments, swap the API key in your backend — no other code change needed.
| Feature | Test Mode | Live Mode |
|---|---|---|
| API key prefix | sk_test_ / pk_test_ | sk_live_ / pk_live_ |
| Real money | No | Yes |
| Test cards accepted | Yes | No |
| Real cards accepted | No | Yes |
| Webhooks fire | Yes (to registered URL) | Yes |
| Transaction data | Isolated from live | Isolated from test |
| Subaccounts / plans | Test-only, won't carry to live | Live-only |
| Settlements | No real settlement | Settles to your bank |
Paystack webhooks fire to your registered URL — even in test mode. To receive them during local development, expose your local server with a tunneling tool:
# Using ngrok
ngrok http 3000
# Copy the HTTPS URL: https://abc123.ngrok.io
# Register it in Paystack dashboard:
# Settings → API Keys & Webhooks → Test Webhook URL
# Set to: https://abc123.ngrok.io/webhook
Alternatively, use the Paystack test dashboard's webhook simulator to send test events manually without a running server — useful for unit testing webhook handlers.
Get weekly developer tips
Join 25,000+ developers. Practical guides, job tips, and new content — straight to your inbox.
No spam. Unsubscribe anytime.
When you are ready to go live:
sk_test_... with sk_live_... in your backend environment variablespk_test_... with pk_live_... in your frontend configurationCommon mistake: updating only the backend key. If your frontend still sends pk_test_... while the backend uses sk_live_..., transactions will be created in test mode and verification against the live API will fail.
This guide is part of the Paystack testing guide.
KES 2,999
The definitive guide to building payment systems with Paystack — from your first transaction to production-grade payment infrastructure across Africa. 9 modules, 47 lessons. Free preview available.
Start Paystack Course