---
page_source: https://juspay.io/in/docs/upi-plugin-sdk/cordova/miscellaneous/clientauthtoken-vs-signature
page_title: ClientAuthToken vs Signature
---


## ClientAuthToken vs Signature




###   Outer Payload


The APIs in the doc follow a common top level structure for each request and response body with a common outer payload and an API specific inner payload.


### 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
  - Tags: JSON, Mandatory





###   Inner Payload


Each Inner Payload must contain one of the two authentication field group:

> **Note**
> In the inner payload, only one of the below details is required to be passed. In case payload Signature Support is being passed in the request already, there is no need to pass clientAuthToken in the payload.






###   1. Payload structure Signature Support



### 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:
    - **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: Parameters required to call Hyper SDK API
      - Value:
        - **Merchant_id**:
          - Description: Unique identifier associated with an account created by juspay.
          - Value: Example: 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: 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"}
```



###   2. Payload structure with clientAuthToken



### 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:
    - **ClientAuthToken**:
      - Description: clientAuthToken
      - Tags: String, Mandatory
    - **MerchantID**:
      - Description: Unique identifier associated with an account created by juspay.
      - Value: Example: stock
      - Tags: String, Mandatory
    - **CustomerId**:
      - Description: Any unique reference associated with your customer.
      - 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"}
```



###   Parameters Difference with Example


For a clientAuthToken-based payload, you need to make several changes in the signature-based payload.

First, remove the keys "merchantKeyId," "signature," and "signaturePayload" from the payload. These keys are no longer necessary.

Next, focus on the contents of the "signaturePayload" key. Change all the key names inside the "signaturePayload" object to adhere to the camel case convention. For example, if you have a key named "merchant_id", change it to "merchantId". Apply this transformation to all the keys inside the "signaturePayload" object.

Once you have modified the key names, add them to the "payload" object. You can eliminate the "timestamp" key as well. Refer the below example.


## Signature Payload
- **RequestId**:
  - Description: Unique uuid-v4 string
  - Value: $requestId
  - 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 initiate for this call.
      - Value: Value: initiate
      - Tags: String, Mandatory
    - **ClientId**:
      - Description: Client Id assigned by juspay. Usual convention is merchant_id
      - Value: Example: stock
      - Tags: String, Mandatory
    - **Environment**:
      - Description: Environment to be used for the session. Accepted values are 'sandbox' or 'production'
      - Value: Example: sandbox
      - Tags: String, Mandatory
    - **IssuingPsp**:
      - Description: Bank on which the merchant has been onboarded.
      - Value: Example: YES_BIZ
      - Tags: String, Mandatory
    - **MerchantKeyId**:
      - Description: Key ID to identify the public-private key pair used for signature generation.
      - Value: Example: 1234
      - Tags: String, Mandatory
    - **Signature**:
      - Description: Generated signature for signature payload. See signature generation process in pre-requisites section.
      - 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.
          - Value: Example: stock
          - Tags: String, Mandatory
        - **Customer_id**:
          - Description: Any unique reference associated with your customer.
          - Value: Example: abcde12345
          - Tags: String, Mandatory
        - **Timestamp**:
          - Description: Time when request is created in milliseconds.
          - Value: Example: 1665996901100
          - Tags: String, Mandatory
      - Tags: String, Mandatory
  - Tags: JSON, Mandatory


## ClientAuthToken Payload
- **RequestId**:
  - Description: Unique uuid-v4 string
  - Value: $requestId
  - 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 initiate for this call.
      - Value: Value: initiate
      - Tags: String, Mandatory
    - **ClientId**:
      - Description: Client Id assigned by juspay. Usual convention is merchant_id
      - Value: Example: stock
      - Tags: String, Mandatory
    - **Environment**:
      - Description: Environment to be used for the session. Accepted values are 'sandbox' or 'production'
      - Value: Example: sandbox
      - Tags: String, Mandatory
    - **IssuingPsp**:
      - Description: Bank on which the merchant has been onboarded.
      - Value: Example: YES_BIZ
      - Tags: String, Mandatory
    - **MerchantId**:
      - Description: Unique identifier associated with an account created by juspay.
      - Value: Example: stock
      - Tags: String, Mandatory
    - **CustomerId**:
      - Description: Any unique reference associated with your customer.
      - Value: Example: abcde12345
      - Tags: String, Mandatory
    - **ClientAuthToken**:
      - Description: clientAuthToken
      - Tags: String, Mandatory
  - Tags: JSON, Mandatory



