Generating a Secret Key for an Existing Merchant ID {#pax-aio-mid-secret-key-generate-intro}
============================================================================================

Use this information to generate a secret key for an existing merchant ID (MID) in the `Business Center` or by using a REST API request. The secret key and MID are required values that you must enter in the `mposUi` instance that you create. For more information, see [Creating an mposUi Instance](/docs/cybs/en-us/pax-all-in-one/integration/all/na/pax-all-in-one/pax-aio-get-started-intro/pax-aio-mposui-instance-create-intro.md "").

Generate a Secret Key for an Existing Merchant ID in the `Business Center` {#pax-aio-mid-secret-key-generate-ebc-task}
======================================================================================================================

You can generate an secret key for an existing merchant ID (MID) in the `Business Center`. Enter these values in the `mposUi` instance that you create. For more information, see [Creating an mposUi Instance](/docs/cybs/en-us/pax-all-in-one/integration/all/na/pax-all-in-one/pax-aio-get-started-intro/pax-aio-mposui-instance-create-intro.md "").  
Follow these steps to generate a secret key for an existing MID in the `Business Center`:

1. In the `Business Center`, go to the left navigation panel and choose Payment Configuration **\&gt;** Key Management. The Key Management page appears.

2. From the Merchant drop-down list, choose the merchant ID for which you want to generate a secret key.

3. Click Generate Key.

4. In the Recommended Key Types list, scroll down and choose Acceptance Devices Secret Key.

5. Click Generate Key. The Key Generation page appears.

6. Click Generate Key. Your MID and secret key appear on the page.

7. Click the Copy or Download icon to obtain the MID and secret key.

   #### ADDITIONAL INFORMATION

If you choose to copy the secret key information instead of downloading it, be sure to save it locally. After you leave the ` Business Center ` Key Generation page, you will not be able to retrieve the same secret key again. To obtain a new key, you must restart the key generation process.

Generate a Secret Key for an Existing Merchant ID Using a REST API Request {#pax-aio-mid-secret-key-generate-rest-api-task}
===========================================================================================================================

You can use a REST API request to generate a secret key for an existing merchant ID (MID). Enter these values in the `mposUi` instance you create.  
You must authenticate each request that you send to a `Cybersource` API. In order to authenticate an API request, you can use a REST shared secret key or a REST certificate. For more information about authentication requirements, see [*Getting Started with REST Developer Guide*](https://developer.cybersource.com/docs/cybs/en-us/platform/developer/all/rest/rest-getting-started/restgs-intro.md "").

Endpoints:
----------

**Test:** `POST ``https://apitest.cybersource.com``/kms/v2/keys-sym-pos`  
**Production:** `POST ``https://api.cybersource.com``/kms/v2/keys-sym-pos`

Required Fields for Generating a Secret Key for an Existing Merchant ID Using a REST API Request {#pax-aio-mid-secret-key-generate-api-reqfields}
=================================================================================================================================================

keyInformation.organizationId
:

REST Example: Generating a Secret Key for an Existing Merchant ID Using a REST API Request {#pax-aio-mid-secret-key-generate-api-ex-rest}
=========================================================================================================================================

Request

```
{
    "keyInformation":
    [
        {
            "organizationId": "transacting_MID"
        }
    ]
}
```

Response to a Successful Request

```
{
    "submitTimeUtc": "2023-08-07T13:07:17Z",
    "status": "ACCEPTED",
    "keyInformation": [
      {
           "organizationId": "transacting_MID",
           "externalOrganizationId": "MerchantId",
           "key": "SecretKey",
           "keyId": "af922a42-6d2c-41fd-92f7-09d908647de4",
           "status": "ACTIVE",
           "expirationDate": "2033-08-07T13:07:17Z"
      }
   ]
}
```

