MDES Digital Enablement API
- API version: 1.3.0
- Build date: 2021-08-03T18:13:45.340+01:00[Europe/London]
These APIs are designed as RPC style stateless web services where each API endpoint represents an operation to be performed. All request and response payloads are sent in the JSON (JavaScript Object Notation) data-interchange format. Each endpoint in the API specifies the HTTP Method used to access it. All strings in request and response objects are to be UTF-8 encoded. Each API URI includes the major and minor version of API that it conforms to. This will allow multiple concurrent versions of the API to be deployed simultaneously.
Authentication
Mastercard uses OAuth 1.0a with body hash extension for authenticating the API clients. This requires every request that you send to Mastercard to be signed with an RSA private key. A private-public RSA key pair must be generated consisting of:
- A private key for the OAuth signature for API requests. It is recommended to keep the private key in a password-protected or hardware keystore.
2. A public key is shared with Mastercard during the project setup process through either a certificate signing request (CSR) or the API Key Generator. Mastercard will use the public key to verify the OAuth signature that is provided on every API call.
An OAUTH1.0a signer library is available on GitHub
Encryption
All communications between Issuer web service and the Mastercard gateway is encrypted using TLS.
Additional Encryption of Sensitive Data
In addition to the OAuth authentication, when using MDES Digital Enablement Service, any PCI sensitive and all account holder Personally Identifiable Information (PII) data must be encrypted. This requirement applies to the API fields containing encryptedData. Sensitive data is encrypted using a symmetric session (one-time-use) key. The symmetric session key is then wrapped with an RSA Public Key supplied by Mastercard during API setup phase (the Customer Encryption Key).
Java Client Encryption Library available on GitHub
Automatically generated by the OpenAPI Generator
Building the API client library requires:
- Java 1.7+
- Maven/Gradle
To install the API client library to your local Maven repository, simply execute:
mvn clean installTo deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deployRefer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>com.mastercard.developer</groupId>
<artifactId>mdes-digital-enablement-client</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>Add this dependency to your project's build file:
compile "com.mastercard.developer:mdes-digital-enablement-client:1.0.0"At first generate the JAR by executing:
mvn clean packageThen manually install the following JARs:
target/mdes-digital-enablement-client-1.0.0.jartarget/lib/*.jar
Please follow the installation instruction and execute the following Java code:
// Import classes:
import com.mastercard.developer.mdes_digital_enablement_client.ApiClient;
import com.mastercard.developer.mdes_digital_enablement_client.ApiException;
import com.mastercard.developer.mdes_digital_enablement_client.Configuration;
import com.mastercard.developer.mdes_digital_enablement_client.models.*;
import com.mastercard.developer.mdes_digital_enablement_client.api.DeleteApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.mastercard.com/mdes");
DeleteApi apiInstance = new DeleteApi(defaultClient);
DeleteRequestSchema deleteRequestSchema = new DeleteRequestSchema(); // DeleteRequestSchema | Contains the details of the request message.
try {
DeleteResponseSchema result = apiInstance.deleteDigitization(deleteRequestSchema);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DeleteApi#deleteDigitization");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}All URIs are relative to https://api.mastercard.com/mdes
| Class | Method | HTTP request | Description |
|---|---|---|---|
| DeleteApi | deleteDigitization | POST /digitization/static/1/0/delete | Used to delete one or more Tokens. The API is limited to 10 Tokens per request. |
| GetAssetApi | getAsset | GET /assets/static/1/0/asset/{AssetId} | Used to retrieve static Assets from the MDES repository. |
| GetTaskStatusApi | getTaskStatus | POST /digitization/static/1/0/getTaskStatus | Used to check the status of any asynchronous task that was previously requested. |
| GetTokenApi | getToken | POST /digitization/static/1/0/getToken | Used to get the status and details of a single given Token. |
| NotifyTokenUpdatedApi | notifyTokenUpdateForTokenStateChange | POST /digitization/static/1/0/notifyTokenUpdated | Outbound API used by MDES to notify the Token Requestor of significant Token updates, such as when the Token is activated, suspended, unsuspended or deleted; or when information about the Token or its product configuration has changed. |
| SearchTokensApi | searchTokens | POST /digitization/static/1/0/searchTokens | Used to get basic token information for all tokens on a specified device, or all tokens mapped to the given Account PAN. |
| SuspendApi | createSuspend | POST /digitization/static/1/0/suspend | Used to temporarily suspend one or more Tokens. |
| TokenizeApi | createTokenize | POST /digitization/static/1/0/tokenize | |
| TransactApi | createTransact | POST /remotetransaction/static/1/0/transact | Used by the Token Requestor to create a Digital Secure Remote Payment ("DSRP") transaction cryptogram using the credentials stored within MDES in order to perform a DSRP transaction. |
| UnsuspendApi | createUnsuspend | POST /digitization/static/1/0/unsuspend | Used to unsuspend one or more previously suspended Tokens. The API is limited to 10 Tokens per request. |
- AccountHolderData
- AccountHolderDataOutbound
- AssetResponseSchema
- AuthenticationMethods
- BillingAddress
- CardAccountDataInbound
- CardAccountDataOutbound
- DecisioningData
- DeleteRequestSchema
- DeleteResponseSchema
- EncryptedPayload
- EncryptedPayloadTransact
- Error
- ErrorsResponse
- FundingAccountData
- FundingAccountInfo
- FundingAccountInfoEncryptedPayload
- GatewayError
- GatewayErrorsResponse
- GatewayErrorsSchema
- GetTaskStatusRequestSchema
- GetTaskStatusResponseSchema
- GetTokenRequestSchema
- GetTokenResponseSchema
- MediaContent
- NotifyTokenEncryptedPayload
- NotifyTokenUpdatedRequestSchema
- NotifyTokenUpdatedResponseSchema
- PhoneNumber
- ProductConfig
- SearchTokensRequestSchema
- SearchTokensResponseSchema
- SuspendRequestSchema
- SuspendResponseSchema
- Token
- TokenDetail
- TokenDetailData
- TokenDetailDataGetTokenOnly
- TokenDetailDataPAROnly
- TokenDetailGetTokenOnly
- TokenDetailPAROnly
- TokenForGetToken
- TokenForLCM
- TokenForNTU
- TokenInfo
- TokenInfoForNTUAndGetToken
- TokenizeRequestSchema
- TokenizeResponseSchema
- TransactEncryptedData
- TransactError
- TransactRequestSchema
- TransactResponseSchema
- UnSuspendRequestSchema
- UnSuspendResponseSchema
All endpoints do not require authorization. Authentication schemes defined for the API:
It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.