# Mastercard QR on Card
source: https://developer.mastercard.com/mastercard-send/documentation/qr-on-card/index.md

Note: This documentation describes a new use case for selected customers. Only use this information if you have been directed to it by your Mastercard representative.

## Overview {#overview}

The use case pages describe how the Mastercard Send APIs and Mastercard Directory Services APIs facilitate the different QR on Card transaction types.

The examples and sequence diagrams show how you could use the Mastercard APIs to develop your QR on Card.
Note: These examples do not prescribe the design and interactions of your solution; those aspects are for you to define.

### Payment Types {#payment-types}

QR on Card supports the following funds transfer transaction types.

|                                                                         Use Case                                                                         |                                                                                                                                                           Description                                                                                                                                                           |
|----------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| P2P -- Transfers to Friends and Family ![person to person](https://static.developer.mastercard.com/content/mastercard-send/documentation/img/ptop.png)   | Enable individuals to transfer funds to another person, for example: * Reimburse a friend for paying a dinner bill * Contribute to co-worker gifts [Find Out More](https://developer.mastercard.com/mastercard-send/documentation/qr-on-card/index.md#p2p-use-cases)                                                            |
| P2M -- Payments for Goods and Services ![person to merchant](https://static.developer.mastercard.com/content/mastercard-send/documentation/img/ptom.png) | Enable individuals to pay merchants for availing goods or services, for example: * Payment to taxi drivers or restaurants, for availing their services * Purchase of groceries and accessories in local shops [Find Out More](https://developer.mastercard.com/mastercard-send/documentation/qr-on-card/index.md#p2m-use-cases) |

## P2P Use Cases {#p2p-use-cases}

### Register a Consumer and Their Accounts {#register-a-consumer-and-their-accounts}

The following example sequence shows how you might use the [Mastercard Directory Services Consumer Mapping APIs](https://developer.mastercard.com/mastercard-send-consumer-mapping/documentation/api-reference-qr-on-card/) to register consumers and their accounts details.

After a successful account registration Mastercard will provide you an alias for each registered card.

This alias can then be used with:

1. [Mastercard Consumer Mapping Search API](https://developer.mastercard.com/mastercard-send-consumer-mapping/documentation/use-cases/) to obtain PAN details for consumer and perform payments using the PAN details (only applicable for PCI compliant Originating Institutions).
2. Payment APIs to perform payments directly using the alias without the need to handle PCI data.

Note: When you include an *additional_data_reference* value in your API request, Mastercard will generate a 20-character *alias* value.

#### Example Sequence {#example-sequence}

The following example sequence shows how you might use the Mastercard Directory Services APIs.
Diagram customer_account_register

The example sequence shows use of the following APIs:

1. [Mapping POST](https://developer.mastercard.com/mastercard-send-consumer-mapping/documentation/api-reference/#apis) to register consumers with their account details. Additionally [Mapping Account POST](https://developer.mastercard.com/mastercard-send-consumer-mapping/documentation/api-reference/#apis) can be used to register more cards for an existing consumer. You can also refer the following [Register a Consumer and Their Accounts](https://developer.mastercard.com/mastercard-send-consumer-mapping/documentation/use-cases/#register-a-consumer-and-their-accounts) use case document.

2. [Mapping Search API](https://developer.mastercard.com/mastercard-send-consumer-mapping/documentation/api-reference/#apis) to obtain PAN details for consumer by passing the alias obtained from QR Code. You can also refer the following [Search for Sending Account Aliases](https://developer.mastercard.com/mastercard-send-consumer-mapping/documentation/use-cases/#search-for-sending-account-aliases) use case document.

### Managing consumers and their accounts {#managing-consumers-and-their-accounts}

The following example sequence shows how you might use the Mastercard Directory Services [Consumer Mapping APIs](https://developer.mastercard.com/mastercard-send-consumer-mapping/documentation/api-reference-qr-on-card/) to update consumers accounts details.

#### Example Sequence {#example-sequence-1}

The following example sequence shows how you might use the Mastercard Directory Services APIs.
Diagram mastercard_directory_service

The example sequence shows use of the following APIs:

1. [Mapping Account PUT](https://developer.mastercard.com/mastercard-send-consumer-mapping/documentation/api-reference/#apis) can be used to update consumer details for a registered card. You can also refer the following [Change Consumer Address](https://developer.mastercard.com/mastercard-send-consumer-mapping/documentation/use-cases/#change-consumer-address) use case document.

### Generating a QR Code {#generating-a-qr-code}

Receiving Institutions are responsible for generating the QR codes and printing the QR codes on the cards issued for their participating consumers.

Mastercard QR on Card program utilizes the *Mastercard Merchant Presented QR* SDKs to generate, parse and verify the QR codes.

The Receiving Institutions must provide the Mastercard generated alias to the MPQR SDKs in **ID 01** of **Tag 05** to generate a compliant QR code for all the cards issued under Mastercard QR on Card program.

Below provided is more information on the Tag 05 of QR Code Specifications.

|          Attributes          | Tag |                                                            Description                                                            |
|------------------------------|-----|-----------------------------------------------------------------------------------------------------------------------------------|
| Merchant Account Information | 05  | Network Specific Tag used to identify the merchant account and QR on Card specific requirements. "05" is reserved for Mastercard. |

Tag 05 can be further divided into the following Sub tags / IDs:

|                     Name                     |  ID   |       Length       | Presence |
|----------------------------------------------|-------|--------------------|----------|
| Alias                                        | 01    | Var. up to "25" \* | Optional |
| MAID                                         | 02    | Var. up to "25" \* | Optional |
| PFID                                         | 03    | Var. up to "25" \* | Optional |
| Market specific alias                        | 04    | Var. up to "73" \* | Optional |
| RFU (Reserved for Future use) for Mastercard | 05-99 | Var. up to "25" \* | Optional |

\* Total length for all data objects for tag 05 not to exceed 99.

To learn more regarding the available Device SDKs please refer to the following Mastercard Merchant Presented QR [Device SDKs](https://developer.mastercard.com/mastercard-merchant-presented-qr/documentation/device-sdks/) documentation.

### Funds transfer for P2P {#funds-transfer-for-p2p}

This page describes the Person-to-Person (P2P) transaction types facilitated by Mastercard QR on Card. P2P transfers enable individuals to transfer funds (that are not forms of payment) to another person.

This transaction type supports the transfer of funds between two people, for example someone reimbursing a friend.

These transfers can be domestic or cross-border. Funds can be sent to an eligible debit card account, bank account, or prepaid card account.
Note: You cannot use these transfers to send funds to a merchant or small business commercial card account.

After the sender has scanned a Mastercard QR on Card program QR Code and obtained the alias after parsing QR Code, the Originating Institution can perform the payments using Send1.0/2.0 Payment Transfer API in the following two ways:

1. Retrieve the PAN details of receiving consumer through the Mastercard Directory Services Mapping Search API. Then use the Send1.0/2.0 Payment Transfer API and receivers PAN details to complete the payment.

2. Directly pass the alias in the *recipient_account_uri* in the Payment Transfer API JSON request. You can refer the following Mastercard [SEND1.0 Account URIs](https://developer.mastercard.com/mastercard-send-person-to-person/documentation/field-uris-codes/account-uris/) and [SEND2.0 Account URIs](https://developer.mastercard.com/mastercard-send-2-0/documentation/field-uris-codes/account-uris/) document to learn more about usage of alias.   

   Note: This feature will be available in future releases.

   <br />

In the Payment Transfer API JSON request, ensure that the paymentType is 'P2P'.

#### Performing Fund Transfers for P2P using Send 1.0 API {#performing-fund-transfers-for-p2p-using-send-10-api}

This example sequence focuses on the [Mastercard Send 1.0 Payment Transfer API](https://developer.mastercard.com/mastercard-send-person-to-person/documentation/api-reference/payment-transfer/) call.
Diagram payment_transfer_api_send_one_p2p

#### Performing Fund Transfers for P2P using Send 2.0 API {#performing-fund-transfers-for-p2p-using-send-20-api}

This example sequence focuses on the Mastercard Send 2.0 Payment Transfer API (Link) call.
Diagram payment_transfer_api_send_two_p2p

The example sequence shows use of the following API:

1. Payments API POST request to create a Payment Transaction to send funds to the Recipient.

You can also use a Payments API POST request to check the status of the Payment Transaction.

## P2M Use Cases {#p2m-use-cases}

### Register a Merchant and Their Accounts {#register-a-merchant-and-their-accounts}

The following example sequence shows how you might use the [Mastercard Directory Services Merchant Mapping APIs](https://developer.mastercard.com/mastercard-send-directory-services/documentation/api-reference/) to register consumers and their accounts details.

After a successful account registration Mastercard will provide you an alias for each registered card.

This alias can then be used with:

1. [Mastercard Merchant Mapping Search API]((https://developer.mastercard.com/mastercard-send-directory-services/documentation/api-reference/)) to obtain PAN details for consumer and perform payments using the PAN details (only applicable for PCI compliant Originating Institutions).
2. Payment APIs to perform payments directly using the alias without the need to handle PCI data.

Note: When you include an additional_data_reference value in your API request, Mastercard will generate a 20-character *alias* value.

#### Example Sequence {#example-sequence-2}

The following example sequence shows how you might use the Mastercard Directory Services APIs.
Diagram customer_account_register

The example sequence shows use of the following APIs:

1. [Mapping POST](https://developer.mastercard.com/mastercard-send-directory-services/documentation/api-reference/) to register merchants with their account details. Additionally [Mapping Account POST](https://developer.mastercard.com/mastercard-send-directory-services/documentation/api-reference/) can be used to register more cards for an existing merchants. You can also refer the following Register a [Merchant and Their Accounts](https://developer.mastercard.com/mastercard-send-directory-services/documentation/use-cases/#register-a-merchant-and-their-accounts) use case document.
2. [Mapping Search API](https://developer.mastercard.com/mastercard-send-directory-services/documentation/api-reference/) to obtain PAN details for consumer by passing the alias obtained from QR Code. You can also refer the following [Mapping Lookup During Payment Flow](https://developer.mastercard.com/mastercard-send-directory-services/documentation/use-cases/#mapping-lookup-during-payment-flow) use case document.

### Managing merchants and their accounts {#managing-merchants-and-their-accounts}

The following example sequence shows how you might use the [Mastercard Directory Services Merchant Mapping APIs](https://developer.mastercard.com/mastercard-send-directory-services/documentation/api-reference/) to update consumers accounts details.

#### Example Sequence {#example-sequence-3}

The following example sequence shows how you might use the Mastercard Directory Services APIs.
Diagram mastercard_directory_service

The example sequence shows use of the following APIs:

1. [Mapping Account PUT](https://developer.mastercard.com/mastercard-send-directory-services/documentation/api-reference/) can be used to update consumer details for a registered card.

### Generating a QR Code {#generating-a-qr-code-1}

Receiving Institutions are responsible for generating the QR codes and printing the QR codes on the cards issued for their participating merchants.

Mastercard QR on Card program utilizes the *Mastercard Merchant Presented QR* SDKs to generate, parse and verify the QR codes.

The Receiving Institutions must provide the Mastercard generated alias to the MPQR SDKs in **ID 01** of **Tag 05** to generate a compliant QR code for all the cards issued under Mastercard QR on Card program.

Below provided is more information on the Tag 05 of QR Code Specifications.

|          Attributes          | Tag |                                                            Description                                                            |
|------------------------------|-----|-----------------------------------------------------------------------------------------------------------------------------------|
| Merchant Account Information | 05  | Network Specific Tag used to identify the merchant account and QR on Card specific requirements. "05" is reserved for Mastercard. |

Tag 05 can be further divided into the following Sub tags/IDs:

|                     Name                     |  ID   |       Length       | Presence |
|----------------------------------------------|-------|--------------------|----------|
| Alias                                        | 01    | Var. up to "25" \* | Optional |
| MAID                                         | 02    | Var. up to "25" \* | Optional |
| PFID                                         | 03    | Var. up to "25" \* | Optional |
| Market specific alias                        | 04    | Var. up to "73" \* | Optional |
| RFU (Reserved for Future use) for Mastercard | 05-99 | Var. up to "25" \* | Optional |

\*Total length for all data objects for tag 05 not to exceed 99

To learn more regarding the available Device SDKs please refer to the following Mastercard Merchant Presented QR [Device SDKs](https://developer.mastercard.com/mastercard-merchant-presented-qr/documentation/device-sdks/) documentation.

### Funds transfer for P2M {#funds-transfer-for-p2m}

This page describes the Person-to-Merchant (P2M) transaction types facilitated by Mastercard QR on Card. P2M payments enable mobile wallet users to pay small merchants by scanning their Mastercard QR codes. This QR code payment method provides merchants with a fast, secure alternative to cash without the need for a point-of-sale (POS) terminal.
Note: P2M payments reverse the traditional roles of the acquirer and issuer---for these payments, the issuer is the Originating Institution, and the acquirer is the Receiving Institution (the merchant's bank).

In the Payment Transfer API JSON request, ensure that the paymentType is 'P2M'.

#### Performing Fund Transfers for P2M using Send 1.0 API \[MPQR\] {#performing-fund-transfers-for-p2m-using-send-10-api-mpqr}

This example sequence focuses on the [Mastercard Merchant Presented QR Payment Transfer API](https://developer.mastercard.com/mastercard-merchant-presented-qr/documentation/server-apis/api-reference/payment-api/) call.
Diagram payment_transfer_api_presented

#### Performing Fund Transfers for P2M using Send 2.0 API {#performing-fund-transfers-for-p2m-using-send-20-api}

This example sequence focuses on the Mastercard SEND 2.0 Payment Transfer API (Link) call.
Diagram payment_transfer_api_send
