Payload
This section will explain the structure of input & output payload (data) for HyperSDK.
Input
- requestId is a unique randomly generated unique string for triggering any operation on HyperSDK. Usually used to match if response or callbacks are triggered for the same operation. Should be a UUID string. Generate UUID
- service is a reference to the Juspay product being consumed.
- payload contains all relevant information required to complete an operation.
Sample input JSON
{
"requestId" : "8cbc3fad-8b3f-40c0-ae93-2d7e75a8624a",
"service" : "in.juspay.hyperapi",
"payload" : {}
}
Output
- requestId is a unique randomly generated unique string for triggering any operation on HyperSDK. Usually used to match if response or callbacks are triggered for the same operation.
- service is a reference to the Juspay product being consumed.
- payload contains all relevant information required to complete an operation.
- error is a boolean triggering that an error has occurred with the operation. Can be treated as a trigger point to split between Success and Other scenarios for payments.
- errorCode can be used to check what error has occurred and to will act as a reference to get more details from the error page.
- errorMessage cab be used to find more details of the error message and to find steps to fix the error.
Sample output JSON
{
"requestId" : "8cbc3fad-8b3f-40c0-ae93-2d7e75a8624a",
"service" : "in.juspay.hyperapi",
"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 about 2 years ago