2. Initiating the SDK
To initialise the SDK, client needs to call the initiate SDK function. The initiate function call boots up the Hypercheckout SDK and makes it ready for all other operations
Follow the below steps to make an initiate SDK call
The Hypercheckout SDK exposes the HyperSDKPlugin object. This object can be accessed via cordova.plugins.HyperSDKPlugin
The HyperSDKPlugin instance should be created only after the onDeviceReady event is fired.
Initiate 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.hyperpay
Parameters
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” / “sandbox“.
During its lifecycle, SDK emits multiple events to communicate about the transaction status. All of these events are received by the hyperSDKCallback function.
This callback handler is passed as the second argument to the initiate call.
The final step is to call the Initiate function.
The initiate method takes stringified 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.

