Generate B2C Payment QR Code (Lite)

Generating B2C QR code

You can generate a QR code by sending a POST request to E-Invoicing API with the following request headers.

Request URL

POST: {{HOST}}/einv/v1/qrcode/generate

Request Header

Parameter

Parameter Type

Type

Description

X-Cleartax-Auth-Token

Header

String

Mandatory. The auth token generated from ClearTax user id and password.

Gstin

Header

String

Mandatory. GSTIN number for the user.

Content-Type

Header

String

Mandatory. This will always be "application/json" for JSON.

Request Parameters

Parameter

Parameter Type

Type

Description

company_logo

Body

String

Optional. Base 64 encoded logo can be provided here.

payee_address

Body

String

Mandatory. Payee VPA(Virtual Payment Address)

payee_name

Body

String

Mandatory. Payee Name

transaction_note

Body

String

Optional. Transaction note providing a short description of the transaction.

transaction_amount

Body

String

Mandatory. Transaction amount in decimal format.

payee_bank_account_number

Body

String

Optional. Payee bank account number

payee_ifsc_code

Body

String

Optional. Payee IFSC code

document_number

Body

String

Optional. Document number

document_date

Body

String

Optional. Document date

gstin

Body

String

Optional. Seller GSTIN number

gst_value

Body

String

Optional. Total GST tax value

cgst_value

Body

String

Optional. CGST value

sgst_value

Body

String

Optional. SGST value

igst_value

Body

String

Optional. IGST value

cess_value

Body

String

Optional. CESS value

Sample Request

{
    "payee_name": "sandeep%20jayendran",
    "payee_address": "sandjay@okhdfcbank",
    "transaction_amount": "100.5",
    "transaction_note": "TransactionNote",
    "payee_bank_account_number": "123456789",
    "payee_ifsc_code": "HDFC12345",
    "document_number": "Doc123",
    "document_date": "23/03/2021",
    "gstin": "29AAFCD5862R000",
    "gst_value": "18",
    "cgst_value": "9",
    "sgst_value": "9",
    "igst_value": "0",
    "cess_value": "0"
}

Sample Response

B2C QR code response is a PNG image encoded in base64 format.

{
    "qr_code": "iVBORw0KGgoAAAANSUhEUgAAAcIAAAHCAQAAAABUY/ToAAAHB0lEQVR4Xu2aTc7iTAyEjViw5Ai5CVwMiUi5WLhJjsAyC0RPPeUw0htGXz7NZhZOSxPlp6tfqcauLruJ9pdjjPWb/zt25NbYkVtjR26NHbk1duTW2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m78IqRbSfYJDckytzNtFP+FP2R2AeRIQjJ1tlkAHpDpmGuEpeyo7VSsq+UiyL8YO3Jr7MitsSO3xo7cGjtya+zIrbEjt8aO3Br/BPkL0XSwqOHhDjEAAAAASUVORK5CYII=",
    "raw_qrCode": "upi://pay?pa=sandjay@okhdfcbank&pn=7843842529@paytm&tn=Transaction Note - TransactionNote, Supplier Name - 7843842529@paytm, Supplier GSTIN - 29AAFCD5862R000, Bank Account Number - 123456789, UPI ID - sandjay@okhdfcbank, IFSC Code - HDFC12345, Invoice Number - Doc123, Invoice Date - 23/12/2022, Transaction Amount - 1000, GST Amount - 18, CGST Amount - 9, SGST Amount - 9, IGST Amount - 0, CESS Amount - 0&am=1000&cu=INR&mode=01",
    "error_details": null
}

API Generated QR code

When you scan the above QR Code, the payload corresponds to:

upi://pay?pa=vatsan@okhdfcbank&pn=sandeep%20jayendran&tn=Transaction+Note%3A+TransactionNote%2C+Supplier+GSTIN%3A+29AAFCD5862R000%2C+Bank+Account+Number%3A+123456789%2C+IFSC+Code%3A+HDFC12345%2C+Invoice+Number%3A+Doc123%2C+Invoice+Date%3A+23%2F03%2F2021%2C+GST+Amount%3A+18%2C+CGST+Amount%3A+9%2C+SGST+Amount%3A+9%2C+IGST+Amount%3A+0%2C+CESS+Amount%3A+0&am=100.5&cu=INR&mode=01

Last updated