Test vs Live Environments
Moyasar provides two environments to separate testing from real transactions.
Test environment
- Keys:
pk_test_*andsk_test_* - Purpose: development and QA
- Uses sandbox behavior and test card numbers
Live environment
- Keys:
pk_live_*andsk_live_* - Purpose: real transactions with real customers
- Requires production-ready security and monitoring
What changes when switching to live
- Replace test keys with live keys.
- Confirm
callback_urlpoints to production HTTPS domain. - Re-test full payment lifecycle in production-safe rollout.
- Enable logs/alerts for payment failures and webhook failures.
Test Cards
Use only documented test card numbers in sandbox:
Using random card numbers in test mode will fail.