Reference

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.

000201→ID=00, Length=2 chars, Value="01" (Payload Format Indicator)
5913ACME SHOP INC→ID=59, Length=13 chars, Value="ACME SHOP INC" (Merchant Name)

MPM Root-Level Fields

IDField NameFormatNotes
00Payload Format IndicatorFixed "01"Must be first field, always "01"
01Point of Initiation Method"11" or "12"11 = static, 12 = dynamic
02–25Merchant Account InformationPlain valueReserved 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–51Merchant Account InformationTemplateAny payment network: sub-field 00 GUID + network-specific sub-fields. At least one 02–51 field is mandatory
52Merchant Category Code4 digitsISO 18245 MCC (e.g. 5411 = grocery)
53Transaction Currency3 digitsISO 4217 numeric (764=THB, 986=BRL, 356=INR)
54Transaction AmountNumeric stringUp to 13 chars, digits and one "."; leave out to let the payer enter the amount
55Tip or Convenience Indicator"01"/"02"/"03"01=prompted, 02=fixed fee, 03=percentage fee
56Value of Convenience Fee FixedNumericOnly present if field 55 = "02"
57Value of Convenience Fee %NumericOnly present if field 55 = "03"
58Country Code2 alphaISO 3166-1 alpha-2 (TH, BR, SG, IN…)
59Merchant Name≤ 25 charsDisplayed to payer in their app
60Merchant City≤ 15 charsCity of the merchant
61Postal Code≤ 10 charsOptional
62Additional Data Field TemplateTemplateBill number, reference, terminal label, purpose
63CRC-164 hex charsMust be last. CRC-16/CCITT-FALSE over the entire string up to and including "6304"
64Merchant Info Language TemplateTemplateAlternate language name/city (e.g. Thai script)

Additional Data Template (ID 62) Sub-fields

Sub-IDNameMax LengthPurpose
01Bill Number25Invoice or bill reference
02Mobile Number25Payer mobile for confirmation
03Store Label25Merchant store identifier
04Loyalty Number25Loyalty card / membership number
05Reference Label25Transaction reference (for reconciliation)
06Customer Label25Customer identifier
07Terminal Label25POS terminal identifier
08Purpose of Transaction25Description (e.g. "Lunch", "Rent")
09Additional Consumer Data Request3A (address), M (mobile), E (email), each at most once: data the consumer app should supply
10Merchant Tax ID20Merchant tax identifier (added in v1.1)
11Merchant Channel3 (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.

000201010211…5909ACME SHOP6007BANGKOK6304B718
← Payload (CRC computed over this) →"6304" is includedCRC value (excluded from computation)

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.).

2937
0016A000000677010111 ← 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.