Skip to content

jt-mc-git/merchant-identifier-client-tutorial

Repository files navigation

Merchant Identifier API Client

Overview

This project showcases the use case of retrieving location data and related information using the Merchant Identifier API here

Compatibility

References

Tutorial

A tutorial can be found here for setting up and using this service.

Frameworks

Setup

Prerequisites

Application Configuration

  1. Create an account at Mastercard Developers.
  2. Copy the Merchant Identifier API Spec to your local drive
  3. Create a new project and add the 'Merchant Identifier' API to your project.
  4. Take note of the given consumer key, keyalias, and keystore password given upon the project creation.
  5. Copy the downloaded .p12 file to your local drive.
  6. Update the properties found in src/main/java/com/mastercard/api/merchantidentifier/Main.java.
private static final String BASE_URL = "https://sandbox.api.mastercard.com/merchant-identifier";
private static final String CONSUMER_KEY = "yourconsumerkeystring";
private static final String PKCS_12_KEY_FILE_PATH = "./path/to/your/signing-key.p12";
private static final String SIGNIN_KEY_ALIAS = "yourkeyalias";
private static final String SIGNIN_KEY_PASSWORD = "yourpassword";
  1. run mvn compile exec:java to run the project.

Documentation for API Endpoints

All URIs are relative to https://api.mastercard.com/merchant-identifier

Class Method HTTP request Description
MerchantsApi getMerchantByCardAcceptorId GET /merchants-by-card-acceptor-ids Get matched merchant information for a given card acceptor id
MerchantsApi getMerchantByTaxId GET /merchants-by-tax-ids Get merchant information for a given tax id
MerchantsApi getMerchants GET /merchants Get matched merchants for a given merchant descriptor

Documentation for Models

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

[email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages