---
page_source: https://docs.juspay.io/upi-inapp/flutter/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 with signature is being passed in the request already, there is no need to pass clientAuthToken in the payload.






###   Payload structure with signature



### 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.
    - **Signature**:
      - Description: Signature generated for the signaturePayload .
    - **SignaturePayload**:
      - Description: Parameters required to call Hyper SDK API
      - Value:
        - **Merchant_id**:
          - Description: Unique identifier associated with an account created by juspay. Ex: stock
          - Value: 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: -

#### Flutter Code Snippet:

```flutter
{
  "requestId": "8cbc3fad-8b3f-40c0-ae93-2d7e75a8624a",
  "service": "in.juspay.hyperapi",
  "payload": {
    ...
    "merchantKeyId": "<Merchant Key Id>",
    "signature": "<Generated signature for signature payload>",
    "signaturePayload": "<Stringified signature payload>",
    ...
  }
}

"signaturePayload": {
  "merchant_id": "stock",
  "customer_id": "abcde12345",
  "timestamp": "1668389349848"
}
```



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




#### Code Snippets: -

#### Flutter Code Snippet:

```flutter
{
  "requestId": "8cbc3fad-8b3f-40c0-ae93-2d7e75a8624a",
  "service": "in.juspay.hyperapi",
  "payload": {
    ...
    "clientAuthToken": "<clientAuthToken>"
    ...
  }
}
```
