Skip to main content

Get Your API Keys

Moyasar provides unique API keys to clients to authenticate API requests. Each account has two pairs of keys - one for testing and one for live transactions.


API Keys

Moyasar Dashboard API Key settings

TermDescription
publishable keyThe publishable key allows for only one operation - creating a payment and thus can be attached to public web forms, such as an HTML hidden field.
secret keyThe secret key provides access to all operations in the documentation. If you have not generated any of your secret keys previously, or if you lose a generated one, you have to regenerate it and store it in a safe spot; as you will not be able to view it again -- only its ID.
tip
  • Secret keys start with the prefix: sk_.
  • Publishable keys start with the prefix: pk_.

1. Test API Keys

Test API keys allow you to test your integration with Moyasar without risking the usage of real money.

2. Live API Keys

Live API keys are used to accept real payments. (these will appear once you activate your account)

tip
  • Test API key start with the prefix: pk_test_ or sk_test_.
  • Live API keys start with the prefix: pk_live_ or sk_live_.

Regenerate API Keys

You can regenerate your API keys by clicking on the Regenerate Key button next to the key that you want to regenerate