Skip to main content

๐Ÿงช Sandbox Testing Environment

This comprehensive guide provides step-by-step instructions for testing your Hesabe payment gateway integration using our sandbox environment with detailed test credentials and scenarios.

๐ŸŽฏSandbox Environment Benefits

โœ… Safe Testing: Complete payment testing with zero financial risk - no real money transactions

๐Ÿ”„ Comprehensive Testing: Test all payment methods, error scenarios, and edge cases

๐Ÿ“Š Real-time Monitoring: Track and monitor all test transactions through the merchant panel

๐Ÿ“‹ Step-by-Step Testing Setupโ€‹

Step 1: ๐Ÿšจ Review Important Testing Guidelinesโ€‹

๐ŸšจImportant: Local Environment Setup
โš ๏ธ Connection Issues:

If you're unable to connect to sandbox URLs from your local development environment, this is likely due to incorrect configurations.

๐Ÿ“ž Contact our technical team for assistance:

๐Ÿ“ง Hesabe Technical Support: itsupport@hesabe.com

Step 2: ๐Ÿ”ง Configure Sandbox Environment URLsโ€‹

๐ŸŒSandbox API Endpoints
๐Ÿ› ๏ธSandbox Base URL:
https://sandbox.hesabe.com
๐Ÿ›’Sandbox Checkout URL:
https://sandbox.hesabe.com/checkout
๐Ÿ’ณSandbox Payment URL:
https://sandbox.hesabe.com/payment
๐Ÿ“ Configuration Instructions:
  1. Copy the URLs above to your development environment configuration
  2. Update your API base URL to point to sandbox environment
  3. Ensure your application can reach these endpoints
  4. Test connectivity before proceeding to authentication setup

Step 3: ๐Ÿ” Access Sandbox Merchant Panelโ€‹

๐Ÿ‘คMerchant Panel Login
๐Ÿ”‘ Username๐Ÿ” Password๐ŸŒ Sandbox Merchant Panel
testTest@1234

merchant.hesbstaging.com/merchant

๐Ÿ“ Login Steps:
  1. Click the portal URL above to open the sandbox merchant panel
  2. Enter username: test
  3. Enter password: Test@1234
  4. Navigate through the dashboard to monitor your test transactions
  5. Access transaction history, reports, and API settings

Step 4: ๐Ÿ”‘ Configure API Credentialsโ€‹

๐Ÿ”Sandbox API Credentials
โš ๏ธIMPORTANT: Sandbox Only

These credentials are strictly for sandbox testing. Never use these credentials in production environment.

๐Ÿท๏ธ Parameter๐Ÿ’พ Value๐Ÿ“‹ Copy๐Ÿ“ Description
Merchant Code842217

Your unique merchant identifier

Access Codec333729b-d060-4b74-a49d-7686a8353481

API access token for authentication

Secret KeyPkW64zMe5NVdrlPVNnjo2Jy9nOb7v1Xg

Encryption key for secure communication

IV Key5NVdrlPVNnjo2Jy9

Initialization vector for encryption

Base URLhttps://sandbox.hesabe.com

Sandbox API endpoint base URL

๐Ÿ”ง Integration Instructions:
  • Copy all credentials to your development environment configuration
  • Use the Base URL for all API endpoint calls
  • Keep Secret Key and IV Key secure - never expose in client-side code
  • Test authentication before proceeding to payment testing
  • Monitor all test transactions through the merchant panel

Step 5: ๐Ÿ’ณ Test Payment Scenariosโ€‹

๐Ÿ’ณComprehensive Test Card Library
๐ŸŽฏ Testing Objectives:
  • Payment Success: Test approved transactions with different card types
  • Payment Failures: Test declined transactions and error handling
  • Edge Cases: Test expired cards, invalid CVV, and timeout scenarios
  • Gateway Integration: Test multiple payment processors (KNET, MPGS, Cybersource)

๐Ÿ“‹ Test Card Details by Payment Methodโ€‹

KNET (Kuwait Local Payment Network)โ€‹

KNET Test Cards - Kuwait Local Payment
๐Ÿ’ณ Card Number๐Ÿ“… Expiry Date๐Ÿ” CVV๐Ÿ“Š Expected Result
888888000000000109/251234โœ… Approved - Captured
8888880000000001Any Other Date1234โŒ Declined - Not Captured
๐Ÿ’ก KNET Testing Notes:
  • Use expiry date 09/25 for successful transactions
  • Any other expiry date will result in declined transactions
  • CVV is always 1234 for KNET test cards

