Google has a QR Code API that its free and easy to use, E.X:

Official Google Docs

this url will return this image

qr code

The main url is
it is followed by the size specification which is required
and the specification that is a QR code (which is also required)

it is required for the QR code to have a kind of data to display E.X:

The data to encode. Data can be digits, alphanumeric characters, binary bytes of data, or Kanji. You cannot mix data types within a QR code. The data must be UTF-8 URL-encoded.

Note that URLs have a 2K maximum length, so if you want to encode more than 2K bytes (minus the other URL characters), you will have to send your data using POST.

(optional)next option in the url is the encoding which can be:

(optional)The last option is error correction which can be:
L - [Default] Allows recovery of up to 7% data loss
M - Allows recovery of up to 15% data loss
Q - Allows recovery of up to 25% data loss
H - Allows recovery of up to 30% data loss