Skip to main content

Test vs Live Environments

Moyasar provides two environments to separate testing from real transactions.

Test environment

  • Keys: pk_test_* and sk_test_*
  • Purpose: development and QA
  • Uses sandbox behavior and test card numbers

Live environment

  • Keys: pk_live_* and sk_live_*
  • Purpose: real transactions with real customers
  • Requires production-ready security and monitoring

What changes when switching to live

  1. Replace test keys with live keys.
  2. Confirm callback_url points to production HTTPS domain.
  3. Re-test full payment lifecycle in production-safe rollout.
  4. 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.