---
page_source: https://juspay.io/in/docs/upi-plugin-direct-psp/android/miscellaneous/session-expiry
page_title: Session Expiry
---


## 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.


###   Request for new signature


Input (Payload) Details


### Payload
- **RequestId**:
  - Description: Unique uuid-v4 string
  - Value: Example: abcd-12345-abcd-12345
  - Tags: String, Mandatory
- **Service**:
  - Description: Value: in.juspay.hyperapi
  - Tags: String, Mandatory
- **Payload**:
  - Description: Parameters required to call Hyper SDK API
  - Value:
    - **Action**:
      - Description: Operation to be performed in the SDK. Should be updateAuth for this call
      - Value: updateAuth
      - Tags: String, Mandatory
    - **AuthExpiry**:
      - Description: Default 15min (to extend functionality later if configuration to change signature expiry will be added)
      - Tags: Optional
    - **Signature**:
      - Description: Base 64 encoding of signaturePayload and Protected .
      - Tags: String, Mandatory
    - **Protected**:
      - Description: Base 64 encoding of the below parameters.
      - Value:
        - **Kid**:
          - Description: Key ID to identify the public-private key pair used for signature generation.It will be provided to you by the Juspay team.
          - Value: Example: uat833359804655bb748702e324111
          - Tags: String, Mandatory
        - **Alg**:
          - Description: Asymmetric algorithm used. Will be RS256 in this case..
          - Value: RS256
          - Tags: String, Mandatory
      - Tags: String, Mandatory
    - **SignaturePayload**:
      - Description: Base 64 encoded stringified signature payload
      - Value:
        - **MerchantId**:
          - Description: Unique identifier associated with an account created by juspay.Ex: stock
          - Tags: String, Mandatory
        - **MerchantCustomerId**:
          - Description: Merchant generated unique profile id for the customer.
          - Tags: String, Mandatory
        - **MerchantChannelId**:
          - Description: As provided by Juspay.
          - Tags: String, Mandatory
        - **Timestamp**:
          - Description: Time when request is created in milliseconds.
          - Value: Example: 1665996901100
          - Tags: String, Mandatory
      - Tags: String, Mandatory
  - Tags: JSON, Mandatory




#### Code Snippets: -

#### Java Code Snippet:

```java
{"success":false,"message":"No Data found for the given path"}
```

#### Kotlin Code Snippet:

```kotlin
{"success":false,"message":"No Data found for the given path"}
```



###   Callback Indicating Token Expiry


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`.

> **Note**
> `{ "event":"session_expired",``"payload":``{ "timestamp": "2021-07-19T07:20:53.318Z",``"reqCode" : "gdjhsdfgjhf-dsfyfsudgk"``}``}`



