Skip to content

A glossary story9 chapters · 6 min read

WhatsApp QR Code

A scannable code that opens a WhatsApp chat with a business and pre-filled text, created through the Cloud API and put on packaging, counters or ads.

Also called: WhatsApp message QR code · WhatsApp business QR code · wa.me/message short link · message_qrdls

Reviewed

Follow along

Create a QR code and see what comes back

2 / 2
POSThttps://graph.facebook.com/v26.0/106540352242922/message_qrdls

POST 200 in 650 ms

Request

3 headers · body
POST /v26.0/106540352242922/message_qrdls HTTP/1.1
Host: graph.facebook.com
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json
{
"prefilled_message": "Hi! I'd like the menu [QR-BANDRA]",
"generate_qr_image": "SVG"
}

Response

200 OK
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
{
"code": "4O4YGZEG3RIVE1",
"prefilled_message": "Hi! I'd like the menu [QR-BANDRA]",
"deep_link_url": "https://wa.me/message/4O4YGZEG3RIVE1",
"qr_image_url": "https://scontent.xx.fbcdn.net/..."
}
Try another response
Press Send to create a message QR code on a business number. The response carries the code, the wa.me short link and the image URL; switch scenarios to see an invalid parameter and an expired access token.

Response: 200 OK after 650 ms.

Chapter 1 · The scenario

Example: Table codes at a Mumbai café chain

A café chain with 14 outlets in Mumbai creates one QR code per outlet through the API, each pre-filled with text such as 'Hi! I'd like the menu [QR-BANDRA]', and prints them on table tents. When a guest scans and sends, the webhook handler reads the reference, tags the chat with the outlet, and a bot replies with that outlet's menu as a list message and a payment link. In the first month about 3,200 chats arrive from table codes, half of them from two outlets. For the monsoon menu, operations updates each code's pre-filled message to mention it while the printed tents stay the same. When one outlet closes, its codes are deleted, so stray scans show an expired-code notice instead of reaching a closed store.

— Table codes at a Mumbai café chain

Chapter 2 · What is a WhatsApp QR code?

A WhatsApp QR code is a scannable code that, when scanned with a phone camera or from inside WhatsApp, opens a chat with a business's WhatsApp number with a message already typed, such as 'Hi! I'd like the menu (table 12)'. The customer taps send and the conversation starts. Businesses print them on packaging, bills, standees, delivery bags, posters and outdoor or TV ads.

On the WhatsApp Business Platform, codes are managed through the message_qrdls edge of a phone number. POST /{PHONE_NUMBER_ID}/message_qrdls creates one from a prefilled_message and, with generate_qr_image set to SVG or PNG, returns a qr_image_url alongside a short link of the form https://wa.me/message/{code}. The same edge lists, updates and deletes codes, so a code printed on a thousand boxes can have its pre-filled message changed later without reprinting. Codes can also be managed in Meta's Business Manager interface.

A message QR code differs from a plain Click-to-Chat link (https://wa.me/<number>?text=...), which anyone can build for any number and which shows the phone number and text in the URL. The message QR code hides both behind a short code, is tied to your registered business number and can be edited or retired centrally. Either way, the customer's first message opens a 24-hour customer service window; a scan is not a marketing opt-in on its own.

Key takeaways

  • A WhatsApp QR code opens a chat with your business number with a pre-filled message, ready for the customer to send.
  • The Cloud API creates codes with POST /{PHONE_NUMBER_ID}/message_qrdls and returns a wa.me/message short link plus an SVG or PNG image.
  • Pre-filled messages are capped at 140 characters, and one business number can have at most 2,000 QR codes and short links.
  • Codes never expire on their own; once deleted, anyone who scans one sees a message that the code has expired.
  • Meta provides no scan analytics, so put a unique reference in each code's pre-filled text and count the chats that arrive with it.

Chapter 3 · How it unfolds

How does a WhatsApp QR code work?

  1. Decide the context for each code

    Create one code per place, product or campaign (Andheri store, table 12, Diwali hamper box) and put a short reference such as [QR-ANDH-01] in the pre-filled text so the chat can be attributed.

  2. Create it through the API

    Call POST /{PHONE_NUMBER_ID}/message_qrdls with a prefilled_message of up to 140 characters and generate_qr_image set to SVG for print or PNG for screens. Store the returned code, deep_link_url and image.

  3. Print it so it scans

    Use the SVG, keep the code dark on a light background with a clear margin, size it for the scanning distance (around 2 cm across is a practical minimum on packaging, far larger on posters) and print a line saying what happens: 'Scan to order on WhatsApp'.

  4. Attribute and answer the chats

    When the first message arrives by webhook, match the reference in the text to the code, tag the conversation, and reply with a bot or an agent inside the 24-hour window.

  5. Edit or retire centrally

    Send POST /{PHONE_NUMBER_ID}/message_qrdls with the same code and a new prefilled_message when a campaign changes, and DELETE /{PHONE_NUMBER_ID}/message_qrdls/{code} when it ends.

Chapter 4 · In code

A WhatsApp QR code in code

# Create a code with a pre-filled message (max 140 characters) and an SVG image
curl -X POST "https://graph.facebook.com/v26.0/{PHONE_NUMBER_ID}/message_qrdls" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d '{ "prefilled_message": "Hi! I want to order a Diwali hamper [QR-HAMPER-26]",
"generate_qr_image": "SVG" }'
# List every code on the number
curl "https://graph.facebook.com/v26.0/{PHONE_NUMBER_ID}/message_qrdls" \
-H "Authorization: Bearer {ACCESS_TOKEN}"
# Change the pre-filled text of an existing code: same image, no reprint
curl -X POST "https://graph.facebook.com/v26.0/{PHONE_NUMBER_ID}/message_qrdls" \
-H "Authorization: Bearer {ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d '{ "code": "4O4YGZEG3RIVE1",
"prefilled_message": "Hi! I want to order a New Year hamper [QR-HAMPER-26]" }'
# Retire it: later scans show that the QR code has expired
curl -X DELETE "https://graph.facebook.com/v26.0/{PHONE_NUMBER_ID}/message_qrdls/4O4YGZEG3RIVE1" \
-H "Authorization: Bearer {ACCESS_TOKEN}"

