3. Initiating the SDK
To initialise the SDK, client needs to call the initiate SDK API. The initiate api call boots up EC SDK and makes it ready for all other operations
Follow the below steps to make an initiate SDK call
Initiate is to be called on render of the homescreen. Not following this will lead to increased latency.
Import the HyperSDK namespace to get access to HyperServices class in your code
EC SDK exposes the HyperServices class. Create an object of this class for all upcoming operations
Initiate API takes two parameters as input. One of the 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.
Unique uuid-v4 string
Example:- $requestId
Value: in.juspay.hyperapi
Parameters required to call Hyper SDK API
Value: initiate
Unique merchant id shared during onboarding
Unique Client id shared during onboarding
Environment to be used for the session. Accepted value is production
The final step is to call the Initiate SDK API.
The initiate method takes stringifed InitiatePayload as argument. Use the functions created in the above steps to create the parameters
Initiate is a fire-and-forget call. For every HyperService instance you should call initiate only once.

