# API Encryption Key Guide

Whether generating Credentials for Test Environment or Live Environment, process is same for both, Live credentials will be generated from live dashboard while test credentials will be generated from test dashboard.

* [Log In](https://app.paykun.com/login) to your PayKun Dashboard
* ‘Go to’ the Merchant Account under the ‘Payment Gateway’ section
* Copy your Merchant ID which you will get by clicking on your profile picture

![](https://3452474187-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lu72eVCu_tPCGSWyyd7%2F-MPEUxqOhrgKoj7l1CNu%2F-MPEWldFPkEQbqAeQejy%2Fdash%402x.png?alt=media\&token=24eec873-cce8-4378-9af1-1996d0ff7d40)

* To Generate API Keys, go to the Setting
* Then go to the Security Option.
* Click on Generate API Key (web or device as per your platform) and download your Access Token and Encryption Key(API Secret Key).

![](https://3452474187-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lu72eVCu_tPCGSWyyd7%2F-MDtNPB5ddpMEkd68mjw%2F-MDtQFBo_a-ZHXH8VnPC%2Fgenerate.png?alt=media\&token=7ad25981-00e0-434a-b067-cbbdf393aff3)

{% hint style="info" %}
When using Test Credentials, You need to set: **isLive=false** in your integration kit.
{% endhint %}

{% hint style="info" %}
If you have generated API Key before then you will see the date of the API Key generated, since you will not be able to retrieve the old API Key (For security reasons) we have provided the re-generate option, so you can re-generate API Key in case you have lost the old one.
{% endhint %}

{% hint style="danger" %}
Once you re-generate API Key your old API Key will stop working immediately. So be cautious while using this option.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.paykun.com/technical-guide/api-encryption-key-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
