Payload
This section will explain the structure of input & output payload (data) for HyperSDK.
Request Structure
Variable | Description | Required |
---|---|---|
requestId | Unique 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 |
service | Service name (For payment page service: in.juspay.hyperpay) Type: String | Yes |
payload | Request payload specific to each operation Type: JSONobject | Yes |
Sample input JSON
{
"requestId" : "8cbc3fad-8b3f-40c0-ae93-2d7e75a8624a",
"service" : "in.juspay.hyperpay",
"payload" : {}
}
Response Structure
Variable | Description | Required |
---|---|---|
requestId | Unique identifier sent for every operation Type: String | Yes |
event | Indicates what event is triggered by HyperSDK Type: String | Yes |
service | Service name (For payment page service: in.juspay.hyperpay) Type: String | Yes |
payload | Response payload specific to each operation Type: JSONobject | Yes |
error | Error 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 |
errorCode | Check for this key to detect error when ‘error’ parameter is true. Type: String | Yes |
errorMessage | Check 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.
Updated almost 2 years ago