Visa (MPGS)โ€‹

Visa Test Cards - MPGS Gateway
๐Ÿ’ณ Card Number๐Ÿ“… Expiry Date๐Ÿ” CVV๐Ÿ“Š Expected Result
401200103714111212/25207โœ… Captured (Approved)
4012001037141112Any Other Date207โŒ Not Captured (Decline)
๐Ÿ’ก Visa MPGS Testing Notes:
  • Use expiry date 12/25 for approved transactions
  • Any other expiry date results in declined transactions
  • CVV 207 is required for this test card

MasterCard (MPGS)โ€‹

MasterCard Test Cards - MPGS Gateway
๐Ÿ’ณ Card Number๐Ÿ“… Expiry Date๐Ÿ” CVV๐Ÿ“Š Expected Result
545301000009553912/25300โœ… Captured (Approved)
555555555555444409/25123โœ… Captured (Approved)
5555555555554444Any Other Date123โŒ Not Captured (Decline)
๐Ÿ’ก MasterCard MPGS Testing Notes:
  • Multiple test cards available for different scenarios
  • Use 12/25 or 09/25 for successful transactions
  • Any other expiry date results in declined transactions

๐Ÿ“Š MPGS Expiry Dates and Response Scenariosโ€‹

MPGS Gateway Response Testing Matrix
๐Ÿ“… Expiry Date๐Ÿ“‹ Expected Response๐Ÿ“ Use Case
05/39โœ… APPROVEDSuccess scenario testing
05/39โŒ DECLINEDGeneral decline testing
04/27โŒ EXPIRED_CARDExpired card handling
08/28โŒ TIMED_OUTTimeout scenario testing
01/37โŒ ACQUIRER_SYSTEM_ERRORSystem error handling
02/37โŒ UNSPECIFIED_FAILUREGeneral failure testing
05/37โŒ UNKNOWN CVVCVV validation testing
๐Ÿ’ก MPGS Response Testing Guide:
  • Test various error scenarios to ensure proper error handling
  • Use different expiry dates to simulate real-world payment failures
  • Implement proper timeout handling for better user experience
info

For more details below check the below documentation

MPGS Test cards information

American Express (AMEX)โ€‹

American Express Test Cards - MPGS Gateway
๐Ÿ’ณ Card Number๐Ÿ“… Expiry Date๐Ÿ” CVV๐Ÿ“Š Expected Result
34567890123456409/251234โœ… Captured (Approved)
345678901234564Any Other Date1234โŒ Not Captured (Decline)
๐Ÿ’ก American Express Testing Notes:
  • Use expiry date 09/25 for approved transactions
  • Any other expiry date results in declined transactions
  • CVV 1234 is required for this test card

Visa (Cybersource)โ€‹

Visa Test Cards - Cybersource Gateway
๐Ÿ’ณ Card Number๐Ÿ“… Expiry Date๐Ÿ” CVV๐Ÿ“Š Expected Result
400000000000000209/251234โœ… Captured (Approved)
4000000000000002Any Other Date1234โŒ Not Captured (Decline)
๐Ÿ’ก Visa Cybersource Testing Notes:
  • Use expiry date 09/25 for approved transactions
  • Any other expiry date results in declined transactions
  • CVV 1234 is required for this test card

AMEX (Cybersource)โ€‹

American Express via Cybersource
๐Ÿ’ณ Card Number๐Ÿ“… Expiry Date๐Ÿ” CVV๐Ÿ“Š Expected Result
34000000000270809/251234โœ… Approved - Captured
340000000002708Any Other Date1234โŒ Declined - Not Captured

Next Steps: ๐Ÿš€ Production Migrationโ€‹

๐Ÿš€Ready for Live Payments?

Once all sandbox testing is complete and successful, follow our comprehensive production migration guide to start processing real payments.

๐Ÿ“–Production Guide:Moving to Production
๐Ÿ—๏ธAPI Documentation:Complete Integration Guide

๐Ÿ“ž Testing Support & Assistanceโ€‹

๐Ÿ”งTechnical Support:itsupport@hesabe.com
๐Ÿ‘คMerchant Support:support@hesabe.com