Create returns code, prefilled_message, deep_link_url and qr_image_url; list and update return the first three; delete returns success: true.

Chapter 5 · The facts

A WhatsApp QR code: key facts and limits

Create endpointPOST /{PHONE_NUMBER_ID}/message_qrdls
Pre-filled messageUp to 140 characters
Image formatsSVG or PNG (generate_qr_image)
Short link formathttps://wa.me/message/{code}
Codes per business numberUp to 2,000 QR codes and short links
ExpiryNone automatic; delete a code to retire it
Scan analyticsNot provided by Meta

Chapter 6 · Where it goes wrong

Common mistakes with a WhatsApp QR code

  • One code for everything

    A single code on every poster, box and counter tells you nothing about which placement works. Create one code per placement or campaign; the 2,000-code ceiling leaves plenty of room.

  • Relying on the reference surviving

    Customers can edit the pre-filled text before sending, and some delete the bracketed reference. Keep it short and at the end, and treat attribution from it as a minimum count.

  • Styling the code until it fails

    Inverted colours, low contrast, logos over the modules and tiny print sizes cause failed scans. Meta advises against restyling the code; test every print proof with several phones.

  • Deleting a code that is still in print

    A deleted code shows customers an expired message. If boxes or posters are still out there, update the pre-filled text instead and delete only when the print run is gone.

  • Treating a scan as opt-in

    A scan starts a conversation, not a marketing subscription. Ask in the chat whether the customer wants offers, record the answer, and only then add them to marketing segments.

Chapter 7 · What good teams do

Best practices for a WhatsApp QR code

  • Print the call to action next to the code; a bare code gets fewer scans than one that says what happens.
  • Keep a register of code, location, print run and reference so everyone knows which code is where.
  • Use SVG for print and test scanning in the real lighting: shop counters at night, delivery bags in sunlight.
  • Write the pre-filled text the way a customer would speak, so most people send it unchanged.

Chapter 8 · Why it matters

Why does a WhatsApp QR code matter?

Offline is where many Indian customers first meet a business: a kirana counter, a restaurant table, a medicine strip, a property hoarding. A QR code turns that moment into a WhatsApp conversation in one scan, carrying context such as which store, table or product in the pre-filled text. Because codes are managed through the API, a marketing or operations team can create one per location or campaign, change the wording centrally and switch codes off when a promotion ends, and a developer can attribute every chat to the code that started it.

Chapter 9 · WhatsApp QR Code FAQs

WhatsApp QR Code FAQs

How do I create a WhatsApp QR code for my business?+
Create it through the Cloud API with `POST /{PHONE_NUMBER_ID}/message_qrdls`, or in Meta's Business Manager interface. Give a pre-filled message of up to 140 characters and choose SVG or PNG; you get back the image, a short link and a code ID for later edits.
What is the difference between a WhatsApp QR code and a wa.me link?+
A wa.me click-to-chat link shows the phone number and text in the URL and cannot be changed once printed. A message QR code points to a short `wa.me/message/` link tied to your business number, whose pre-filled text you can update or retire centrally.
Can I track how many people scan my WhatsApp QR code?+
Not directly. Meta does not provide scan analytics for QR codes and short links, so count the chats that arrive carrying each code's reference instead; scans that never send a message are invisible.
Do WhatsApp QR codes expire?+
No, not on their own. A code keeps working until you delete it; after deletion, scanning shows a message that the QR code has expired. Update the pre-filled text instead while the code is still in print.
Does a QR code scan count as WhatsApp opt-in?+
No. The customer's first message lets you reply inside the 24-hour customer service window, but it is not consent to marketing. Ask in the chat, record the answer, and send marketing templates only to people who agreed.

From definition to your first message

InfiQ is an official Meta Business Partner. Start a 7-day free trial — no card needed — and see this running on your own number.