# Renew OAuth key
source: https://developer.mastercard.com/india-online-dispute-resolution/documentation/renew_oauth_key/index.md

The portal renews the project OAuth key by generating a new private key and certificate, validating API calls end-to-end, and then revoking the old key to complete the rotation.

## Prerequisites {#prerequisites}

* Ensure that you have access to the project's keys or certificates section in the portal.
* Plan a short maintenance window (recommended) so you can validate with the new key before revoking the old one.
* Keep a safe location ready for the downloaded key file and for recording the key alias and Keystore password (these are required for client-side API signing).

Follow these steps to renew the OAuth key.

1. In the existing project, click **Production** .
   :a:

2. To begin adding a new key to the project click **Add project key**.

3. From the **Set private key** section, select **Generate a new private key**.

:b:

4. Click **Proceed**.

This creates a fresh private key for the new OAuth certificate (recommended for key rotation).

5. Enter the Key alias and Keystore password.

![uploads](https://static.developer.mastercard.com/content/india-online-dispute-resolution/uploads/c.png)

6. Click the **Create key**.

* Record the alias and password securely. You will need them when configuring your customer to sign requests using the new key.
* Use values that comply with your team's password policy (length/complexity) and do not reuse old credentials.

7. Click **Download key file** and save it to a secure location.

![uploads](https://static.developer.mastercard.com/content/india-online-dispute-resolution/uploads/d.png)

The application requires this file for configuration and API request signing.

8. To return to the project view, click **Open project**.

This confirms that the newly created key displays in the list.

![uploads](https://static.developer.mastercard.com/content/india-online-dispute-resolution/uploads/e.png)

Verify the new OAuth key entry is present and note any identifiers shown for troubleshooting and audit purposes. Examples include the key name or alias, creation date, and status.

### Validate the new key {#validate-the-new-key}

1. Update your application configuration to use the new key file, along with the recorded alias and keystore password.
2. Perform end-to-end API validation (at minimum: obtain an access token or authenticate and call one or more critical APIs).
3. Monitor logs for signature/authentication errors and confirm that responses are successful.

### Revoke the old key {#revoke-the-old-key}

After validation is successful and the new key is live, revoke the old key to prevent further use.

![uploads](https://static.developer.mastercard.com/content/india-online-dispute-resolution/uploads/f.png)

* Click the **Revoke key** for the old OAuth key entry.

If issues occur after switching, do not revoke the old key until you have resolved the configuration and revalidated, so you can roll back quickly.

## Renew the client encryption key {#renew-the-client-encryption-key}

The portal renews the Client Encryption Key by creating a new key, downloading the updated key material, and validating encryption/decryption flows end-to-end before switching production usage.

### Prerequisites {#prerequisites-1}

* Ensure that you have access to the project's keys or certificates section in the portal.
* Plan a short maintenance/validation window so you can test with the new key before fully switching traffic.
* Prepare a secure location to store the downloaded key file and any configuration values your application requires (for example, key identifiers/aliases used by your customer implementation).

Follow these steps to renew the client encryption key.

1. On the project keys page, to begin the renewal process, click the **Add key** .
   ![uploads](https://static.developer.mastercard.com/content/india-online-dispute-resolution/uploads/g.png)

2. Choose Client Encryption Key.   

   This ensures that the portal creates the correct certificate/key type used for client-side payload encryption/decryption flows.

![uploads](https://static.developer.mastercard.com/content/india-online-dispute-resolution/uploads/h.png)

3. Click **Proceed**.

![uploads](https://static.developer.mastercard.com/content/india-online-dispute-resolution/uploads/i.png)

4. Click the **Create key** .   

   This confirms that the key was created successfully.

5. Click **Download key file** and save it to a secure location.
   ![uploads](https://static.developer.mastercard.com/content/india-online-dispute-resolution/uploads/j.png)

6. To return to the project view, click **Open project**.

![uploads](https://static.developer.mastercard.com/content/india-online-dispute-resolution/uploads/k.png)

A new Client Encryption Key entry is now available.

### Validate the new key {#validate-the-new-key-1}

1. Update your application configuration to reference the newly downloaded key material.
2. Perform end-to-end validation (at minimum: encrypt a request payload using the new key and confirm that the corresponding response flow works as expected for your integration).
3. Monitor application and gateway logs for encryption/decryption errors.

### Revoke the old key {#revoke-the-old-key-1}

After validation is successful and the new key is live, revoke the old key to prevent further use.

![uploads](https://static.developer.mastercard.com/content/india-online-dispute-resolution/uploads/l.png)

## Renew the Mastercard encryption key {#renew-the-mastercard-encryption-key}

The portal renews the Mastercard encryption key by generating a new private key and certificate, activating the new key in the portal, and validating end-to-end encryption/decryption flows before fully switching usage.

### Prerequisite {#prerequisite}

• Ensure that you have access to the project's keys or certificates section in the portal.   

• Plan a short maintenance/validation window so you can activate and test the new key without impacting production traffic.   

• Prepare a secure location to store the downloaded key file, and be ready to securely record the Key alias and Keystore password (required for client-side decryption of response payloads).

Follow these steps to renew the Mastercard encryption key.

1. On the project keys page, click the **Add key** .
   :m:

2. Choose **Mastercard Encryption Key** , and then click **Proceed** .
   ![uploads](https://static.developer.mastercard.com/content/india-online-dispute-resolution/uploads/n.png)

3. Choose **Generate a new private key** , and then click **Proceed** .   

   This creates a fresh private key for the renewed certificate.
   :o:

4. Enter the details for Key alias and Keystore password, and then click **Create key**.

Note:   

* Record these values securely; these are required for decrypting the response payload on the client side.

* Do not reuse old credentials; follow your team's password policy for strength and storage.

![uploads](https://static.developer.mastercard.com/content/india-online-dispute-resolution/uploads/p.png)

5. Click Download key file and save it to a secure location.   
   This file is required to configure your application to use the renewed key material.

![uploads](https://static.developer.mastercard.com/content/india-online-dispute-resolution/uploads/q.png)

6. To return to the project view and confirm the new key, click **Open project**.

![uploads](https://static.developer.mastercard.com/content/india-online-dispute-resolution/uploads/r.png)

A new Mastercard Encryption Key entry is now available.

### Activate the new Key {#activate-the-new-key}

7. Click **Activate** for the newly created key. ![uploads](https://static.developer.mastercard.com/content/india-online-dispute-resolution/uploads/s.png)
