QR Code Payments
A technical guide to EMVCo QR Code standards, Merchant Presented and Consumer Presented modes, and the regional QR payment ecosystems powering PIX, PromptPay, UPI, PayNow, QRIS and more.
EMVCo QR Code Specification
EMVCo published two specifications in 2017: one for Merchant Presented Mode (MPM) and one for Consumer Presented Mode (CPM). Both use a TLV-like encoding — 2-digit ID, 2-digit decimal length, value. In MPM, template fields (26–51, 62, 64, 80–99) hold sub-fields in the same format.
Encoding Format
Every field is encoded as ID (2) + Length (2) + Value (N) where Length is the number of characters in Value (decimal, zero-padded to 2 digits). Fields are concatenated without separators.
MPM Root-Level Fields
| ID | Field Name | Format | Notes |
|---|---|---|---|
00 | Payload Format Indicator | Fixed "01" | Must be first field, always "01" |
01 | Point of Initiation Method | "11" or "12" | 11 = static, 12 = dynamic |
02–25 | Merchant Account Information | Plain value | Reserved for card networks (02–03 Visa, 04–05 Mastercard, 09–10 Discover, 11–12 Amex, 13–14 JCB, 15–16 UnionPay; 06–08 and 17–25 by EMVCo): the merchant identifier itself, no sub-fields |
26–51 | Merchant Account Information | Template | Any payment network: sub-field 00 GUID + network-specific sub-fields. At least one 02–51 field is mandatory |
52 | Merchant Category Code | 4 digits | ISO 18245 MCC (e.g. 5411 = grocery) |
53 | Transaction Currency | 3 digits | ISO 4217 numeric (764=THB, 986=BRL, 356=INR) |
54 | Transaction Amount | Numeric string | Up to 13 chars, digits and one "."; leave out to let the payer enter the amount |
55 | Tip or Convenience Indicator | "01"/"02"/"03" | 01=prompted, 02=fixed fee, 03=percentage fee |
56 | Value of Convenience Fee Fixed | Numeric | Only present if field 55 = "02" |
57 | Value of Convenience Fee % | Numeric | Only present if field 55 = "03" |
58 | Country Code | 2 alpha | ISO 3166-1 alpha-2 (TH, BR, SG, IN…) |
59 | Merchant Name | ≤ 25 chars | Displayed to payer in their app |
60 | Merchant City | ≤ 15 chars | City of the merchant |
61 | Postal Code | ≤ 10 chars | Optional |
62 | Additional Data Field Template | Template | Bill number, reference, terminal label, purpose |
63 | CRC-16 | 4 hex chars | Must be last. CRC-16/CCITT-FALSE over the entire string up to and including "6304" |
64 | Merchant Info Language Template | Template | Alternate language name/city (e.g. Thai script) |
Additional Data Template (ID 62) Sub-fields
| Sub-ID | Name | Max Length | Purpose |
|---|---|---|---|
01 | Bill Number | 25 | Invoice or bill reference |
02 | Mobile Number | 25 | Payer mobile for confirmation |
03 | Store Label | 25 | Merchant store identifier |
04 | Loyalty Number | 25 | Loyalty card / membership number |
05 | Reference Label | 25 | Transaction reference (for reconciliation) |
06 | Customer Label | 25 | Customer identifier |
07 | Terminal Label | 25 | POS terminal identifier |
08 | Purpose of Transaction | 25 | Description (e.g. "Lunch", "Rent") |
09 | Additional Consumer Data Request | 3 | A (address), M (mobile), E (email), each at most once: data the consumer app should supply |
10 | Merchant Tax ID | 20 | Merchant tax identifier (added in v1.1) |
11 | Merchant Channel | 3 (fixed) | Media, transaction location and merchant presence (added in v1.1) |
CRC-16 / CCITT Validation
The last 4 characters of every EMVCo QR string are a CRC-16 checksum — CRC-16/CCITT-FALSE: polynomial 0x1021, initial value 0xFFFF, over the UTF-8 bytes, written as 4 uppercase hex characters. The checksum covers the entire string up to and including"6304" (the CRC field ID + length), but not the 4-character CRC value itself.
Full string: 00020101021129370016A000000677010111011300668123456785204541153037645802TH5909ACME SHOP6007BANGKOK6304B718. Use the EMVCo QR Parser tool to validate any QR string's CRC and decode all fields.
Merchant Account Information Structure (IDs 26–51)
A network without a reserved ID uses any free template ID in 26–51 (PromptPay uses 29, PIX 26). Inside each template, sub-field 00 is a Globally Unique Identifier (GUID) that identifies the payment network. Sub-fields 01–99 carry network-specific data (account number, VPA, phone number, etc.).
29370016A000000677010111 ← PromptPay GUID01130066812345678 ← mobile number (0066 + number without its leading 0)Try the QR Parser
Parse and build EMVCo QR strings with live CRC validation and field-by-field decoding.