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:
The SDK exposes the HyperServiceHolder class. Create an object of this class for all upcoming operations
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.
Unique uuid-v4 string
Example:- $requestId
Value: in.juspay.hyperapi
Parameters required to call Hyper SDK API
Operation to be performed in the SDK. Should be initiate for this call.
Example:- Value: initiate
Client Id assigned by juspay. Usual convention is merchant_id
Example: stock
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'
Example: sandbox
Bank on which the merchant has been onboarded.
Example: YES_BIZ/AXIS_BIZ
enableJwsAuth
Example: true/false
Base 64 encoding of signaturePayload and Protected .
Base 64 encoding of the below parameters.
Key ID to identify the public-private key pair used for signature generation.It will be provided to you by the Juspay team.
Example: uat833359804655bb748702e324111
Asymmetric algorithm used. Will be RS256 in this case..
Example:- RS256
Base 64 encoded stringified signature payload
Unique identifier associated with an account created by juspay.
Example: stock
Merchant generated unique profile id for the customer.
Example: abcde12345
As provided by Juspay.
Example: abcde123
Time when request is created in milliseconds.
Example: 1665996901100
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
Example:- Value: false
Click here for additional initiate parameters
During its lifecycle, SDK emits multiple events to communicate about the transaction status. All of these events are received by an instance of HyperPaymentsCallbackAdapter.
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.
Initiate is a fire-and-forget call. For every HyperServiceHolder instance you should call initiate only once.

