Skip to content

Verify Qrcode#

Verify Qrcode API supports verification of E-Invoice’s signed qrcode data for which the E-Invoice is generated. Data fields that can be verified along with signed qrcode are irn, irnDate, sellerGstin, buyerGstin, docType, docNo, docDate, totInvValue, itemCnt and mainHsnCode. These fields are validated based on the values provided along with E-Invoice generation. Other than signedQRCode, all fields are optional and verification of these field values will be executed, only for those field which are available in request.

Verify Qrcode is an asynchronous API, hence task id will be returned as a response.
Using given task ID, fetch the task status using Status API. In order to download the result, you would need to use Download API.

Note

  • Duplicate qrcode will not be allowed in one API call.
  • More than 50 qrcode will not be allowed in one API call.

Route

“/enriched/einv/{flynn-version}/invoices/verify-qrcode”

  • active: ‘flynn-version’ : v1.0
  • method: Post

URL Parameters#

Name Description Type
flynn-version version of the API, for example (v1.0) string

Headers#

All headers as mentioned in the Trade Verification E-Invoice APIs introduction.

Tip

The only valid values for the header keys Content-Type and accept must have to be application/json.

Request#

Body consists of two sections, “payload” and “meta”.
payload contains E-Invoice’s signedQRcode information in a list for verification.
meta section of the request body consists of meta information for call i.e,
  • Tolerance :   While validating amount fields this value will be considered. This will be the allowable amount of variation(±), in Rupees, during comparison. This is an optional input and the default value is 0.
  • ToleranceInPercentage :   If this flag is set true then while validating amount fields tolerance will be considered as percentage. This is an optional input and the default value is false.
  • JSON:   If this flag is set to true and if verification is successful, decrypted value of signed QR code will get added in response. This is an optional input and the default value is false.

Sample Request Body

{
  "payload": [
    {
      "signedQRCode": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjE1MTNCODIxRUU0NkM3NDlBNjNCODZFMzE4QkY3MTEwOTkyODdEMUYiLCJ4NXQiOiJGUk80SWU1R3gwbW1PNGJqR0w5eEVKa29mUjgiLCJ0eXAiOiJKV1QifQ.eyJkYXRhIjoie1wiU2VsbGVyR3N0aW5cIjpcIjI3QUFBUEkzMTgyTTAwMlwiLFwiQnV5ZXJHc3RpblwiOlwiMTlBQUFQSTMxODJNMDA3XCIsXCJEb2NOb1wiOlwiQUYwM0I1REI2NTA0NzRFOFwiLFwiRG9jVHlwXCI6XCJJTlZcIixcIkRvY0R0XCI6XCIxMS8xMC8yMDIzXCIsXCJUb3RJbnZWYWxcIjoxMDAsXCJJdGVtQ250XCI6MSxcIk1haW5Ic25Db2RlXCI6XCIzMzA1MjAwMFwiLFwiSXJuXCI6XCJkMDZhOGQyYzE5MmNjMmQ3NzI1NWM1NGQ1MGM0ZGRkNzI1MTVkZDE0NDAyMTcyYzQ0YTk5ZDE3OWY4ZTRhNjFlXCIsXCJJcm5EdFwiOlwiMjAyMy0xMC0xMSAxMTo1NDo1NVwifSIsImlzcyI6Ik5JQyBTYW5kYm94In0.uBUVOz83xcDLI2UW28s2bnE882GoWBsKzL1Ukzahy0w3b-dvumtSWI5pGjoaXSRrs5-fW204s4Fvje2MW2iUCb1zETJvgYJXUp0J5LSEpqvCL-Fc_pVwEdnHitI2PuHjiPBCwkW2_zi8J2kZxYhc2quDMi0PlxaGUKbu64gkBjeroymFSxH_O6pDoQgem7pLEoEbqoNykgFRRMsHiM1a3Oa96Ithzxz9ZkomPsVrYRK0Sgo1i2tMuek_3HPLqRIbgen8An-64QhZnd-ST-4_g9AQIZruTTLGZ20BDBRbRH_xXrndApCfsYcaocCEzsAj_WboSLYoMvHzuSfQaHjVWQ",
      "irp": "nic",
      "irn": "d06a8d2c192cc2d77255c54d50c4ddd72515dd14402172c44a99d179f8e4a61e",
      "irnDt": "11/10/2023",
      "sellerGstin": "27AAAPI3182M002",
      "buyerGstin": "19AAAPI3182M007",
      "docType": "INV",
      "docNo": "AF03B5DB650474E8",
      "docDt": "11/10/2023",
      "totInvVal": 100,
      "itemCnt": 1,
      "mainHsnCode": 33052000
    }
  ],
  "meta": {
    "json": true,
    "tolerance": 1,
    "isToleranceInPercentage": false
  }
}

