---
page_title: Get Session Token
product: UPI TPAP SDK
platform: React Native
page_source: https://juspay.io/in/docs/upi-tpap-sdk/react-native/headless-process-payloads/get-session-token
llms_txt: https://juspay.io/in/docs/llms.txt
product_llms_txt: https://juspay.io/in/docs/upi-tpap-sdk/llms.txt
---


## Get Session Token



It should not be called on an HyperSDK instance which has not been initiated. To verify if an instance is initiated, kindly refer to check SDK initiated in code.


###   Process Parameters


> **Note**
> Status Description
> 
> NOPERMISSION - User has not given necessary permissions yet (Phone State). FRESH - Necessary permissions are provided but the user is not registered. BOUND - User registered on device but no accounts are found. LINKED - User registered on device and valid accounts are found.




## Request 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.
      - Value: upiGetSessionToken
      - Tags: String, Mandatory
    - **MerchantKeyId**:
      - Description: Key ID to identify the public-private key pair used for signature generation.
      - Tags: String, Mandatory
    - **Signature**:
      - Description: Signature generated for the signaturePayload
      - Tags: String, Mandatory
    - **SignaturePayload**:
      - Description: Signature payload is a stringified JSON of the details mentioned in the below table.
      - Value:
        - **Merchant_id**:
          - Description: Unique identifier associated with an account created by juspay.Ex: stock
          - Tags: String, Mandatory
        - **Customer_id**:
          - Description: Any unique reference associated with your customer.
          - Tags: String, Mandatory
        - **Timestamp**:
          - Description: Time when request is created in milliseconds.
          - Tags: String, Mandatory
      - Tags: String, Mandatory
    - **CustomerMobileNumber**:
      - Description: Mobile number of the customer
      - Value: <customer mobile number>
      - Tags: String, optional
    - **SimId**:
      - Description: ID for sim
      - Value: 0/1/2, etc
      - Tags: String, optional
    - **UdfParameters**:
      - Description: Stringified JSON for udf parameters
      - Tags: JSON string, optional
  - Tags: JSON, Mandatory


## Response Payload
- **RequestId**:
  - Description: Unique uuid-v4 string
  - Value: Example: abcd-12345-abcd-12345
  - Tags: String
- **Service**:
  - Description: Value: in.juspay.hyperapi
  - Tags: String
