# Reference App
source: https://developer.mastercard.com/consent-management/documentation/developer-tools/reference-app/index.md

## Overview {#overview}

The Consent Management \& Enrollment reference apps provide working code for integrating with the Consent Management \& Enrollment APIs. Plug in your Sandbox credentials to run the code and learn how to enroll cards, create user consents, handle 3DS authentication, and embed the hosted Consent Management UI.

Two reference apps are available, each covering the same use cases:

|     Reference App      |  Language   |    Framework    |
|------------------------|-------------|-----------------|
| consent-java-ref-app   | Java 17+    | Spring Boot 2.7 |
| consent-python-ref-app | Python 3.6+ | Flask 3.1       |

## Prerequisites {#prerequisites}

* A [Mastercard Developers](https://developer.mastercard.com/dashboard) account with a project that includes the Consent Management \& Enrollment APIs
* OAuth signing key (`.p12`) and consumer key from your project
* Encryption certificate (`.pem`) from your project
* Java 17+ with Apache Maven 3.3+, or Python 3.6+ with pip

For information about creating a project, see the [Quick Start Guide](https://developer.mastercard.com/consent-management/documentation/quick-start-guide/index.md).

## Download the Reference App {#download-the-reference-app}

Download the sample code:

* Java: [consent-java-ref-app.zip](https://static.developer.mastercard.com/content/consent-management/uploads/consent-java-ref-app.zip) (104KB)
* Python: [consent-python-ref-app.zip](https://static.developer.mastercard.com/content/consent-management/uploads/consent-python-ref-app.zip) (84KB)

## Use Cases {#use-cases}

When the reference app starts, the home page displays three API cards:

![Reference app home page showing the three API cards](https://static.developer.mastercard.com/content/consent-management/img/ref-app-home.png)

|                Use Case                 |  Consent Type  |                                                                              Description                                                                               |
|-----------------------------------------|----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Card Consent Management API             | `notification` | Enroll a card, handle 3DS authentication, and manage card-based consents.                                                                                              |
| Geo-level / User Consent Management API | `insights`     | Enroll a Zip Code and SessionID or create a user consent from identity details (name, postal code, email, phone). Manage user-based consents or Geo level enrollments. |
| Consent Management UI                   | Hosted UI      | Embed the Mastercard-hosted Consent Management UI in an iframe using a JWT token.                                                                                      |

## Run the Reference App {#run-the-reference-app}

Follow the instructions in the tutorials to configure and run the reference app. Each tutorial covers both Java and Python code:

* [Card Consent Management Tutorial](https://developer.mastercard.com/consent-management/documentation/tutorials-and-guides/card-consents-tutorial/index.md)
* [User Consent Management Tutorial](https://developer.mastercard.com/consent-management/documentation/tutorials-and-guides/user-consents-tutorial/index.md)
* [Consent Management UI Tutorial](https://developer.mastercard.com/consent-management/documentation/tutorials-and-guides/auth-consent-ui/index.md)
