> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clickpesa.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Hosted Integration Setup

> Learn how to set up hosted integration with ClickPesa, including creating applications, managing API keys, and retrieving credentials.

## Authentication Overview

[Client ID](#authentication-overview) - Remains accessible in your application settings and is also required for API authentication.

[API Key](#authentication-overview) - It is required for API authentication, displayed **only once** during creation. **Copy and store it securely**

[JWT Token](#authentication-overview) - `API Key` and `Client ID` are [exchanged](api-reference/authorization/generate-token) for a short-lived `JWT Token`, that will be used for the API call to generate hosted links

[OTP Authorization](#authentication-overview) - Depending on the actions, users may also be required to provide OTP code via their **Two-Factor Authentication** (2FA) method

## Application Setup

### Step 1: Log in to the ClickPesa Dashboard

Go to the [ClickPesa Dashboard](https://merchant.clickpesa.com) and log in with your credentials.

### Step 2: Access Developer Settings

1. In the dashboard, click **Settings**.
2. Navigate to the **Developers** section.

### Step 3: Create a New Application

Click **Create Application** to begin the setup process.

### Step 4: Configure Application Details

When creating your application, provide the following details:

* **Application Name**: Choose a name to identify your app.
* **Integration Type**: Select **Hosted**.
* **Features**: Choose the features needed (e.g. **Hosted Checkout**, **Hosted Payout**).
* **Return URL**: The Return URL is used in hosted solutions to redirect users after they have completed a payment or payout.

### Step 5: Submit Your Application

Click **Create** to finalize the application setup.

## Managing API Keys

<Warning> **Important**: Keep your API credentials secure and do not share them publicly.</Warning>

### Access API Keys

1. Navigate to **Settings** in the ClickPesa dashboard.
2. Go to the **Developers** section.
3. Select the application for which you want to manage API keys.
4. Click **Manage API Keys** in the application settings.
5. A panel will appear, showing the list of existing API keys, including:
   * **Name**: Assigned name of the API key.
   * **Last Activity**: Date of last use.
   * **Revoke Button**: Option to deactivate the key.

### Adding a New API Key

1. Navigate to **Settings** in the ClickPesa dashboard.
2. Go to the **Developers** section.
3. Select the application for which you want to create an API key.
4. Click **Manage API Keys** in the application settings.
5. Click **Add API Key**.
6. A modal will appear where you can enter the required details:
   * **Name**: A label for the API key.
   * **Expiry Date**: Define when the key will expire.
7. Click **Submit** to proceed.
8. The modal will prompt you to enter your password for confirmation.
9. After successfully confirming your password, the API key will be created.
10. The modal will then display:
    * The **Client ID** and newly generated **API Key**.
    * The **Expiry Date**.