- **Payload**:
  - Description: Response Parameters
  - Value:
    - **Action**:
      - Description: Operation performed in the SDK.
      - Value: upiGetSessionToken
      - Tags: String, Mandatory
    - **Status**:
      - Description: Status of the Operation. Possible values : FAILURE / FRESH / BOUND / LINKED. Accounts will be available only in case status is LINKED.
      - Tags: String, Mandatory
    - **IsDeviceBound**:
      - Description: If the current device is in bound state or not.
      - Value: Possible values: true/false
      - Tags: String, Mandatory
    - **IsDeviceActivated**:
      - Description: If the device is in active state or not
      - Value: Possible values: true/false
      - Tags: String, Mandatory
    - **Prefix**:
      - Description: Prefix to append before requestID
      - Value: Example: ABC
      - Tags: String, Mandatory
    - **VpaAccounts**:
      - Description: It's an array of Vpa Accounts. We will get this only after successful linking of accounts.
      - Value:
        - **Vpa**:
          - Description: Vpa
          - Value: abc@xyz
          - Tags: String, Mandatory
        - **Account**:
          - Description: Accounts linked to this vpa
          - Value:
            - **BankCode**:
              - Description: IIN Code for the bank
              - Tags: String, Mandatory
            - **BankName**:
              - Description: Name of bank
              - Tags: String, Mandatory
            - **MaskedAccountNumber**:
              - Description: Account Number with last few digits visible
              - Tags: String, Mandatory
            - **MpinLength**:
              - Description: Length of mpin
              - Tags: String, Mandatory
            - **MpinSet**:
              - Description: Is mpin set?
              - Value: Possible values: true/false
              - Tags: String, Mandatory
            - **ReferenceId**:
              - Description: Account Reference Id. Incase of lite account, this would be in the format of <accRefID>||<LRN>
              - Value: Example: A0760cb548bb4dda9d32e3030863dd5. Example incase of lite account : A0760cb548bb4dda9d32e3030863dd5||01002600010235200170091493868500398
              - Tags: String, Mandatory
            - **OtpLength**:
              - Description: Length of OTP
              - Value: Example: 6
              - Tags: String, Mandatory
            - **AtmPinLength**:
              - Description: Length of atm pin
              - Value: Example: 6
              - Tags: String, Mandatory
            - **Type**:
              - Description: Type of account. Incase of lite account, the type of the account would be appended with ||LITE
              - Value: Example: Savings. Example incase lite account, CURRENT||LITE
              - Tags: String, Optional
            - **BranchName**:
              - Description: Name of branch in which account is registered
              - Tags: String, Optional
            - **BankAccountUniqueId**:
              - Description: Unique Identifier for bank account across banks
              - Tags: String, Optional
            - **Ifsc**:
              - Description: Account IFSC
              - Tags: String, Optional
            - **IsInitialTopUpDone**:
              - Description: This key will be available in UPI Lite usecase. The value of this either be 'true' or 'topup_txn_pending', the occurence of 'topup_txn_pending' will be very rare and its state will get updated in every 10mins.
              - Value: Possible values: true/topup_txn_pending
              - Tags: Conditional
            - **IsPrimary**:
              - Description: Is this account the primary account
              - Value: Possible values: true/false
              - Tags: String, Optional
            - **Name**:
              - Description: Name of account holder
              - Value: Example: ABC
              - Tags: String, Optional
          - Tags: Array of JSON, Mandatory
      - Tags: Array of JSON, Optional
    - **CustomerMobileNumber**:
      - Description: Masked phone number of the customer
      - Value: <Customer mobile number>
      - Tags: String, Optional
    - **DeviceFingerPrint**:
      - Description: Unique fingerprint of the device
      - Tags: String, Optional
    - **OtherInfo**:
      - Description: As passed in request
      - Tags: String, Optional
    - **UpiNumbers**:
      - Description: Upi Numbers
      - Value:
        - **UpiNumberStatus**:
          - Description: The status of the upiNumber.
          - Value: Active,Deleted
          - Tags: String, Mandatory
        - **UpiNumber**:
          - Description: The upi Number
          - Value: <upi number>
          - Tags: String, Mandatory
        - **Vpa**:
          - Description: vpa
          - Value: abc@xyz
          - Tags: String, Mandatory
        - **Expiry**:
          - Tags: String, optional
      - Tags: array of Strings, Optional
    - **AllowedAccountTypes**:
      - Tags: Array String, Optional
    - **UdfParameters**:
      - Description: Stringified JSON for udf parameters
      - Tags: JSON string, Optional
  - Tags: JSON
- **Error**:
  - Description: Possible values :- true/false
  - Tags: Boolean
- **ErrorMessage**:
  - Description: Error Message
  - Tags: String
- **ErrorCode**:
  - Description: Error Code
  - Tags: String
- **Event**:
  - Description: Value: process_result
  - Tags: String





#### Code Snippets: -

#### Java Code Snippet:

```java
{"success":false,"message":"Failed to fetch snippet"}
```

#### Kotlin Code Snippet:

```kotlin
{"success":false,"message":"Failed to fetch snippet"}
```


## Sample Code Snippets:
### Request snippets:

#### Request Code Snippet:

```request
{"success":false,"message":"Failed to fetch snippet"}
```

### Response snippets:

#### Response:
```plaintext
{"success":false,"message":"Failed to fetch snippet"}
```



---

## Complete Code Reference

The following code files are referenced in the steps above:

### InappHeadless.txt

```
{"success":false,"message":"Failed to fetch snippet"}
```


---

## See Also

- [UI Direct Links](https://juspay.io/in/docs/upi-tpap-sdk/react-native/ui-process-payloads/direct-links)
- [Check Permission](https://juspay.io/in/docs/upi-tpap-sdk/react-native/headless-process-payloads/check-permission)
