# Generate QR Code for Merchants
source: https://developer.mastercard.com/mastercard-checkout-solutions/documentation/use-cases/sqr/generate-qr-codes/index.md

## Overview {#overview}

Acquirers/PSPs are responsible for generating the QR codes for participating merchants. The QR code must follow the [EMVCo Merchant Presented QR specifications](https://www.emvco.com/emv-technologies/qrcodes/).

Below is an example of a Secure Card on File QR. Note that additional fields are supported as per the EMVCo Merchant Presented QR specifications.

    000201010211057704736a2f41a3-c54c-fce8-32d2-0324e1c32e22*3440e5bf-81ca-4c5f-a1b2-cf989f09a03952045024530384054031005802US5913Test Merchant6008New York62080304123463046F6D"

## Device SDKs {#device-sdks}

Acquirers/PSPs can use the following Software Development Kits (SDKs) to generate the QR codes for the digital wallet to scan, parse and verify QR codes.

|                                                                               SDK                                                                                |                                                                 Description                                                                 |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|
| [Java Core SDK](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/use-cases/sqr/generate-qr-codes/java-core-sdk/index.md)             | Acquirer/PSP use this SDK to generate QR codes for web applications and Android applications.                                               |
| [Android QR Scan SDK](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/use-cases/sqr/generate-qr-codes/android-qr-scan-sdk/index.md) | Originating Institutions and Wallet Providers use this SDK to scan the QR code and parse and verify the content in the Android application. |
| [iOS Core SDK](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/use-cases/sqr/generate-qr-codes/ios-core-sdk/index.md)               | Acquirer/PSP use this SDK to generate QR codes for web applications and iOS applications.                                                   |
| [iOS QR Scan SDK](https://developer.mastercard.com/mastercard-checkout-solutions/documentation/use-cases/sqr/generate-qr-codes/ios-qr-scan-sdk/index.md)         | Digital wallet operators use this SDK to parse and verify QR code content for web applications and iOS applications.                        |

## Mapping QR Fields to SQR API Fields {#mapping-qr-fields-to-sqr-api-fields}

The digital wallet needs to scan the QR code and extract the QR fields. The table below provides a mapping of the QR fields with the fields in the SQR APIs.

|                    Field Name in EMVCo Specs                    |                                                                                                                                                                                                                                                                                                                                           Definition                                                                                                                                                                                                                                                                                                                                            | ID/Tag |        Format        |    Length     |  Presence   |                                   Value                                    |      Field name in SQR APIs       |
|-----------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|----------------------|---------------|-------------|----------------------------------------------------------------------------|-----------------------------------|
| Payload Format Indicator                                        | Defines the version of the QR Code template and hence the conventions on the identifiers, lengths, and values. *Must be the first data object in the QR Code.*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 00     | Numeric              | 02            | Mandatory   | 01                                                                         | `payloadFormatIndicator`          |
| Point of Initiation Method                                      | Identifies the communication technology (here QR Code) and whether the data is static or dynamic. The Point of Initiation Method has a value of "11" for static QR Codes and a value of "12" for dynamic QR Codes. *Use value of "11" for static QR code.*                                                                                                                                                                                                                                                                                                                                                                                                                                      | 01     | Numeric              | 02            | Optional    | 11                                                                         | `pointOfInitiationMethod`         |
| Merchant Account Information - MC SQR identifiers (sub-tag 04). | Network Specific Tag used to identify the merchant account and SQR specific requirements. "05" is reserved for Mastercard. *The 2 values are concatenated with a '\*'.*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | 05     | String               | var. up to 99 | Mandatory   | 6a2f41a3-c54c-fce8-32d2-0324e1c32e22\*3440e5bf-81ca-4c5f-a1b2-cf989f09a039 | `recipientIdCheckout`; `srcDpaId` |
| Merchant Category Code                                          | As defined by \[ISO 18245\] and assigned by the Acquirer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | 52     | Numeric              | 04            | Mandatory   | 5024                                                                       |                                   |
| Transaction Currency                                            | Indicates the currency code of the transaction. A 3-digit numeric value, as defined by \[ISO 4217\]. This value will be used by the mobile application to display a recognizable currency to the consumer whenever an amount is being displayed or whenever the consumer is prompted to enter an amount.                                                                                                                                                                                                                                                                                                                                                                                        | 53     | Numeric              | 03            | Mandatory   | 840                                                                        | `transactionCurrencyCode`         |
| Transaction Amount                                              | The transaction amount, if known. For instance, "99.34". If present, this value is displayed to the consumer by the mobile application when processing the transaction. If this data object is not present, the consumer is prompted to input the transaction amount to be paid to the merchant. *Only required for dynamic QR codes; if not included the SRCI NP must pass it when initiating the checkout call.*                                                                                                                                                                                                                                                                              | 54     | Numeric              | var. up to 13 | Conditional | 100                                                                        | `transactionAmount`               |
| Country Code                                                    | Indicates the country of the merchant acceptance device. A 2-character alpha value, as defined by \[ISO 3166-1 alpha 2\] and assigned by the Acquirer. The country may be displayed to the consumer by the mobile application when processing the transaction.                                                                                                                                                                                                                                                                                                                                                                                                                                  | 58     | Alphanumeric Special | 02            | Mandatory   | US                                                                         | `countryCode`                     |
| Merchant Name                                                   | The "doing business as" name for the merchant, recognizable to the consumer. This name may be displayed to the consumer by the mobile application when processing the transaction. *Must be provided for the digital wallet to display within the wallet application.*                                                                                                                                                                                                                                                                                                                                                                                                                          | 59     | Alphanumeric Special | var. up to 25 | Mandatory   | Test Merchant                                                              | `merchantName`                    |
| Merchant City                                                   | City of operations for the merchant. This name may be displayed to the consumer by the mobile application when processing the transaction. *Must be provided for the digital wallet to display within the wallet application.*                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 60     | Alphanumeric Special | var. up to 15 | Mandatory   | New York                                                                   | `merchantCity`                    |
| Additional Data Field Template                                  | This includes the following: * Bill Number (ID 01) * Mobile Number (ID 02) * Store Label (ID 03) * Loyalty Number (ID 04) * Reference Label (ID 05) * Customer Label (ID 06) * Terminal Label (ID 07) * Purpose of transaction (ID 08) * Additional Consumer Data Request (ID 09) <br /> The Additional Data Field Template includes information that may be provided by the Merchant or may be populated by the mobile application to enable or facilitate certain use cases. Store ID is used to identify sub-merchant/ merchant store if provided by consumer, * acceptanceChannelData * consumerData If provided by merchant/ Acquirers/PSPs, <!-- --> * acceptanceChannelData * sellerData | 62     | String               | var. up to 99 | Optional    | 0304124                                                                    | `storeId`                         |
| Cyclic Redundancy Check (CRC)                                   | Checksum calculated over all the data objects included in the QR Code. *Must be the last data object in the QR Code.*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | 63     | Alphanumeric Special | 04            | 570E        | Test Merchant                                                              |                                   |

## QR Tester Application {#qr-tester-application}

Use the following Android QR tester application to generate and test EMVCo-compliant SQR QR codes.

**Android reference tester application:**
[TesterTool-release.apk](https://static.developer.mastercard.com/content/mastercard-checkout-solutions/uploads/TesterTool-release.apk) (4MB)
