{"id":28577410,"url":"https://github.com/mastercard/elevate-reference-app","last_synced_at":"2026-01-20T17:09:04.384Z","repository":{"id":39928001,"uuid":"379200390","full_name":"Mastercard/elevate-reference-app","owner":"Mastercard","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-10T05:50:07.000Z","size":344,"stargazers_count":0,"open_issues_count":1,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-09T15:10:01.139Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mastercard.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-06-22T08:42:12.000Z","updated_at":"2025-06-10T05:50:13.000Z","dependencies_parsed_at":"2024-01-16T11:43:38.597Z","dependency_job_id":"2f723708-1f7e-4fab-88d0-b192fd5b6e5c","html_url":"https://github.com/Mastercard/elevate-reference-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Mastercard/elevate-reference-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mastercard%2Felevate-reference-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mastercard%2Felevate-reference-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mastercard%2Felevate-reference-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mastercard%2Felevate-reference-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mastercard","download_url":"https://codeload.github.com/Mastercard/elevate-reference-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mastercard%2Felevate-reference-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28607624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T16:10:39.856Z","status":"ssl_error","status_checked_at":"2026-01-20T16:10:39.493Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-11T00:37:40.050Z","updated_at":"2026-01-20T17:09:04.367Z","avatar_url":"https://github.com/Mastercard.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MBEP Reference App\r\n\r\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Mastercard_elevate-reference-app\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=Mastercard_elevate-reference-app)\r\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=Mastercard_elevate-reference-app\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=Mastercard_elevate-reference-app)\r\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=Mastercard_elevate-reference-app\u0026metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=Mastercard_elevate-reference-app)\r\n[![](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/Mastercard/elevate-reference-app/blob/master/LICENSE)\r\n\r\n## Table of Contents\r\n- [Overview](#overview)\r\n- [Requirements](#requirements)\r\n- [Integrating with OpenAPI Generator](#OpenAPI_Generator)\r\n- [Configuration](#configuration)\r\n- [Use-Cases](#use-cases)\r\n- [Execute the Use-Cases](#execute-the-use-cases)\r\n- [Service Documentation](#documentation)\r\n- [API Reference](#api-reference)\r\n- [Support](#support)\r\n- [License](#license)\r\n\r\n## Overview  \u003ca name=\"overview\"\u003e\u003c/a\u003e\r\nThis is a reference application to demonstrate how MBEP APIs can be used.\r\nTo call these APIs, consumer key and .p12 file required from your project on Mastercard Developers.\r\n\r\n## Requirements  \u003ca name=\"requirements\"\u003e\u003c/a\u003e\r\n\r\n- [Mastercard Developers Account](https://developer.mastercard.com/dashboard) with access to \"MBEP\" API\r\n- [Java 11](http://www.oracle.com/technetwork/java/javase/downloads/index.html)\r\n- [Apache maven 3.3+](https://maven.apache.org/download.cgi)\r\n- A text Editor or any IDE\r\n\r\n## Frameworks/Libraries \u003ca name=\"frameworks\"\u003e\u003c/a\u003e\r\n- Apache Maven\r\n- OpenAPI Generator\r\n\r\n## Integrating with OpenAPI Generator \u003ca name=\"OpenAPI_Generator\"\u003e\u003c/a\u003e\r\n\r\nOpenAPI Generator generates API client libraries from OpenAPI Specs. It provides generators and library templates for supporting multiple languages and frameworks.\r\nCheck [Generating and Configuring a Mastercard API Client](https://developer.mastercard.com/platform/documentation/security-and-authentication/generating-and-configuring-a-mastercard-api-client/) to know more about how to generate a simple API client for consuming APIs.\r\n\r\nSee also:\r\n\r\n- [OpenAPI Generator (maven Plugin)](https://mvnrepository.com/artifact/org.openapitools/openapi-generator-maven-plugin)\r\n- [OpenAPI Generator (executable)](https://mvnrepository.com/artifact/org.openapitools/openapi-generator-cli)\r\n- [CONFIG OPTIONS for java](https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/java.md)\r\n\r\n### OpenAPI Generator Plugin Configuration\r\n\r\n```\r\n\u003cplugin\u003e\r\n    \u003cgroupId\u003eorg.openapitools\u003c/groupId\u003e\r\n    \u003cartifactId\u003eopenapi-generator-maven-plugin\u003c/artifactId\u003e\r\n    \u003cversion\u003e${openapi-generator.version}\u003c/version\u003e\r\n    \u003cexecutions\u003e\r\n        \u003cexecution\u003e\r\n            \u003cgoals\u003e\r\n                \u003cgoal\u003egenerate\u003c/goal\u003e\r\n            \u003c/goals\u003e\r\n            \u003cconfiguration\u003e\r\n                \u003cinputSpec\u003e${project.basedir}/src/main/resources/mbep-services.yaml\u003c/inputSpec\u003e\r\n                \u003cgeneratorName\u003ejava\u003c/generatorName\u003e\r\n                \u003clibrary\u003eokhttp-gson\u003c/library\u003e\r\n                \u003cgenerateApiTests\u003efalse\u003c/generateApiTests\u003e\r\n                \u003cgenerateModelTests\u003efalse\u003c/generateModelTests\u003e\r\n                \u003cconfigOptions\u003e\r\n                    \u003csourceFolder\u003esrc/gen/main/java\u003c/sourceFolder\u003e\r\n                    \u003cdateLibrary\u003ejava8\u003c/dateLibrary\u003e\r\n                \u003c/configOptions\u003e\r\n            \u003c/configuration\u003e\r\n        \u003c/execution\u003e\r\n    \u003c/executions\u003e\r\n\u003c/plugin\u003e\r\n```\r\n\r\n### Generating The API Client Sources\r\nNow that you have all the dependencies you need, you can generate the sources. To do this, use one of the following two methods:\r\n\r\n```Using IDE```\r\n\r\n- **Method 1** \u003cbr\u003e\r\nIn IntelliJ IDEA, open the Maven window (View \u003e Tool Windows \u003e Maven). Click the icons ```Reimport All Maven Projects``` and ```Generate Sources and Update Folders for All Projects```\r\n\r\n- **Method 2** \u003cbr\u003e\r\nIn the same menu, navigate to the commands ({Project name} \u003e Lifecycle), select ```clean``` and ```compile``` then click the icon ```Run Maven Build```.\r\n\r\n```Using Terminal```\r\n\r\nNavigate to the root directory of the project within a terminal window and execute ```mvn clean compile``` command.\r\n\r\n## Configuration \u003ca name=\"configuration\"\u003e\u003c/a\u003e\r\n1. Create your account on [Mastercard Developers](https://developer.mastercard.com/) if you don't have it already.\r\n2. Create a new project here and add ***MBEP*** to it and click continue.\r\n3. Download Sandbox Signing Key, a ```.p12``` file will be downloaded.\r\n4. In the Client Encryption Keys section of the dashboard, click on the ```Actions``` dropdown and download the client encryption key, a ``.pem``` file will be downloaded. \r\n5. Copy the downloaded ```.p12``` and ```.pem``` files to ```src/main/resources``` folder in your code.\r\n6. Open ```src/main/resources/application.properties``` and configure:\r\n    - ```mastercard.mbep.client.p12.path ```- Path to keystore (.p12) file, just change the name as per the downloaded file in step 5. \r\n    - ```mastercard.mbep.client.ref.app.consumer.key``` - Copy the Consumer key from \"Sandbox/Production Keys\" section on your project page\r\n    - ```mastercard.mbep.client.ref.app.keystore.alias``` - Alias of your key. Default key alias for the sandbox is ```keyalias```.\r\n    - ```mastercard.mbep.client.ref.app.keystore.password``` -  Password of your Keystore. Default keystore password for sandbox project is ```keystorepassword```.\r\n    - ```mastercard.mbep.client.ref.app.encryption.file ```- Path to encryption key (.pem) file, just change the name as per the downloaded file in step 5, e.g. ```src/main/resources/\u003cfileName\u003e.pem```.\r\n\r\n## Use-Cases \u003ca name=\"use-cases\"\u003e\u003c/a\u003e\r\n1. **Get Benefits**\r\nEndpoint: \"/benefits\".\r\nUsed to get benefits of the user.\r\n   \r\n2. **Check Eligibility**    \r\nEndpoint: \"/eligibility\".\r\nUsed to check eligibility of a credit card in mbep program for a specific benefit. Access to this API requires mapping of client ID, please contact your mastercard representative to get this access.\r\n\r\n3. **Create Redemptions**    \r\nEndpoint: \"/redemptions\".\r\nUsed to create a redemption for a credit card that was previously enrolled through the eligibilities resource. Access to this API requires mapping of client ID, please contact your mastercard representative to get this access.\r\n   \r\n\r\nMore details can be found [here](https://developer.mastercard.com/mbep/documentation/use-cases/).\r\n\r\n\r\n## Execute the Use-Cases   \u003ca name=\"execute-the-use-cases\"\u003e\u003c/a\u003e\r\nBelow are the APIs exposed by this application: \r\n       - GET  \u003cHOST\u003e/mbep/benefits\r\n       - POST \u003cHost\u003e/mbep/eligibility      \r\n       - POST \u003cHost\u003e/mbep/redemptions            \r\n\r\nOnce you have added the correct properties, you are ready to build the application. You can do this by navigating to the project’s base directory from the terminal and then by running the following command.\r\n\r\n`mvn clean install`\r\n\r\nWhen the project builds successfully, you can run the following command to start the project  \r\n- Run ```java -jar target/mbep-1.0.0.jar``` command to run the application.\r\n- Open the browser and enter the url ```http://localhost:5001/mbep/``` and you will land on benefits page.\r\n- Click on ```benefits```, ```eligibility``` or ```redemeptions``` tab and enter the details as required.\r\n- When submitted you will get JSON response for each service. \r\n    \r\n**NOTE:**   \r\n    - Update request with valid details in json files under location ```/src/main/resources/templates/``` in order to execute these apis successfully.  \r\n    - For each new call, you should change the email address,such as, dane+101@ifonly.com or dane+102@ifonly.com. If you use the same email address, you may get an error that the benefit has already been redeemed (this is expected). For each new call, you should change the card number. Use the number generator to generate a number that passes the MOD10/Luhn test. The range of eligible PANs is 5555555555550000 through 5555555555559999.\r\n\r\n## Service Documentation \u003ca name=\"documentation\"\u003e\u003c/a\u003e\r\n\r\nMBEP documentation can be found [here](https://developer.mastercard.com/mbep/documentation/use-cases/).\r\n\r\n\r\n## API Reference \u003ca name=\"api-reference\"\u003e\u003c/a\u003e\r\nThe Swagger API specification can be found [here](https://developer.mastercard.com/mbep/documentation/api-ref/).\r\n\r\n## Support \u003ca name=\"support\"\u003e\u003c/a\u003e\r\nPlease email **apisupport@mastercard.com** with any questions or feedback you may have.\r\n\r\n\r\n## License \u003ca name=\"license\"\u003e\u003c/a\u003e\r\n\u003cp\u003eCopyright 2021 Mastercard\u003c/p\u003e\r\n\u003cp\u003eLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with\r\nthe License. You may obtain a copy of the License at:\u003c/p\u003e\r\n\u003cpre\u003e\u003ccode\u003e   http://www.apache.org/licenses/LICENSE-2.0\r\n\u003c/code\u003e\u003c/pre\u003e\r\n\u003cp\u003eUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on\r\nan \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the\r\nspecific language governing permissions and limitations under the License.\u003c/p\u003e\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmastercard%2Felevate-reference-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmastercard%2Felevate-reference-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmastercard%2Felevate-reference-app/lists"}