---
page_source: https://juspay.io/sea/docs/digital-wallets-sea/docs/how-to-integrate-web/step-3-initiating-sdk
page_title: Step 3: Initiating SDK
---


# SDK Initiation



Post creation of Hyperservices instance, initiate the SDK. The above 2 steps have to be mandatorily done before proceeding with any of the below steps

This is a mandatory SDK call. It takes two parameters: a JSONObject and a hyperCallbackHandler function

JSON object which contains defined [payload](https://developer.juspay.in/v5.1/docs/initiate-payload) required to complete the initiate operation

HyperCallbackHandler is a callback function to handle receiving events from HyperServices instances. It is required only for iFrame based integration


#### javascript Code Snippet:

```javascript
const hyperServiceObject = new window.HyperServices();

const initiatePayload = {
  action: "initiate",
  clientId: "<CLIENT_ID>",
  merchantId: "<MERCHANT_ID>",
  clientAuthToken: "<AUTH_TOKEN>",
  environment: "sandbox",
  customerId: "<CUSTOMER_ID>",
  integrationType: "iframe",
  hyperSDKDiv: "sdkContainer"
};

const sdkPayload = {
  service: "in.juspay.ec",
  requestId: "<UUID>",
  payload: initiatePayload
};

hyperServiceObject.initiate(sdkPayload, function(eventData) {
  // handle callbacks for initiate_result, process_result, etc.
});
```


> **Note**
> **When to call initiate in iFrame integration?** 
> 
> * If the element with entryPointId is loaded statically, then call initiate after onLoad() is fired
> * If the element is loaded dynamically, then call initiate post verifying if element is present in DOM