Only signedQRCode is the mandatory field in request json, other fields are optional.

Response#

200 :#

Successful response will have an async task-id. Using this task-id you will be able to fetch the status of the request.

Sample Response Body

{
  "status": "1",
  "data": {
  "task-id": "5ffde48d-abe9-4d66-97dd-79937855b287"
  },
  "error": null,
  "info": null,
  "additionalInfo": null,
  "alert": null
}
Download API Response:#

Download API response is unique for each API.
Content of result.json file in case in meta json is true and verification is successful.

Example

{
  "status": "1",
  "data": [
    {
      "status": "1",
      "data": {
        "details": null,
        "json": "d06a8d2c192cc2d77255c54d50c4ddd72515dd14402172c44a99d179f8e4a61e.json"
      },
      "error": null,
      "info": null,
      "additionalInfo": {
        "key": {
          "irn": "d06a8d2c192cc2d77255c54d50c4ddd72515dd14402172c44a99d179f8e4a61e"
        },
        "details": {
          "irp": "nic"
        }
      },
      "alert": null
    }
  ],
  "error": null,
  "info": null,
  "additionalInfo": null,
  "alert": null
}

Content of result.json file in case in meta json is false and verification is successful

Example

{
  "status": "1",
  "data": [
    {
      "status": "1",
      "data": {
        "details": null,
        "json": null
      },
      "error": null,
      "info": null,
      "additionalInfo": {
        "key": {
          "irn": "d06a8d2c192cc2d77255c54d50c4ddd72515dd14402172c44a99d179f8e4a61e"
        },
        "details": {
          "irp": "nic"
        }
      },
      "alert": null
    }
  ],
  "error": null,
  "info": null,
  "additionalInfo": null,
  "alert": null
}

Content of result.json file in case of verification failed

Example

{
  "status": "1",
  "data": [
    {
      "status": "0",
      "data": null,
      "error": {
        "type": "ClientRequest",
        "message": "err-signed-qrcode-verification-failed",
        "args": {}
      },
      "info": null,
      "additionalInfo": {
        "key": {
          "irn": "d06a8d2c192cc2d77255c54d50c4ddd72515dd14402172c44a99d179f8e4a61e"
        },
        "details": {
          "irp": null
        }
      },
      "alert": null
    }
  ],
  "error": null,
  "info": null,
  "additionalInfo": null,
  "alert": null
}

Content of result.json file in case of verification failed for given irp

Example

{
  "status": "1",
  "data": [
    {
      "status": "0",
      "data": null,
      "error": {
        "type": "ClientRequest",
        "message": "err-signed-qrcode-verification-failed-for-given-irp",
        "args": {
          "irp": "nic"
        }
      },
      "info": null,
      "additionalInfo": {
        "key": {
          "irn": "d06a8d2c192cc2d77255c54d50c4ddd72515dd14402172c44a99d179f8e4a61e"
        },
        "details": {
          "irp": null
        }
      },
      "alert": null
    }
  ],
  "error": null,
  "info": null,
  "additionalInfo": null,
  "alert": null
}

Content of result.json file in case of field validation failed

Example

{
  "status": "1",
  "data": [
    {
      "status": "0",
      "data": null,
      "error": {
        "type": "ClientRequest",
        "message": "err-signed-qr-code-validation-failed",
        "args": {
          "invalid irnDate": "28/03/2023",
          "invalid buyerGstin": "29AAAPI3182M000",
          "invalid docNo": "MG0015",
          "invalid docDt": "21/07/2021",
          "invalid totInvVal": "32342.32",
          "invalid mainHsnCode": "34013090"
        }
      },
      "info": null,
      "additionalInfo": {
        "key": {
          "irn": "d06a8d2c192cc2d77255c54d50c4ddd72515dd14402172c44a99d179f8e4a61e"
        },
        "details": {
          "irp": null
        }
      },
      "alert": null
    }
  ],
  "error": null,
  "info": null,
  "additionalInfo": null,
  "alert": null
}    

Irn.json file in case in meta json is true

Example

 {
  "invoiceQRCodeDetails": {
    "SellerGstin": "27AAAPI3182M002",
    "BuyerGstin": "19AAAPI3182M007",
    "DocTyp": "INV",
    "DocNo": "AF03B5DB650474E8",
    "DocDt": "11/10/2023",
    "TotInvVal": 100,
    "ItemCnt": 1,
    "MainHsnCode": "33052000",
    "Irn": "d06a8d2c192cc2d77255c54d50c4ddd72515dd14402172c44a99d179f8e4a61e",
    "IrnDt": "2023-10-11 11:54:55"
  }
}