Update Session Token
In some cases flow is needed to be continued even when signature expires, so it generates the need for communication between Juspay sdk and merchant to continue flow with new signature, provided by merchant. The solution to the above issue is providing a callback to the merchant, indicating signature expiry and requesting a new token.
Merchant has to pass a new parameter in initiate request (or if a new auth token is generated for a process call then it will be required to be passed in the process call). The parameter authExpiry will take a string value and will indicate the initial signature/clientAuthToken expiry for the first token sent.
Sample Payload
{ "action":"initiate"/"process",
"authExpiry": "2021-07-19T07:20:53.318Z",
"clientAuthToken" : "XXXXXXXXXXXXXXXX"
}
Input (Payload) Details
Unique uuid-v4 string
Example: abcd-12345-abcd-12345
Value: in.juspay.hyperapi
Parameters required to call Hyper SDK API
Operation to be performed in the SDK. Should be updateAuth for this call
Example:- updateAuth
ClientAuthToken
Default 15min (to extend functionality later if configuration to change signature expiry will be added)
Input (Payload) Details
Unique uuid-v4 string
Example: abcd-12345-abcd-12345
Value: in.juspay.hyperapi
Parameters required to call Hyper SDK API
Operation to be performed in the SDK. Should be updateAuth for this call
Example:- updateAuth
Key ID to identify the public-private key pair used for signature generation.
Example: 1234
Signature generated for the signaturePayload.
Default 15min (to extend functionality later if configuration to change signature expiry will be added)
Signature payload is a stringified JSON of the details mentioned in the below table.
Unique identifier associated with an account created by juspay.
Example: stock
Any unique reference associated with your customer.
Example: abcde12345
Time when request is created in milliseconds.
Example: 1665996901100
This event is given when clientAuthToken/signature expires. This event will be received by merchant under `onEvent` callbacks from Juspay's SDK with the event name `session_expired` and a `reqCode`.
{ "event":"session_expired",
"payload":
{ "timestamp": "2021-07-19T07:20:53.318Z",
"reqCode" : "gdjhsdfgjhf-dsfyfsudgk"
}
}

