Skip to main content

Testing

Test your integration using Moyasar's sandbox environment. No real money is charged.


Test API Key

Use your test API key (starts with pk_test_) for sandbox testing:

apiKey: "pk_test_YOUR_TEST_KEY"

Get your API keys


Credit Card Testing

Use the Moyasar test cards for sandbox credit card payments.

Common Test Cards

Card NumberExpected Result
4111 1111 1111 1111Success
4000 0000 0000 0002Requires 3DS authentication
5555 5555 5555 4444Success (Mastercard)

Test Card Details

When using test cards, you can use any:

  • Expiry date in the future
  • CVV (3 digits)
  • Cardholder name

Apple Pay Testing

warning

Apple Pay testing requires a physical device. The simulator does not support Apple Pay.

Setup for Testing

  1. Use a test API key (pk_test_)
  2. Add your actual card to the device's Wallet app
  3. No real charges will be processed in the test environment

Why Apple Pay Requires a Physical Device

LimitationDescription
Secure ElementApple Pay uses a hardware component not available in the simulator
Card ProvisioningReal cards must be added to Wallet, which the simulator cannot do
Biometric AuthenticationFace ID / Touch ID require physical hardware
NFCContactless payment simulation is not supported in the simulator

See Apple Pay Testing Guide for detailed testing steps.


STC Pay Testing

Use the sandbox OTP codes to test different STC Pay scenarios:

OTPResult
123456Success
000000Success
111111Insufficient Funds
222222Daily Limit Exceeded
333333Transaction Limit Exceeded
444444Timeout
Any otherInvalid OTP

Next Steps