API Keys


On this page

API Keys Overview

Moyasar offer its clients a unique API keys to authenticates their API request.

Each account is supplied with two pairs of keys: one for testing and the other for running live transactions.

For each mode there are two types of API keys: publishable and secret.

  • The secret key enables you to all kinds of operations available in this documentation. The secret key is powerful and thus it must be kept secret at all times.
  • The publishable key enables you to perform one operation only: create a payment. Thus, you can attach the publishable key to public web forms (e.g., as an HTML hidden field).

Get your API keys

To get an API key for the Moyasar API:

  1. Go to https://dashboard.moyasar.com/
  2. Click on the Login tab.
  3. After signing in, click on Settings tab in the sidebar navigation.

    account settings

  4. Under the API Keys tab, you’ll find all the account keys.

    api keys

  5. Copy the desired key by clicking on copy icon copy icon

Renew the API keys

If you need to block an API key and generate a new one:

  1. Go to https://dashboard.moyasar.com/
  2. Click on the Login tab.
  3. After signing in, click on Settings tab in the sidebar navigation.

    adashboard-moyasar-app-sidePar

  4. Under the API Keys tab, you’ll find all the account keys.

    api keys

  5. Renew the desired key by clicking on refresh icon refresh icon

IP Whitelist

Moyasar provides IP Whitelist feature to protect Secret Key from being compromised. Visit API Docs for more information about the feature.

Update IP Whitelist

  1. Login to Moyasar Dashboard
  2. Go to Settings

    dashboard-moyasar-app-sidePar

  3. Go to API Keys Setting, then click edit to add a whitelist for the environment you want to protect

    api keys settings

  4. Click the button with + sign to add rows

    add to whitelist

  5. Fill one or more rows with your IP addresses and label them with names, then click save.

    add to whitelist

    IP Addresses here are just examples and you have to fill with your own IP Addresses

  6. you will have your IP whitelist as the image below, and you can click edit to enter editing mode and modify it, or remove it.

    add to whitelist


Last Modified : Aug 2021