# Use Cases
source: https://developer.mastercard.com/mastercard-merchant-presented-qr/documentation/server-apis/use-cases/index.md

The [API Reference](https://developer.mastercard.com/mastercard-merchant-presented-qr/documentation/server-apis/api-reference/index.md) information describes how you can use the MPQR APIs to make MPQR transfers. The example sequence diagrams below show how the APIs could be used for different use cases.

Note that these examples do not prescribe the design and interactions of your Person-to-Merchant (P2M) payment service; those aspects are for you to define.

## Instore Purchase {#instore-purchase}

In this example:

* The merchant has a static Mastercard QR code displayed at their checkout that can be used for all purchases
* The consumer is using a payment app provided by their issuing bank (the Originating Institution)

<br />

The Originating Institution uses:

1. The [Device SDKs](https://developer.mastercard.com/mastercard-merchant-presented-qr/documentation/device-sdks/index.md) to add QR code scanning and verification functionality to the payment app (used in step 3). The app passes the QR data and payment amount to the Originating Institution's server via proprietary APIs (step 4).
2. The [Payment API](https://developer.mastercard.com/mastercard-merchant-presented-qr/documentation/server-apis/api-reference/payment-api/index.md) (POST request), including the QR data and payment amount, to create the payment transfer (step 6). If the transfer is approved, the API response is a 200 message with `status` = 'APPROVED' (step 11). If the transfer is declined, the API response is a 402 error with `ReasonCode` = 'DECLINE'.
3. (OPTIONAL) The [Retrieval API](https://developer.mastercard.com/mastercard-merchant-presented-qr/documentation/server-apis/api-reference/retrieval-api/index.md) (GET request) to get an updated status for the payment transfer (step 12) if the status was 'UNKNOWN' in the Payment API response (step 11).

Diagram mpqr-sequence-instore

## Transit Payment {#transit-payment}

In this example:

* The merchant is a taxi driver who uses a mobile app that can generate a dynamic Mastercard QR code for each taxi fare
* The consumer is using a payment app that is provided by an entity (such as a wallet provider) that can secure funds from the consumer's issuing bank

<br />

The taxi driver's mobile app provider uses the [Device SDKs](https://developer.mastercard.com/mastercard-merchant-presented-qr/documentation/device-sdks/index.md) to add QR code generation functionality to its app (used in step 2).

The Originating Institution (consumer's payment app provider) uses:

1. The [Device SDKs](https://developer.mastercard.com/mastercard-merchant-presented-qr/documentation/device-sdks/index.md) to add QR code scanning and verification functionality to the payment app (used in step 3). The app passes the QR data and payment amount to the Originating Institution's server via proprietary APIs (step 4).
2. The [Payment API](https://developer.mastercard.com/mastercard-merchant-presented-qr/documentation/server-apis/api-reference/payment-api/index.md) (POST request), including the QR data and payment amount, to create the payment transfer (step 6). If the transfer is approved, the API response is a 200 message with `status` = 'APPROVED' (step 11). If the transfer is declined, the API response is a 402 error with `ReasonCode` = 'DECLINE'.
3. (OPTIONAL) The [Retrieval API](https://developer.mastercard.com/mastercard-merchant-presented-qr/documentation/server-apis/api-reference/retrieval-api/index.md) (GET request) to get an updated status for the payment transfer (step 12) if the status was 'UNKNOWN' in the Payment API response (step 11).
Diagram mpqr-sequence-transit-2
