Skip to content

Verify Scanned Qrcode#

Verify Scanned 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.

Route

“/enriched/einv/{flynn-version}/invoices/verify-scanned-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#

Please refer the following request body for reference-

Sample Request Body

{
  "payload": {
    "signedQRCode": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjE1MTNCODIxRUU0NkM3NDlBNjNCODZFMzE4QkY3MTEwOTkyODdEMUYiLCJ0eXAiOiJKV1QiLCJ4NXQiOiJGUk80SWU1R3gwbW1PNGJqR0w5eEVKa29mUjgifQ.eyJkYXRhIjoie1wiU2VsbGVyR3N0aW5cIjpcIjI3QUFBUEkzMTgyTTAwMlwiLFwiQnV5ZXJHc3RpblwiOlwiMTlBQUFQSTMxODJNMDA3XCIsXCJEb2NOb1wiOlwiRjc1MTk4OEMwMEQzMTQ5N1wiLFwiRG9jVHlwXCI6XCJJTlZcIixcIkRvY0R0XCI6XCIyOC8wMy8yMDIzXCIsXCJUb3RJbnZWYWxcIjoxMDAsXCJJdGVtQ250XCI6MSxcIk1haW5Ic25Db2RlXCI6XCIzMzA1MjAwMFwiLFwiSXJuXCI6XCI0MmIyNGM3NWExZGZiZWI5NWEyNTYyOGRhMDhiNGVmYTE0Yzg4YTc0YjQyZjk5YzY4NjcwNzZmMTMyZjQ1OTA5XCIsXCJJcm5EdFwiOlwiMjAyMy0wMy0yOCAxMjoxMDoxN1wifSIsImlzcyI6Ik5JQyBTYW5kYm94In0.LpOHy_v8a_eCjHsuBo3gakWDSezGaKdVJKpi1QOCcAQQlWBxq2_w8HRw6RC7uyASTTSrCplS2gmtrlKpCk3gg8yqeqALHetu8KWhQO5ZrIEwginZjfneG2suj7kYQKONTp7LgX4b0b_LrFfDSEZlvkrQXQEZDGH1Xjyti9xXa7wS8tN2v-zRE20JTIj5QvuNIToiHQOwKF6n9vdpA5Ce8--eyhmnQhGegIVey8d_A9vFZ4OKpSvd_Nsy5YJsfH6pJ81pOlPnapM1DeH-5UFG8k7BhMLBEBY-oyZQP6JCtPDk1gakDXx7D-Ivj8NCqZEC8DsED9zJCa4V41rI-XcmvQ",
    "irp": "nic",
    "irn": "42b24c75a1dfbeb95a25628da08b4efa14c88a74b42f99c6867076f132f45909",
    "irnDt": "28/03/2023",
    "sellerGstin": "27AAAPI3182M002",
    "buyerGstin": "19AAAPI3182M007",
    "docType": "INV",
    "docNo": "F751988C00D31497",
    "docDt": "28/03/2023",
    "totInvVal": 100,
    "itemCnt": 1,
    "mainHsnCode": 33052000
  },
  "meta": { 
    "tolerance": 10,
    "isToleranceInPercentage": true
  }
}

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

Response#

200 :#

Successful response will have the decrypted signed qrcode details.

Sample Response Body

{
  "status": "1",
  "data": {
    "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"
  },
  "error": null,
  "info": null,
  "additionalInfo": {
    "key": {
      "irn": "d06a8d2c192cc2d77255c54d50c4ddd72515dd14402172c44a99d179f8e4a61e"
    },
    "details": {
      "irp": "nic"
    }
  },
  "alert": null
}

Sample Verification Error Response

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

Sample Validation Error Response

  {
  "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": "42b24c75a1dfbeb95a25628da08b4efa14c88a74b42f99c6867076f132f45909"
    },
    "details": {
      "irp": null
    }
  },
  "alert": null
}