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 — nested recursively for template fields.

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.

000201ID=00, Length=2 chars, Value="01" (Payload Format Indicator)
5911ACME SHOP INCID=59, Length=11 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–51Merchant Account InformationTemplateNetwork-specific data; 26–51 most common. Contains GUID + payment identifier sub-fields
52Merchant Category Code4 digitsISO 18245 MCC (e.g. 5411 = grocery)
53Transaction Currency3 digitsISO 4217 numeric (764=THB, 986=BRL, 356=INR)
54Transaction AmountNumeric stringOptional in static QR; mandatory in dynamic
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 over entire string 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 Data3Flags requesting extra data from consumer app

CRC-16 / CCITT Validation

The last 4 characters of every EMVCo QR string are a CRC-16 checksum (polynomial 0x1021, initial value 0xFFFF). 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…59115ACME SHOP6304A1B2
← Payload (CRC computed over this) →"6304" is includedCRC value (excluded from computation)

Use the EMVCo QR Parser tool to validate any QR string's CRC and decode all fields.

Merchant Account Information Structure (IDs 26–51)

Each payment network registers one or more ID slots in the range 26–51. 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.).

2637
0016A000000677010111 ← PromptPay GUID01130066812345678 ← country code + phone

Try the QR Parser

Parse and build EMVCo QR strings with live CRC validation and field-by-field decoding.