# Payment Application Setup for Originating Institution or Wallet Providers
source: https://developer.mastercard.com/mastercard-merchant-presented-qr/documentation/server-apis/reference-app/payment-application-setup/index.md

![](https://static.developer.mastercard.com/content/mastercard-merchant-presented-qr/documentation/img/originating-institution-flow2.png)

For this tutorial, you can either create your own payment application that integrates with the middleware server we just built, or you can download and modify our sample application. Our sample application uses the MPQR Device SDKs to first scan and parse an MPQR-compliant QR code, then send a payment request to the middleware server. Note that in the sample application we are only making a call to one API endpoint as provided by the middleware server. The sample application only interacts with the middleware server to perform a payment transaction with the [Payment API](https://developer.mastercard.com/mastercard-merchant-presented-qr/documentation/server-apis/api-reference/payment-api/index.md) resource.

1. Download our Android reference application: [here](https://static.developer.mastercard.com/content/mastercard-merchant-presented-qr/uploads/mpqr-tutorial-android.zip)
2. Open project file in Android Studio.
3. Ensure that you are using the latest version of the [device SDKs](https://developer.mastercard.com/mastercard-merchant-presented-qr/documentation/device-sdks/index.md).
4. Build the project.
5. Once successfully built, run the project in an Android Emulator.
6. Generate MPQR-compliant QR code. **Make sure you enter transaction amount \>= 50. This is required if we are using the Sandbox environment for testing MPQR APIs.** Import the QR code in the Android Emulator.
7. If your Spring IO middleware server is running locally, you should be able to make a successfully test an MPQR-compliant QR code and perform a payment.
