---
page_source: https://juspay.io/in/docs/upi-plugin-direct-psp/android/base-integration/initiating-the-sdk
page_title: Initiating the SDK
---


## Initiating the SDK



To initialise the SDK, client needs to call the `initiate` SDK API. The initiate api call boots up the SDK and makes it ready for all other operations

Follow the below steps to make an initiate SDK call:


### Step 1 Create an instance of HyperServiceHolder


The SDK exposes the `HyperServiceHolder` class. Create an object of this class for all upcoming operations



#### Code Snippets: -

#### Java Code Snippet:

```java
{"success":false,"message":"No Data found for the given path"}
```

#### Kotlin Code Snippet:

```kotlin
{"success":false,"message":"No Data found for the given path"}
```



### Step 2 Create Initiate payload


Initiate API takes a parameter as an input. This parameter is a JSON object referred as `InitiatePayload`. This payload contains certain key value pairs used by the SDK to perform a successful initiate

Refer to the following table for information about the description and sample payload.



#### Code Snippets: -

#### Java Code Snippet:

```java
{"success":false,"message":"No Data found for the given path"}
```

#### Kotlin Code Snippet:

```kotlin
{"success":false,"message":"No Data found for the given path"}
```



###   Initiate Parameters



## Request Payload
- **RequestId**:
  - Description: Unique uuid-v4 string
  - Value: $requestId
  - Tags: String, Mandatory
- **Service**:
  - Description: Value: in.juspay.hyperapi
  - Tags: String, Mandatory
- **Payload**:
  - Description: Parameters required to call Hyper SDK API
  - Value:
    - **Action**:
      - Description: Operation to be performed in the SDK. Should be initiate for this call.
      - Value: Value: initiate
      - Tags: String, Mandatory
    - **ClientId**:
      - Description: Client Id assigned by Juspay. Usual convention is merchantId
      - Value: Example: stock
      - Tags: String, Mandatory
    - **Environment**:
      - Description: Environment to be used for the session, while in testing it is sandbox and production when we are moving to releasing this app. Accepted values are 'sandbox' or 'production'
      - Value: Example: sandbox
      - Tags: String, Mandatory
    - **IssuingPsp**:
      - Description: Bank on which the merchant has been onboarded.
      - Value: Example: YES_BIZ / AXIS_BIZ / RBL_BIZ
      - Tags: String, Mandatory
    - **EnableJwsAuth**:
      - Description: enableJwsAuth
      - Value: Example: true/false
      - Tags: String, Mandatory
    - **Signature**:
      - Description: Base 64 encoding of signaturePayload and Protected .
      - Tags: String, Mandatory
    - **Protected**:
      - Description: Base 64 encoding of the below parameters.
      - Value:
        - **Kid**:
          - Description: Key ID to identify the public-private key pair used for signature generation.It will be provided to you by the Juspay team.
          - Value: Example: uat833359804655bb748702e324111
          - Tags: String, Mandatory
        - **Alg**:
          - Description: Asymmetric algorithm used. Will be RS256 in this case..
          - Value: RS256
          - Tags: String, Mandatory
      - Tags: String, Mandatory
    - **SignaturePayload**:
      - Description: Base 64 encoded stringified signature payload
      - Value:
        - **MerchantId**:
          - Description: Unique identifier associated with an account created by juspay.
          - Value: Example: stock
          - Tags: String, Mandatory
        - **MerchantCustomerId**:
          - Description: Merchant generated unique profile id for the customer.
          - Value: Example: abcde12345
          - Tags: String, Mandatory
        - **MerchantChannelId**:
          - Description: As provided by Juspay.
          - Value: Example: abcde123
          - Tags: String, Mandatory
        - **Timestamp**:
          - Description: Time when request is created in milliseconds.
          - Value: Example: 1665996901100
          - Tags: String, Mandatory
      - Tags: String, Mandatory
    - **MerchantLoader**:
      - Description: This key can be passed to so that merchant can show their own loaders and as well get the loader related events from the SDK, by default it’s value is false
      - Value: Value: false
      - Tags: Boolean, Optional
  - Tags: JSON, Mandatory


## Response Payload
- **RequestId**:
  - Description: Unique uuid-v4 string
  - Value: $requestId
  - Tags: String, Mandatory
- **Service**:
  - Description: Value: in.juspay.hyperapi
  - Tags: String, Mandatory
- **Payload**:
  - Description: Parameters required to call Hyper SDK API
  - Value:
    - **Action**:
      - Description: Operation performed in the SDK.
      - Value: Value: initiate
      - Tags: String
    - **Status**:
      - Description: Status of the Operation.
      - Value: Possible values : SUCCESS / FAILURE
      - Tags: String
  - Tags: JSON, Mandatory
- **Error**:
  - Description: Possible values :- true/false
  - Tags: Boolean
- **ErrorMessage**:
  - Description: Error Message
  - Tags: String
- **ErrorCode**:
  - Description: Error Code
  - Tags: String
- **Event**:
  - Description: Value: process_result
  - Tags: String



> **Note**
> [Click here](../miscellaneous/additional-parameters) for additional initiate parameters





#### Code Snippets: -

#### Java Code Snippet:

```java
{"success":false,"message":"No Data found for the given path"}
```

#### Kotlin Code Snippet:

```kotlin
{"success":false,"message":"No Data found for the given path"}
```



### Step 3 Create CallbackHandler


During its lifecycle, SDK emits multiple events to communicate about the transaction status. All of these events are received by an instance of `HyperPaymentsCallbackAdapter`.



#### Code Snippets: -

#### Java Code Snippet:

```java
{"success":false,"message":"No Data found for the given path"}
```

#### Kotlin Code Snippet:

```kotlin
{"success":false,"message":"No Data found for the given path"}
```



### Step 4 Call initiate


The final step is to call the `Initiate SDK API`.

The initiate method takes the `InitiatePayload` as a parameter. To create the parameter, you can use the createInitiatePayload function in the above steps.

> **Warning**
> Initiate is a fire-and-forget call. For every HyperServiceHolder instance you should **call initiate only once.** 





#### Code Snippets: -

#### Java Code Snippet:

```java
{"success":false,"message":"No Data found for the given path"}
```

#### Kotlin Code Snippet:

```kotlin
{"success":false,"message":"No Data found for the given path"}
```
