This section will explain the structure of input & output payload (data) for HyperSDK.

Request Structure

VariableDescriptionRequired
requestIdUnique randomly generated UUID v4 string for triggering any operation on HyperSDK. It is used for tracking purposes.
Should be a UUID string. Generate UUID
Type: String
Yes
serviceService name
(For payment page service: in.juspay.hyperpay)
Type: String
Yes
payloadRequest payload specific to each operation
Type: JSONobject
Yes

Sample input JSON

{
   "requestId" : "8cbc3fad-8b3f-40c0-ae93-2d7e75a8624a",
   "service" : "in.juspay.hyperpay",
   "payload"  : {}
}

Response Structure

VariableDescriptionRequired
requestIdUnique identifier sent for every operation
Type: String
Yes
eventIndicates what event is triggered by HyperSDK
Type: String
Yes
serviceService name
(For payment page service: in.juspay.hyperpay)
Type: String
Yes
payloadResponse payload specific to each operation
Type: JSONobject
Yes
errorError is returned true in case the operation is not successful. In case the error field is true please check errorCode and error message for more details.
Type: Boolean
Yes
errorCodeCheck for this key to detect error when ‘error’ parameter is true.
Type: String
Yes
errorMessageCheck for this key to detect error when ‘error’ parameter is true.
Type: String
Yes

Sample output JSON

{
  "requestId" : "8cbc3fad-8b3f-40c0-ae93-2d7e75a8624a", 
  "service" : "in.juspay.hyperpay",
  "payload"  : {}, 
  "error" : false, 
  "errorCode" : "", 
  "errorMessage" : ""
}

🚧

requestId - Juspay Reference

requestId should be unique for all operations to HyperSDK. This id allows for easier debugging and for querying responses required for integrations.


What’s Next