E-Invoice/E-WayBill APIs

API – Generate Payment QR Code

This API is used to generate the dynamic QR code for B2C invoices to support online UPI payment.

URL

POST https://app.octagst.com/api/einvoice/generatepaymentqrcode

Query Parameters

NameDescriptionTypeValue
qrcodeSpecify yes to include QR Code image in responseOptionalyes, no (Default)
qrcodeformatSpecify QR code image formatOptionalPNG (Default), JPEG, GIF
qrcodequalitySpecify QR code image qualityOptionalstandard, high (Default)
pdfSpecify yes to include e-invoive pdf and e-waybill pdf in responseOptionalyes, no (Default)

Request Payload

Request payload should contain the JSON encoded invoice data. This payload is similar to the Generate IRN API with the only differece of supply type which has to be set to B2C.

{
  //...
  "TranDtls": {
    "SupTyp": "B2C"
    //...
  },
  //...
  "BuyerDtls": {
    "Gstin": null
    //...
  }
  //...
}

Success Response

Response payload will contain the success status along with IRN information.

Structure

ParameterData TypeDescription
SuccessBooleantrue in case of success
QRCodeImagePngString (Binary data in Base64 encoding)e-Invoice QR code PNG image
QRCodeImageJpegString (Binary data in Base64 encoding)e-Invoice QR code JPEG image
QRCodeImageGifString (Binary data in Base64 encoding)e-Invoice QR code GIF image
PaymentQrCodeString (Binary data in Base64 encoding)Contents of dynamic QR code
ErrorsError[]List of errors, will be present only when Success is false

Error Object:

ParameterData TypeDescription
CodeStringError Code
MessageStringError message

Sample – Success

{
  "Success": true,
  "QRCodeImagePng": "iVBORw0KGgoAAAANSUhEUgAAAHIAAAB...IPwEIVCUYnlSs/gAAAABJRU5ErkJggg==",
  "PaymentQrCode": "upi://pay?pa=blowbits@ybl&pn=BLOWBITS%20SOLUTIONS%20LLP&tn=SELLER:08AASFB9647G1ZU%20NO:B2C1617260496%20DT:01-04-2021%20Taxable:%e2%82%b95000%20IGST:%e2%82%b9900&am=5900&cu=INR&mode=01"
}

Sample – Failure

If the API request fails for some reasons, the response payload will contain the failure status and a list of errors.

{
  "Success": false,
  "Errors": [
    {
      "Code": "ERR_CODE_1",
      "Message": "ERR MESSAGE 1"
    },
    {
      "Code": "ERR_CODE_n",
      "Message": "ERR MESSAGE n"
    }
  ]
}