Generate QR Code (Phase I)

A new version is available!

This API is valid only for Phase I requirements of ZATCA. In case you are implementing for Phase II, use the latest Generate E-Invoice API built for Phase II.

You can generate the QR code by sending the POST request to Generate QR Code API.

Request URL

https://api-demo.cleartax.com/middle-east/ksa/einvoicing/v1/b2c/qrcode/generate

Request Headers

x-cleartax-auth-token: {{USER_AUTH_TOKEN}}
Content-Type: application/json
owner_id: {{OWNER_ID}}
vat: {{VAT}}
ParameterData TypeField ValidationsDescription

Accept

String

Cannot be empty

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

gstin

String

Cannot be empty

GSTIN for which you are generating IRN.

branch

String

Should be a valid branch from the user account

Optional. Branch name (store name) added in the user account which maps to a VAT or Group VAT of the entity.

X-Cleartax-Auth-Token

String

Cannot be empty

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

Content-Type

String

Cannot be empty

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

Request Parameters

Param NameTypeValidationDescription

InvoiceTotalAmt

Numeric

SellerName

String

TimeStampInvoice

VatNumber

Numeric

VatTotalAmt

Numeric

Request Payload

{
    "InvoiceTotalAmt": "200",
    "SellerName":"test1" ,
    "TimeStampInvoice": "2021-11-12 20:30:30",
    "VatNumber": 300459803800003,
    "VatTotalAmt": 100
}

Sample Response

Valid Response (200)
{
    "Id": null,
    "QrCode": "iVBORw0KGgoAAAANSUhEUgAAAcIAAAHCAQAAAABUY/ToAAACX0lEQVR4Xu2YUW7jMAxEBfQAOZKvniP5AAVczZCy7FQNu/u32DcfjCTO49dAFtKOv9SzvZ78VpCVICtBVoKsBFkJshJkJchKkJUgK0FW+kfJvaW2/SO2w/IZq9FXV4KEDE0yT0z2cp2RZzcfJGQCV7IpWt3Q4/Z8qDQpVvdpkJDvSR/n6logIaOUpFZ2tUf3zwIJWZLWMLRovERw+iAhw3chFTdp22cEbyUFuYIgbxrB688pbwV5dRckZOgklT49xHvSWjzEY4bf5ZnND/m/pQ8Scir81p4uX15uzDfVMI+VN5CQ3kTvU64sMS1naK4GQUKuyF09/6k0MtcRuc70uTsFCflC9uPwyzCSNksOymmQkCvSm/b9tjpL3G+QkD+Svp4UvCM/hWOQ9JDVX0ZIyJ/IyJf8Aem2Utw8KMpMJCTkgoz0HSN4EbeEorE5m5CQb0nnS6vz3vKvdSiWPoOEfEPq3tJ37nRdytsbDBLS0Objscoyuoe+jH1k+iEhl+ThzKk0J20U+TOWKpCQK3JAhy+v7YQcvEifgrdIHyRkSC5FK3GlT2UqtpsHQUIuSG8crd34fD/panMOD2fzNENChnmQ0ZNVBrvORN5y+C19kJCv2m0dRXj6tdpOGyRk6Jq+kNOn59QsJsddphmQkCsyT249Z+6aw+xENxeQkKFuyJAdjptctqo848RdSMjfkN6OkuQxH+IWZJxBLshYSeencFrUhYT8ibR6z5Rc3ka5z5AgIUOTtL8ryXZ1ea7IZfog1YX8c0FWgqwEWQmyEmQlyEqQlSArQVaCrARZ6b8hvwCUlsiVqwdaxAAAAABJRU5ErkJggg==",
    "RawQrCode": "AQV0ZXN0MQIPMzAwNTIwOTUyNjAwMDAzAxMyMDIxLTExLTE3IDEyOjM2OjAwBAMyMDAFAzEwMA=="
}

Last updated