Skip to main content

API Introduction

Moyasar provides a REST API that uses HTTP methods for the requests, authenticates via HTTP Basic Auth, and returns responses in JSON format.

Moyasar API is available in two modes: live mode and test mode. Using test mode does not impact your live data or interact with banking networks. The mode for the request is determined by the API Key used for authentication.

Base URL

All API requests must be made to the following base URL: https://api.moyasar.com/v1

Postman Collection

You can download a Postman collection for the API from here:

Setting Up Postman

  1. Import the Collection and Environments into Postman.
  2. Configure Variables: merchant_base_url, publishable_api_key, and secret_key.
  3. Choose the appropriate environment (Test or Live) from the environment dropdown
info

Important: Always use an environment in Postman to manage your API keys securely. Never hardcode credentials directly in requests.

tip

Testing Best Practices:

  • Start with the Test environment to verify your integration
  • Use test card numbers provided in the documentation
  • Switch to Live environment only after thorough testing