---
page_source: https://docs.juspay.io/upi-inapp/android/headless-process-payloads/signed-intent-qr-signature-generation
page_title: Signed Intent/QR Signature Generation
---


## Signed Intent/QR Signature Generation



This API is used to sign customer's and non-verified merchant's QR/Intent URL. Merchants will have to sign their QR/Intent QR using their own private key and they have to share their public key with PSP. This API will create a signature using the PSP's private key and will return the signature in response.


###   Process Parameters



## 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: Value: upiGenerateUrlSignature
      - Tags: String, Mandatory
    - **Url**:
      - Description: UPI QR/Intent URL
      - Tags: String, Mandatory
    - **MerchantKeyId**:
      - Description: Key ID to identify the public-private key pair used for signature generation.
      - Tags: String, Mandatory
    - **UdfParameters**:
      - Description: Stringified json for udf parameters
      - Tags: String, Optional
    - **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
  - 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 to be performed in the SDK.
      - Value: Value: upiGenerateUrlSignature
      - Tags: String, Mandatory
    - **Status**:
      - Description: Status of the Operation. Possible values : SUCCESS, FAILURE
      - Tags: String, Mandatory
    - **Url**:
      - Description: URL that has been appended with &sign=
      - Tags: String, Mandatory
    - **Signature**:
      - Description: Signature of the URL
      - Tags: String, Mandatory
    - **ResponseCode**:
      - Description: SUCCESS if the call succeeded. Otherwise shows the error code.
      - Tags: String, Mandatory
    - **ResponseMessage**:
      - Description: SUCCESS if the call succeeded. Otherwise shows verbose error.
      - Tags: String, Mandatory
    - **OtherInfo**:
      - Description: As passed in request
      - Tags: 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
{
  "service": "in.juspay.hyperapi",
  "requestId": "693e4b2c-55af-42c0-85a9-a97972e2906f",
  "payload": {
    "udfParameters": "{}",
    "signaturePayload": "<signaturePayload>",
    "signature": "GFe...==\n",
    "url":  "upi://pay?pa=abc@xyz&pn=Lname%20Fname&mc=9999&tid
            =cxnkjcnkjdfdvjndkjfvn&tr=4894398cndhcd23&tn=Pay%20to%20mystar
            %20store&am=10&mam=null&cu=INR&url=https://mystar.com&mode=05&
            regid=000000&mid=1234&msid=3432&mtid=1212&orgId=<unique orgID>"        
    "merchantKeyId": "4794",
    "action": "upiGenerateUrlSignature"
  }
}

"signaturePayload": {
  "merchant_id": "stock",
  "customer_id": "XXXXXXXX",
  "timestamp": "1641533238616"
}
```

#### Kotlin Code Snippet:

```kotlin
{
  "service": "in.juspay.hyperapi",
  "requestId": "693e4b2c-55af-42c0-85a9-a97972e2906f",
  "payload": {
    "udfParameters": "{}",
    "signaturePayload": "<signaturePayload>",
    "signature": "GFe...==\n",
    "url":  "upi://pay?pa=abc@xyz&pn=Lname%20Fname&mc=9999&tid
            =cxnkjcnkjdfdvjndkjfvn&tr=4894398cndhcd23&tn=Pay%20to%20mystar
            %20store&am=10&mam=null&cu=INR&url=https://mystar.com&mode=05&
            regid=000000&mid=1234&msid=3432&mtid=1212&orgId=<unique orgID>"        
    "merchantKeyId": "4794",
    "action": "upiGenerateUrlSignature"
  }
}

"signaturePayload": {
  "merchant_id": "stock",
  "customer_id": "XXXXXXXX",
  "timestamp": "1641533238616"
}
```


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

#### Request Code Snippet:

```request
{
  "service": "in.juspay.hyperapi",
  "requestId": "693e4b2c-55af-42c0-85a9-a97972e2906f",
  "payload": {
    "udfParameters": "{}",
    "signaturePayload": "<signaturePayload>",
    "signature": "GFe...==\n",
    "url":  "upi://pay?pa=abc@xyz&pn=Lname%20Fname&mc=9999&tid
            =cxnkjcnkjdfdvjndkjfvn&tr=4894398cndhcd23&tn=Pay%20to%20mystar
            %20store&am=10&mam=null&cu=INR&url=https://mystar.com&mode=05&
            regid=000000&mid=1234&msid=3432&mtid=1212&orgId=<unique orgID>"        
    "merchantKeyId": "4794",
    "action": "upiGenerateUrlSignature"
  }
}

"signaturePayload": {
  "merchant_id": "stock",
  "customer_id": "XXXXXXXX",
  "timestamp": "1641533238616"
}
```

### Response snippets:

#### Response:
```plaintext
{
  "service": "in.juspay.hyperapi",
  "requestId": "693e4b2c-55af-42c0-85a9-a97972e2906f",
  "payload": {
    "action" : "upiGenerateUrlSignature"
    "status" : "SUCCESS",
    "responseCode" : "SUCCESS",
    "responseMessage" : "SUCCESS",
    "signature": "<signature of the url provided in request>"
    "url": "<url appended with signature>",
    "udfParameters" : "{}"
  },
  "event": "process_result",
  "errorMessage": "",
  "errorCode": "",
  "error": false
}
```

