# Testing
source: https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md

Sandbox URL: `https://sandbox.api.mastercard.com`

## Prerequisites {#prerequisites}

[casefiling](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-case)
Note: See [How to Consume the Mastercom API?](https://developer.mastercard.com/mastercom/documentation/api-basics/index.md#how-to-consume-the-mastercom-api) to check on the multiple ways to integrate with Mastercom.

### 1. Generating Client Code and Mastercard API Compliant OAuth Signature {#1-generating-client-code-and-mastercard-api-compliant-oauth-signature}

##### [Java](https://developer.mastercard.com/mastercom/documentation/tutorials-and-guides/sdk-tutorial/index.md) {#javadocumentationtutorials-and-guidessdk-tutorial}

##### [Python](https://github.com/Mastercard/oauth1-signer-python) {#pythonhttpsgithubcommastercardoauth1-signer-python}

##### [NodeJS javascript](https://github.com/Mastercard/oauth1-signer-nodejs) {#nodejs-javascripthttpsgithubcommastercardoauth1-signer-nodejs}

##### [Ruby](https://github.com/Mastercard/oauth1-signer-ruby) {#rubyhttpsgithubcommastercardoauth1-signer-ruby}

##### [PHP](https://github.com/Mastercard/oauth1-signer-php) {#phphttpsgithubcommastercardoauth1-signer-php}

##### [C#](https://github.com/Mastercard/oauth1-signer-csharp) {#chttpsgithubcommastercardoauth1-signer-csharp}

### 2. Required Parameters {#2-required-parameters}

For some API calls, one or more parameters might be needed in the URI while sending the request (for example, claim-id), check below where these parameters can be extracted from:

|      Parameter       |                                                                                                                                                                                                                                                                                                  Resources used to retrieve parameter                                                                                                                                                                                                                                                                                                  |
|----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **case-id**          | [Create Case](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-case) can be used to create a new case-id.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| **claim-id**         | [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id. [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.                                                                                                  |
| **chargeback-id**    | [Create Chargeback](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-chargeback) can be used to create a new chargeback-id. [Create Debit MC Chargeback](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-debit-mc-chargeback) can be used to create a new Debit Mastercard and Europe Dual Acquirer chargeback-id. [Retrieve Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claim) to retrieve an existing chargeback-id associated with a claim.                                |
| **queue-name**       | [Retrieve Queue Names](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-queue-names) can be used to retrieve a queue-name.                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| **request-id**       | [Create Retrieval Request](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-retrieval-request) can be used to create a new request-id. [Create Debit MC Retrieval Request](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-debit-mc-retrieval-request) can be used to create a new Debit Mastercard and Europe Dual Acquirer request-id. [Retrieve Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claim) can be used to retrieve an existing request-id associated with a claim. |
| **reportIdentifier** | [Reconciliation Acknowledge](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#reconciliation-acknowledge) can be used to generate a new reportIdentifier.                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| **transaction-id**   | [Transaction Search](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#transaction-search) can be used to retrieve a transaction-id.                                                                                                                                                                                                                                                                                                                                                                                                                                                             |

Note: See our [Latest API Specification](https://developer.mastercard.com/mastercom/documentation/api-reference/v6-reference/index.md) for detailed info on each API Call.

## 1. Case Filing {#1-case-filing}

### Create Case {#create-case}

|  API Call   |                     Description                      |      URI       |   Response   |
|-------------|------------------------------------------------------|----------------|--------------|
| Create case | This resource is used to generate a new Case Filing. | POST /v6/cases | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.CaseFilingApi;
import com.mastercard.api.mastercom.model.CaseFilingResponse;
import com.mastercard.api.mastercom.model.CreateCaseRequest;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        CaseFilingApi apiInstance = new CaseFilingApi(client);
        CreateCaseRequest body = new CreateCaseRequest(); // CreateCaseRequest | Create Case Filing information
        try {
            CaseFilingResponse result = apiInstance.createCaseFiling(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CaseFilingApi#createCaseFiling");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import case_filing_api
from openapi_client.model.create_case_request import CreateCaseRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = case_filing_api.CaseFilingApi(client)
body = CreateCaseRequest()  # CreateCaseRequest | Create Case Filing information
try:
    # This resource is used to generate a new Case Filing
    api_response = api_instance.create_case_filing(body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Create Case Filing API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.CaseFilingApi();
let body = new MasterCom.CreateCaseRequest(); // CreateCaseRequest | Create Case Filing information
apiInstance.createCaseFiling(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({ 'Authorization' => authHeader })
end
api_instance = OpenapiClient::CaseFilingApi.new api_client
body = OpenapiClient::CreateCaseRequest.new # CreateCaseRequest | Create Case Filing information
begin
  # This resource is used to generate a new Case Filing
  result = api_instance.create_case_filing(body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Exception when calling Create Case Filing API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\CaseFilingApi($client, $config);
$body = new \OpenAPI\Client\Model\CreateCaseRequest(); // \OpenAPI\Client\Model\CreateCaseRequest | Create Case Filing information
try {
    $result = $apiInstance->createCaseFiling($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Create Case Filing API: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new CaseFilingApi
            {
                Client = client
            };
            var body = new CreateCaseRequest(); // CreateCaseRequest | Create Case Filing information
            try
            {
                // This resource is used to generate a new Case Filing
                var result = apiInstance.CreateCaseFiling(body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling CaseFilingApi.CreateCaseFiling: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Retrieve Case Documentation {#retrieve-case-documentation}

Before Retrieve Case Documentation, [Create Case](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-case) can be used to create a new case-id.

|          API Call           |                             Description                             |                URI                |   Response   |
|-----------------------------|---------------------------------------------------------------------|-----------------------------------|--------------|
| Retrieve case documentation | This resource retrieves all documentation for a Case Filing record. | GET /v6/cases/{case-id}/documents | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.CaseFilingApi;
import com.mastercard.api.mastercom.model.DocumentResponseStructure;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        CaseFilingApi apiInstance = new CaseFilingApi(client);
        String caseId = "536092"; // String | The case filing id.   Length: 1-19   Valid Values/Format: Numeric
        String format = "ORIGINAL"; // String | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
        String memo = "Memo"; // String | Adding field for future use. Please leave blank at this time    Length: N/A    Valid Values/Format: Alphanumeric
        try {
            DocumentResponseStructure result = apiInstance.getCaseFilingDoc(caseId, format, memo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CaseFilingApi#getCaseFilingDoc");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import case_filing_api
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = case_filing_api.CaseFilingApi(client)
case_id = "536092"  # str | The case filing id.   Length: 0-19   Valid Values/Format: Numeric
format = "ORIGINAL"  # str | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
memo = "Memo"  # str | Adding field for future use. Please leave blank at this time.   Length: N/A    Valid Values/Format: Alphanumeric (optional)
try:
    # This resource retrieves all documentation for a Case Filing record
    api_response = api_instance.get_case_filing_doc(case_id, format, memo=memo)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling Retrieve Case Filing Doc API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.CaseFilingApi();
let caseId = '536092'; // String | The case filing id.   Length: 0-19   Valid Values/Format: Numeric
let format = 'ORIGINAL'; // String | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
let opts = {
  'memo': 'Memo' // String | Adding field for future use. Please leave blank at this time.   Length: N/A    Valid Values/Format: Alphanumeric
};
apiInstance.getCaseFilingDoc(caseId, format, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::CaseFilingApi.new api_client
case_id = '536092' # String | The case filing id.   Length: 0-19   Valid Values/Format: Numeric
format = 'ORIGINAL' # String | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
opts = {
  memo: 'Memo' # String | Adding field for future use. Please leave blank at this time.   Length: N/A    Valid Values/Format: Alphanumeric
}
begin
  # This resource retrieves all documentation for a Case Filing record
  result = api_instance.get_case_filing_doc(case_id, format, opts)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Retrieve Case Filing Doc API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\CaseFilingApi($client, $config);
$case_id = '536092'; // string | The case filing id.   Length: 0-19   Valid Values/Format: Numeric
$format = 'ORIGINAL'; // string | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
$memo = 'Memo'; // string | Adding field for future use. Please leave blank at this time.   Length: N/A    Valid Values/Format: Alphanumeric
try {
    $result = $apiInstance->getCaseFilingDoc($case_id, $format, $memo);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Case Filing Doc API: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new CaseFilingApi
            {
                Client = client
            };
            var caseId = "536092";  // string | The case filing id.   Length: 0-19   Valid Values/Format: Numeric
            var format = "ORIGINAL";  // string | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
            var memo = "Memo";  // string | Adding field for future use. Please leave blank at this time.   Length: N/A    Valid Values/Format: Alphanumeric (optional) 
            try
            {
                // This resource retrieves all documentation for a Case Filing record
                var result = apiInstance.GetCaseFilingDoc(caseId, format, memo);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling CaseFilingApi.GetCaseFilingDoc: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

#### Update Case {#update-case}

Before Update Case, [Create Case](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-case) can be used to create a new case-id.

|  API Call   |                 Description                 |           URI           |   Response   |
|-------------|---------------------------------------------|-------------------------|--------------|
| Update case | This resource updates a Case Filing record. | PUT /v6/cases/{case-id} | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.CaseFilingApi;
import com.mastercard.api.mastercom.model.CaseFilingResponse;
import com.mastercard.api.mastercom.model.UpdateCaseRequest;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        CaseFilingApi apiInstance = new CaseFilingApi(client);
        String caseId = "536092"; // String | Case filing Id.   Length: 1-19   Valid Values/Format: Numeric
        UpdateCaseRequest body = new UpdateCaseRequest(); // UpdateCaseRequest | Update Case Filing information
        try {
            CaseFilingResponse result = apiInstance.updateCaseFiling(caseId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CaseFilingApi#updateCaseFiling");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import case_filing_api
from openapi_client.model.update_case_request import UpdateCaseRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = case_filing_api.CaseFilingApi(client)
case_id = "536092"  # str | Case filing Id.   Length: 1-19   Valid Values/Format: Numeric
body = UpdateCaseRequest()  # UpdateCaseRequest | Update Case Filing information
try:
    # This resource updates a Case Filing record
    api_response = api_instance.update_case_filing(case_id, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling Update Case Filing API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.CaseFilingApi();
let caseId = '536092'; // String | Case filing Id.   Length: 1-19   Valid Values/Format: Numeric
let body = new MasterCom.UpdateCaseRequest(); // UpdateCaseRequest | Update Case Filing information
apiInstance.updateCaseFiling(caseId, body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::CaseFilingApi.new api_client
case_id = '536092' # String | Case filing Id.   Length: 1-19   Valid Values/Format: Numeric
body = OpenapiClient::UpdateCaseRequest.new # UpdateCaseRequest | Update Case Filing information
begin
  # This resource updates a Case Filing record
  result = api_instance.update_case_filing(case_id, body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Update Case Filing API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\CaseFilingApi($client, $config);
$case_id = '536092'; // string | Case filing Id.   Length: 1-19   Valid Values/Format: Numeric
$body = new \OpenAPI\Client\Model\UpdateCaseRequest(); // \OpenAPI\Client\Model\UpdateCaseRequest | Update Case Filing information
try {
    $result = $apiInstance->updateCaseFiling($case_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Update Case Filing API: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new CaseFilingApi
            {
                Client = client
            };
            var caseId = "536092";  // string | Case filing Id.   Length: 1-19   Valid Values/Format: Numeric
            var body = new UpdateCaseRequest(); // UpdateCaseRequest | Update Case Filing information
            try
            {
                // This resource updates a Case Filing record
                var result = apiInstance.UpdateCaseFiling(caseId, body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling CaseFilingApi.UpdateCaseFiling: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

#### Retrieve Case Status {#retrieve-case-status}

|       API Call       |                           Description                           |         URI          |   Response   |
|----------------------|-----------------------------------------------------------------|----------------------|--------------|
| Retrieve case status | This resource retrieves the processing status of a case filing. | PUT /v6/cases/status | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.CaseFilingApi;
import com.mastercard.api.mastercom.model.CaseFilingStatusRequest;
import com.mastercard.api.mastercom.model.CaseFilingStatusResponse;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        CaseFilingApi apiInstance = new CaseFilingApi(client);
        CaseFilingStatusRequest body = new CaseFilingStatusRequest(); // CaseFilingStatusRequest | Case Filing information
        try {
            CaseFilingStatusResponse result = apiInstance.retrieveCaseFilingStatus(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CaseFilingApi#retrieveCaseFilingStatus");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import case_filing_api
from openapi_client.model.case_filing_status_request import CaseFilingStatusRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = case_filing_api.CaseFilingApi(client)
body = CaseFilingStatusRequest()  # CaseFilingStatusRequest | Case Filing information
try:
    # This resource retrieves the processing status of a case filing image
    api_response = api_instance.retrieve_case_filing_status(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling Retrieve Case Filing Status API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.CaseFilingApi();
let body = new MasterCom.CaseFilingStatusRequest(); // CaseFilingStatusRequest | Case Filing information
apiInstance.retrieveCaseFilingStatus(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::CaseFilingApi.new api_client
body = OpenapiClient::CaseFilingStatusRequest.new # CaseFilingStatusRequest | Case Filing information
begin
  # This resource retrieves the processing status of a case filing image
  result = api_instance.retrieve_case_filing_status(body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Case Filing Status API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\CaseFilingApi($client, $config);
$body = new \OpenAPI\Client\Model\CaseFilingStatusRequest(); // \OpenAPI\Client\Model\CaseFilingStatusRequest | Case Filing information
try {
    $result = $apiInstance->retrieveCaseFilingStatus($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Case Filing Status API: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new CaseFilingApi
            {
                Client = client
            };
            var body = new CaseFilingStatusRequest(); // CaseFilingStatusRequest | Case Filing information
            try
            {
                // This resource retrieves the processing status of a case filing image
                var result = apiInstance.RetrieveCaseFilingStatus(body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling CaseFilingApi.RetrieveCaseFilingStatus: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

#### Retrieve Case Image Status {#retrieve-case-image-status}

|          API Call          |                                                                                                  Description                                                                                                   |           URI            |   Response   |
|----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------|--------------|
| Retrieve case image status | This resource retrieves the processing status of a case filing image. Resource returns a list of case id and status based upon passed in status and optional time frame. Defaults to 30 days if no time frame. | PUT/v6/cases/imagestatus | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.CaseFilingApi;
import com.mastercard.api.mastercom.model.CaseFilingImageStatusRequest;
import com.mastercard.api.mastercom.model.CaseFilingImageStatusResponse;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        CaseFilingApi apiInstance = new CaseFilingApi(client);
        CaseFilingImageStatusRequest body = new CaseFilingImageStatusRequest(); // CaseFilingImageStatusRequest | Case Filing information
        try {
            CaseFilingImageStatusResponse result = apiInstance.retrieveCaseFilingImageStatus(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CaseFilingApi#retrieveCaseFilingImageStatus");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import case_filing_api
from openapi_client.model.case_filing_image_status_request import CaseFilingImageStatusRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = case_filing_api.CaseFilingApi(client)
body = CaseFilingImageStatusRequest()  # CaseFilingImageStatusRequest | Case Filing information
try:
    # This resource retrieves the processing status of a case filing image. Resource returns a list of case id and status based upon passed in status and optional timeframe.  Defaults to 30 days if no timeframe.
    api_response = api_instance.retrieve_case_filing_image_status(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling Retrieve Case Filing Image Status API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.CaseFilingApi();
let body = new MasterCom.CaseFilingImageStatusRequest(); // CaseFilingImageStatusRequest | Case Filing information
apiInstance.retrieveCaseFilingImageStatus(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::CaseFilingApi.new api_client
body = OpenapiClient::CaseFilingImageStatusRequest.new # CaseFilingImageStatusRequest | Case Filing information
begin
  # This resource retrieves the processing status of a case filing image. Resource returns a list of case id and status based upon passed in status and optional timeframe.  Defaults to 30 days if no timeframe.
  result = api_instance.retrieve_case_filing_image_status(body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Case Filing Image Status API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\CaseFilingApi($client, $config);
$body = new \OpenAPI\Client\Model\CaseFilingImageStatusRequest(); // \OpenAPI\Client\Model\CaseFilingImageStatusRequest | Case Filing information
try {
    $result = $apiInstance->retrieveCaseFilingImageStatus($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Case Filing Image Status API: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new CaseFilingApi
            {
                Client = client
            };            
            var body = new CaseFilingImageStatusRequest(); // CaseFilingImageStatusRequest | Case Filing information
            try
            {
                // This resource retrieves the processing status of a case filing image. Resource returns a list of case id and status based upon passed in status and optional timeframe.  Defaults to 30 days if no timeframe.
                var result = apiInstance.RetrieveCaseFilingImageStatus(body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling CaseFilingApi.RetrieveCaseFilingImageStatus: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

#### Retrieve Claim from Case {#retrieve-claim-from-case}

|         API Call         |                                 Description                                  |              URI              |   Response   |
|--------------------------|------------------------------------------------------------------------------|-------------------------------|--------------|
| Retrieve claim from case | This resource is used to retrieve the claim associated with a given case ID. | PUT /v6/cases/retrieve/claims | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.CaseFilingApi;
import com.mastercard.api.mastercom.model.CaseFilingClaimsRequest;
import com.mastercard.api.mastercom.model.CaseFilingClaimsResponse;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class CaseFilingRetrieveClaim {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        CaseFilingApi apiInstance = new CaseFilingApi(client);
        CaseFilingClaimsRequest body = new CaseFilingClaimsRequest(); // CaseFilingClaimsRequest | Case Filing Retrieve Claims request information
        try {
            CaseFilingClaimsResponse result = apiInstance.retrieveClaims(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CaseFilingApi#retrieveClaims");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import case_filing_api
from openapi_client.model.case_filing_claims_request import CaseFilingClaimsRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = case_filing_api.CaseFilingApi(client)
body = CaseFilingClaimsRequest()  # CaseFilingClaimsRequest | Case Filing Retrieve Claims request information
try:
    # This resource is used to retrieve the claim associated with a given case id
    api_response = api_instance.retrieve_claims(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CaseFilingApi->retrieve_claims: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.CaseFilingApi();
let body = new MasterCom.CaseFilingClaimsRequest(); // CaseFilingClaimsRequest | Case Filing Retrieve Claims request information
apiInstance.retrieveClaims(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::CaseFilingApi.new api_client
body = OpenapiClient::CaseFilingClaimsRequest.new # CaseFilingClaimsRequest | Case Filing Retrieve Claims request information
begin
  # This resource is used to retrieve the claim associated with a given case id
  result = api_instance.retrieve_claims(body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Retrieve Claim from Case API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\CaseFilingApi($client, $config);
$body = new \OpenAPI\Client\Model\CaseFilingClaimsRequest(); // \OpenAPI\Client\Model\CaseFilingClaimsRequest | Case Filing Retrieve Claims request information
try {
    $result = $apiInstance->retrieveClaims($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Case Filing Claim API: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new CaseFilingApi
            {
                Client = client
            };
            var body = new CaseFilingClaimsRequest(); // CaseFilingClaimsRequest | Case Filing Retrieve Claims request information
            try
            {
                // This resource is used to retrieve the claim associated with a given case id
                var result = apiInstance.RetrieveClaims(body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling CaseFilingApi.RetrieveClaims: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

## 2. Chargeback {#2-chargeback}

### Create Chargeback {#create-chargeback}

Before Create Chargeback, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.

|     API Call      |               Description               |                  URI                   |   Response   |
|-------------------|-----------------------------------------|----------------------------------------|--------------|
| Create chargeback | This resource creates a new chargeback. | POST /v6/claims/{claim-id}/chargebacks | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.ChargebacksApi;
import com.mastercard.api.mastercom.model.ChargebackResponse;
import com.mastercard.api.mastercom.model.CreateChargebackRequest;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        ChargebacksApi apiInstance = new ChargebacksApi(client);
        String claimId = "200002020654"; // String | Claim Id where the chargeback will be added   Length: 1-19   Valid Values/Format: Numeric
        CreateChargebackRequest body = new CreateChargebackRequest(); // CreateChargebackRequest | Create Chargeback information
        try {
            ChargebackResponse result = apiInstance.createChargeback(claimId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChargebacksApi#createChargeback");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import chargebacks_api
from openapi_client.model.create_chargeback_request import CreateChargebackRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = chargebacks_api.ChargebacksApi(client)
claim_id = "200002020654"  # str | Claim Id where the chargeback will be added   Length: 1-19   Valid Values/Format: Numeric
body = body = CreateChargebackRequest()  # CreateChargebackRequest | Create Chargeback information
try:
    # This resource creates a new chargeback
    api_response = api_instance.create_chargeback(claim_id, body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Create Chargeback API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.ChargebacksApi();
let claimId = '200002020654'; // String | Claim Id where the chargeback will be added   Length: 1-19   Valid Values/Format: Numeric
let body = new MasterCom.CreateChargebackRequest(); // CreateChargebackRequest | Create Chargeback information
apiInstance.createChargeback(claimId, body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::ChargebacksApi.new api_client
claim_id = '200002020654' # String | Claim Id where the chargeback will be added   Length: 1-19   Valid Values/Format: Numeric
body = OpenapiClient::CreateChargebackRequest.new # CreateChargebackRequest | Create Chargeback information
begin
  # This resource creates a new chargeback
  result = api_instance.create_chargeback(claim_id, body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Create Chargeback API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\ChargebacksApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id where the chargeback will be added   Length: 1-19   Valid Values/Format: Numeric
$body = new \OpenAPI\Client\Model\CreateChargebackRequest(); // \OpenAPI\Client\Model\CreateChargebackRequest | Create Chargeback information
try {
    $result = $apiInstance->createChargeback($claim_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Create Charbeack API: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new ChargebacksApi
            {
                Client = client
            };            
            var claimId = "200002020654";  // string | Claim Id where the chargeback will be added   Length: 1-19   Valid Values/Format: Numeric
            var body = new CreateChargebackRequest(); // CreateChargebackRequest | Create Chargeback information
            try
            {
                // This resource creates a new chargeback
                var result = apiInstance.CreateChargeback(claimId, body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ChargebacksApi.CreateChargeback: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Create Chargeback Reversal {#create-chargeback-reversal}

Before Create Chargeback Reversal, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.  

[Create Chargeback](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-chargeback) can be used to create a new chargeback-id, or [Retrieve Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claim) to retrieve an existing chargeback-id associated with a claim.

|          API Call          |                 Description                  |                               URI                               |   Response   |
|----------------------------|----------------------------------------------|-----------------------------------------------------------------|--------------|
| Create chargeback reversal | This resource creates a chargeback reversal. | POST /v6/claims/{claim-id}/chargebacks/{chargeback-id}/reversal | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.ChargebacksApi;
import com.mastercard.api.mastercom.model.ChargebackResponse;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        ChargebacksApi apiInstance = new ChargebacksApi(client);
        String claimId = "200002020654"; // String | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
        String chargebackId = "300018439680"; // String | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
        try {
            ChargebackResponse result = apiInstance.createChargebackReversal(claimId, chargebackId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChargebacksApi#createChargebackReversal");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import chargebacks_api
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = chargebacks_api.ChargebacksApi(client)
claim_id = "200002020654"  # str | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
chargeback_id = "300018439680"  # str | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
try:
    # This resource creates a chargeback reversal
    api_response = api_instance.create_chargeback_reversal(claim_id, chargeback_id)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Create Chargeback Reversal API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.ChargebacksApi();
let claimId = '200002020654'; // String | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
let chargebackId = '300018439680'; // String | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
apiInstance.createChargebackReversal(claimId, chargebackId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::ChargebacksApi.new api_client
claim_id = '200002020654' # String | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
chargeback_id = '300018439680' # String | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
begin
  # This resource creates a chargeback reversal
  result = api_instance.create_chargeback_reversal(claim_id, chargeback_id)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Chargeback Reversal API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\ChargebacksApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
$chargeback_id = '300018439680'; // string | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
try {
    $result = $apiInstance->createChargebackReversal($claim_id, $chargeback_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Create Chargeback Reversal API: ', $e->getMessage(), PHP_EOL;
}
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new ChargebacksApi
            {
                Client = client
            }; 
            var claimId = "200002020654";  // string | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
            var chargebackId = "300018439680";  // string | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
            try
            {
                // This resource creates a chargeback reversal
                var result = apiInstance.CreateChargebackReversal(claimId, chargebackId);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ChargebacksApi.CreateChargebackReversal: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Get Possible Values for Chargeback {#get-possible-values-for-chargeback}

Before Get Possible Values for Chargeback, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.

|              API Call              |                                         Description                                         |                              URI                              |   Response   |
|------------------------------------|---------------------------------------------------------------------------------------------|---------------------------------------------------------------|--------------|
| Get possible values for chargeback | This resource retrieves a structure containing possible values used to create a chargeback. | POST /v6/claims/{claim-id}/chargebacks/loaddataforchargebacks | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.ChargebacksApi;
import com.mastercard.api.mastercom.model.LoadDataForChargebackResponse;
import com.mastercard.api.mastercom.model.LoadDataForChargebacksRequest;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        ChargebacksApi apiInstance = new ChargebacksApi(client);
        String claimId = "200002020654"; // String | Claim Id for the chargeback to be created.   Length: 1-19   Valid Values/Format: Numeric
        LoadDataForChargebacksRequest body = new LoadDataForChargebacksRequest(); // LoadDataForChargebacksRequest | The type of chargeback.  The following values are valid...CHARGEBACK, SECOND_PRESENTMENT, ARB_CHARGEBACK.  The default value is CHARGEBACK
        try {
            LoadDataForChargebackResponse result = apiInstance.getDataForCreateChargeback(claimId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChargebacksApi#getDataForCreateChargeback");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import chargebacks_api
from openapi_client.model.load_data_for_chargebacks_request import LoadDataForChargebacksRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = chargebacks_api.ChargebacksApi(client)
claim_id = "200002020654"  # str | Claim Id for the chargeback to be created.   Length: 1-19   Valid Values/Format: Numeric
body = LoadDataForChargebacksRequest()  # LoadDataForChargebacksRequest | The type of chargeback.  The following values are valid...CHARGEBACK, SECOND_PRESENTMENT, ARB_CHARGEBACK.  The default value is CHARGEBACK
try:
    # This resource retrieves a structure containing possible values used to create a chargeback
    api_response = api_instance.get_data_for_create_chargeback(claim_id, body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Load Data for Chargeback API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.ChargebacksApi();
let claimId = '200002020654'; // String | Claim Id for the chargeback to be created.   Length: 1-19   Valid Values/Format: Numeric
let body = new MasterCom.LoadDataForChargebacksRequest(); // LoadDataForChargebacksRequest | The type of chargeback.  The following values are valid...CHARGEBACK, SECOND_PRESENTMENT, ARB_CHARGEBACK.  The default value is CHARGEBACK
apiInstance.getDataForCreateChargeback(claimId, body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::ChargebacksApi.new api_client
claim_id = '200002020654' # String | Claim Id for the chargeback to be created.   Length: 1-19   Valid Values/Format: Numeric
body = OpenapiClient::LoadDataForChargebacksRequest.new # LoadDataForChargebacksRequest | The type of chargeback.  The following values are valid...CHARGEBACK, SECOND_PRESENTMENT, ARB_CHARGEBACK.  The default value is CHARGEBACK
begin
  # This resource retrieves a structure containing possible values used to create a chargeback
  result = api_instance.get_data_for_create_chargeback(claim_id, body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Get Data for Chargeback API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\ChargebacksApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id for the chargeback to be created.   Length: 1-19   Valid Values/Format: Numeric
$body = new \OpenAPI\Client\Model\LoadDataForChargebacksRequest(); // \OpenAPI\Client\Model\LoadDataForChargebacksRequest | The type of chargeback.  The following values are valid...CHARGEBACK, SECOND_PRESENTMENT, ARB_CHARGEBACK.  The default value is CHARGEBACK
try {
    $result = $apiInstance->getDataForCreateChargeback($claim_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Load Data for Chargeback API: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#"); 
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new ChargebacksApi
            {
                Client = client
            }; 
            var claimId = "200002020654";  // string | Claim Id for the chargeback to be created.   Length: 1-19   Valid Values/Format: Numeric
            var body = new LoadDataForChargebacksRequest(); // LoadDataForChargebacksRequest | The type of chargeback.  The following values are valid...CHARGEBACK, SECOND_PRESENTMENT, ARB_CHARGEBACK.  The default value is CHARGEBACK
            try
            {
                // This resource retrieves a structure containing possible values used to create a chargeback
                var result = apiInstance.GetDataForCreateChargeback(claimId, body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ChargebacksApi.GetDataForCreateChargeback: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Retrieve Chargeback Documentation {#retrieve-chargeback-documentation}

Before Retrieve Chargeback Documentation, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.  

[Create Chargeback](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-chargeback) can be used to create a new chargeback-id, or [Retrieve Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claim) to retrieve an existing chargeback-id associated with a claim.

|             API Call              |                       Description                       |                               URI                               |   Response   |
|-----------------------------------|---------------------------------------------------------|-----------------------------------------------------------------|--------------|
| Retrieve chargeback documentation | This resource retrieves documentation for a chargeback. | GET /v6/claims/{claim-id}/chargebacks/{chargeback-id}/documents | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.ChargebacksApi;
import com.mastercard.api.mastercom.model.DocumentResponseStructure;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        ChargebacksApi apiInstance = new ChargebacksApi(client);
        String claimId = "200002020654"; // String | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
        String chargebackId = "300018439680"; // String | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
        String format = "ORIGINAL"; // String | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
        try {
            DocumentResponseStructure result = apiInstance.getChargebackDoc(claimId, chargebackId, format);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChargebacksApi#getChargebackDoc");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import chargebacks_api
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = chargebacks_api.ChargebacksApi(client)
claim_id = "200002020654"  # str | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
chargeback_id = "300018439680"  # str | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
format = "ORIGINAL"  # str | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
try:
    # This resource retrieves documentation for a chargeback
    api_response = api_instance.get_chargeback_doc(claim_id, chargeback_id, format)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Retrieve Chargeback Doc API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.ChargebacksApi();
let claimId = '200002020654'; // String | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
let chargebackId = '300018439680'; // String | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
let format = 'ORIGINAL'; // String | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
apiInstance.getChargebackDoc(claimId, chargebackId, format, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::ChargebacksApi.new api_client
claim_id = '200002020654' # String | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
chargeback_id = '300018439680' # String | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
format = 'ORIGINAL' # String | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
begin
  # This resource retrieves documentation for a chargeback
  result = api_instance.get_chargeback_doc(claim_id, chargeback_id, format)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Get Chargeback Doc API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\ChargebacksApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
$chargeback_id = '300018439680'; // string | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
$format = 'ORIGINAL'; // string | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
try {
    $result = $apiInstance->getChargebackDoc($claim_id, $chargeback_id, $format);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ChargebacksApi->getChargebackDoc: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new ChargebacksApi
            {
                Client = client
            }; 
            var claimId = "200002020654";  // string | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
            var chargebackId = "300018439680";  // string | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
            var format = "ORIGINAL";  // string | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
            try
            {
                // This resource retrieves documentation for a chargeback
                var result = apiInstance.GetChargebackDoc(claimId, chargebackId, format);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ChargebacksApi.GetChargebackDoc: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Update Chargeback {#update-chargeback}

Before Update Chargeback, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.  

[Create Chargeback](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-chargeback) can be used to create a new chargeback-id, or [Retrieve Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claim) to retrieve an existing chargeback-id associated with a claim.

|     API Call      |             Description             |                          URI                          |   Response   |
|-------------------|-------------------------------------|-------------------------------------------------------|--------------|
| Update chargeback | This resource updates a chargeback. | PUT /v6/claims/{claim-id}/chargebacks/{chargeback-id} | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.ChargebacksApi;
import com.mastercard.api.mastercom.model.ChargebackResponse;
import com.mastercard.api.mastercom.model.UpdateChargebackRequest;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        ChargebacksApi apiInstance = new ChargebacksApi(client);
        String claimId = "200002020654"; // String | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
        String chargebackId = "300018439680"; // String | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
        UpdateChargebackRequest body = new UpdateChargebackRequest(); // UpdateChargebackRequest | Update Chargeback information
        try {
            ChargebackResponse result = apiInstance.updateChargeback(claimId, chargebackId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChargebacksApi#updateChargeback");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import chargebacks_api
from openapi_client.model.update_chargeback_request import UpdateChargebackRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = chargebacks_api.ChargebacksApi(client)
claim_id = "200002020654"  # str | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
chargeback_id = "300018439680"  # str | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
body = UpdateChargebackRequest()  # UpdateChargebackRequest | Update Chargeback information
try:
    # This resource updates a chargeback
    api_response = api_instance.update_chargeback(claim_id, chargeback_id, body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Update Chargeback API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.ChargebacksApi();
let claimId = '200002020654'; // String | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
let chargebackId = '300018439680'; // String | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
let body = new MasterCom.UpdateChargebackRequest(); // UpdateChargebackRequest | Update Chargeback information
apiInstance.updateChargeback(claimId, chargebackId, body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::ChargebacksApi.new api_client
claim_id = '200002020654' # String | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
chargeback_id = '300018439680' # String | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
body = OpenapiClient::UpdateChargebackRequest.new # UpdateChargebackRequest | Update Chargeback information
begin
  # This resource updates a chargeback
  result = api_instance.update_chargeback(claim_id, chargeback_id, body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Update Chargeback API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\ChargebacksApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
$chargeback_id = '300018439680'; // string | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
$body = new \OpenAPI\Client\Model\UpdateChargebackRequest(); // \OpenAPI\Client\Model\UpdateChargebackRequest | Update Chargeback information
try {
    $result = $apiInstance->updateChargeback($claim_id, $chargeback_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ChargebacksApi->updateChargeback: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new ChargebacksApi
            {
                Client = client
            }; 
            var claimId = "200002020654";  // string | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
            var chargebackId = "300018439680";  // string | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
            var body = new UpdateChargebackRequest(); // UpdateChargebackRequest | Update Chargeback information
            try
            {
                // This resource updates a chargeback
                var result = apiInstance.UpdateChargeback(claimId, chargebackId, body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ChargebacksApi.UpdateChargeback: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Acknowledge Received Chargebacks {#acknowledge-received-chargebacks}

|             API Call             |                       Description                       |               URI               |   Response   |
|----------------------------------|---------------------------------------------------------|---------------------------------|--------------|
| Acknowledge received chargebacks | This resource marks a received chargeback as processed. | PUT /v6/chargebacks/acknowledge | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.ChargebacksApi;
import com.mastercard.api.mastercom.model.ChargebackMarkProcessedRequest;
import com.mastercard.api.mastercom.model.ChargebackMarkProcessedResponse;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        ChargebacksApi apiInstance = new ChargebacksApi(client);
        ChargebackMarkProcessedRequest body = new ChargebackMarkProcessedRequest(); // ChargebackMarkProcessedRequest | Chargeback Receiver information
        try {
            ChargebackMarkProcessedResponse result = apiInstance.acknowledgeChargebacks(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChargebacksApi#acknowledgeChargebacks");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import chargebacks_api
from openapi_client.model.chargeback_mark_processed_request import ChargebackMarkProcessedRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = chargebacks_api.ChargebacksApi(client)
body = ChargebackMarkProcessedRequest()  # ChargebackMarkProcessedRequest | Chargeback Receiver information
try:
    # This resource marks a received chargebacks as processed
    api_response = api_instance.acknowledge_chargebacks(body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Acknowledge Chargeback API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.ChargebacksApi();
let body = new MasterCom.ChargebackMarkProcessedRequest(); // ChargebackMarkProcessedRequest | Chargeback Receiver information
apiInstance.acknowledgeChargebacks(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::ChargebacksApi.new api_client
body = OpenapiClient::ChargebackMarkProcessedRequest.new # ChargebackMarkProcessedRequest | Chargeback Receiver information
begin
  # This resource marks a received chargebacks as processed
  result = api_instance.acknowledge_chargebacks(body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Acknowledge Chargeback API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\ChargebacksApi($client, $config);
$body = new \OpenAPI\Client\Model\ChargebackMarkProcessedRequest(); // \OpenAPI\Client\Model\ChargebackMarkProcessedRequest | Chargeback Receiver information
try {
    $result = $apiInstance->acknowledgeChargebacks($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Acknowledge Chargeback API: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new ChargebacksApi
            {
                Client = client
            }; 
            var body = new ChargebackMarkProcessedRequest(); // ChargebackMarkProcessedRequest | Chargeback Receiver information
            try
            {
                // This resource marks a received chargebacks as processed
                var result = apiInstance.AcknowledgeChargebacks(body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ChargebacksApi.AcknowledgeChargebacks: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Retrieve Chargeback Status {#retrieve-chargeback-status}

|          API Call          |                          Description                           |            URI             |   Response   |
|----------------------------|----------------------------------------------------------------|----------------------------|--------------|
| Retrieve chargeback status | This resource retrieves the processing status of a chargeback. | PUT /v6/chargebacks/status | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.ChargebacksApi;
import com.mastercard.api.mastercom.model.ChargebackStatusRequest;
import com.mastercard.api.mastercom.model.ChargebackStatusResponse;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        ChargebacksApi apiInstance = new ChargebacksApi(client);
        ChargebackStatusRequest body = new ChargebackStatusRequest(); // ChargebackStatusRequest | Chargeback information
        try {
            ChargebackStatusResponse result = apiInstance.retrieveChargebackStatus(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChargebacksApi#retrieveChargebackStatus");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import chargebacks_api
from openapi_client.model.chargeback_status_request import ChargebackStatusRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = chargebacks_api.ChargebacksApi(client)
 body = ChargebackStatusRequest() # ChargebackStatusRequest | Chargeback information
try:
    # This resource retrieves the processing status of a chargeback image
    api_response = api_instance.retrieve_chargeback_status(body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Chargeback Status API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.ChargebacksApi();
let body = new MasterCom.ChargebackStatusRequest(); // ChargebackStatusRequest | Chargeback information
apiInstance.retrieveChargebackStatus(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::ChargebacksApi.new api_client
body = OpenapiClient::ChargebackStatusRequest.new # ChargebackStatusRequest | Chargeback information
begin
  # This resource retrieves the processing status of a chargeback image
  result = api_instance.retrieve_chargeback_status(body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Chargeback Status API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\ChargebacksApi($client, $config);
$body = new \OpenAPI\Client\Model\ChargebackStatusRequest(); // \OpenAPI\Client\Model\ChargebackStatusRequest | Chargeback information
try {
    $result = $apiInstance->retrieveChargebackStatus($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Chargeback Status API: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new ChargebacksApi
            {
                Client = client
            }; 
            var body = new ChargebackStatusRequest(); // ChargebackStatusRequest | Chargeback information
            try
            {
                // This resource retrieves the processing status of a chargeback image
                var result = apiInstance.RetrieveChargebackStatus(body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ChargebacksApi.RetrieveChargebackStatus: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

## 3. Claims {#3-claims}

### Create Claim {#create-claim}

|   API Call   |            Description             |       URI       |   Response   |
|--------------|------------------------------------|-----------------|--------------|
| Create claim | This resource creates a new claim. | POST /v6/claims | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.ClaimsApi;
import com.mastercard.api.mastercom.model.ClaimResponse;
import com.mastercard.api.mastercom.model.CreateClaimRequest;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        ClaimsApi apiInstance = new ClaimsApi(client);
        CreateClaimRequest body = new CreateClaimRequest(); // CreateClaimRequest | Create Claim Request
        try {
            ClaimResponse result = apiInstance.createClaim(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClaimsApi#createClaim");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import claims_api
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = claims_api.ClaimsApi(client)
body = CreateClaimRequest()  # CreateClaimRequest | Create Claim Request
try:
    # This resource creates a new claim
    api_response = api_instance.create_claim(body)
    pprint(api_response)
except openapi_client.ApiException as e:
        print("Exception when calling Create Claim API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.ClaimsApi();
let body = new MasterCom.CreateClaimRequest(); // CreateClaimRequest | Create Claim Request
apiInstance.createClaim(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::ClaimsApi.new api_client
body = OpenapiClient::CreateClaimRequest.new # CreateClaimRequest | Create Claim Request
begin
  # This resource creates a new claim
  result = api_instance.create_claim(body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Create Claim API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\ClaimsApi($client, $config);
$body = new \OpenAPI\Client\Model\CreateClaimRequest(); // \OpenAPI\Client\Model\CreateClaimRequest | Create Claim Request
try {
    $result = $apiInstance->createClaim($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Create Claim API: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new ClaimsApi
            {
                Client = client
            }; 
            var body = new CreateClaimRequest(); // CreateClaimRequest | Create Claim Request
            try
            {
                // This resource creates a new claim
                var result = apiInstance.CreateClaim(body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ClaimsApi.CreateClaim: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Retrieve Claim {#retrieve-claim}

Before Retrieve Claim, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.

|    API Call    |                Description                 |            URI            |   Response   |
|----------------|--------------------------------------------|---------------------------|--------------|
| Retrieve claim | This resource retrieves a claim's details. | GET /v6/claims/{claim-id} | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.ClaimsApi;
import com.mastercard.api.mastercom.model.ClaimDetail;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        ClaimsApi apiInstance = new ClaimsApi(client);
        String claimId = "200002020654"; // String | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
        try {
            ClaimDetail result = apiInstance.getClaimDetail(claimId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClaimsApi#getClaimDetail");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import claims_api
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = claims_api.ClaimsApi(client)
claim_id = "200002020654"  # str | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
try:
    # Retrieve Claim Details
    api_response = api_instance.get_claim_detail(claim_id)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Retrieve Claim Details API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.ClaimsApi();
let claimId = '200002020654'; // String | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
apiInstance.getClaimDetail(claimId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::ClaimsApi.new api_client
claim_id = '200002020654' # String | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
begin
  # Retrieve Claim Details
  result = api_instance.get_claim_detail(claim_id)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Retrieve Claim Details API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\ClaimsApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
try {
    $result = $apiInstance->getClaimDetail($claim_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Retrieve Claim Details API: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#"); 
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new ClaimsApi
            {
                Client = client
            };
            var claimId = "200002020654";  // string | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
            try
            {
                // Retrieve Claim Details
                var result = apiInstance.GetClaimDetail(claimId);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ClaimsApi.GetClaimDetail: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Update Claim {#update-claim}

Before Update Claim, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.

|   API Call   |          Description           |            URI            |   Response   |
|--------------|--------------------------------|---------------------------|--------------|
| Update claim | This resource updates a claim. | PUT /v6/claims/{claim-id) | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.ClaimsApi;
import com.mastercard.api.mastercom.model.ClaimResponse;
import com.mastercard.api.mastercom.model.UpdateClaimRequest;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        ClaimsApi apiInstance = new ClaimsApi(client);
        String claimId = "200002020654"; // String | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
        UpdateClaimRequest body = new UpdateClaimRequest(); // UpdateClaimRequest | Update Claim Request
        try {
            ClaimResponse result = apiInstance.updateClaim(claimId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ClaimsApi#updateClaim");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import claims_api
from openapi_client.model.update_claim_request import UpdateClaimRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = claims_api.ClaimsApi(client)
claim_id = "200002020654"  # str | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
body = UpdateClaimRequest() # UpdateClaimRequest | Update Claim Request
try:
    # This resource updates a claim
    api_response = api_instance.update_claim(claim_id, body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Update Claim API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.ClaimsApi();
let claimId = '200002020654'; // String | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
let body = new MasterCom.UpdateClaimRequest(); // UpdateClaimRequest | Update Claim Request
apiInstance.updateClaim(claimId, body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::ClaimsApi.new api_client
claim_id = '200002020654' # String | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
body = OpenapiClient::UpdateClaimRequest.new # UpdateClaimRequest | Update Claim Request
begin
  # This resource updates a claim
  result = api_instance.update_claim(claim_id, body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Update Claim API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\ClaimsApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
$body = new \OpenAPI\Client\Model\UpdateClaimRequest(); // \OpenAPI\Client\Model\UpdateClaimRequest | Update Claim Request
try {
    $result = $apiInstance->updateClaim($claim_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Update Claim API: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");      
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey); 
            var apiInstance = new ClaimsApi
            {
                Client = client
            };
            var claimId = "200002020654";  // string | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
            var body = new UpdateClaimRequest(); // UpdateClaimRequest | Update Claim Request
            try
            {
                // This resource updates a claim
                var result = apiInstance.UpdateClaim(claimId, body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ClaimsApi.UpdateClaim: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

## 4. Fees {#4-fees}

### Create Fee Collection Event {#create-fee-collection-event}

Before Create Fee Collection, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.

|          API Call           |              Description               |              URI               |   Response   |
|-----------------------------|----------------------------------------|--------------------------------|--------------|
| Create fee collection event | This resource creates a new fee event. | POST /v6/claims/{claim-id}/fee | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.FeesApi;
import com.mastercard.api.mastercom.model.CreateFeeRequest;
import com.mastercard.api.mastercom.model.FeeResponse;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        FeesApi apiInstance = new FeesApi(client);
        String claimId = "200002020654"; // String | Claim Id for the Fee item.   Length: 1-19   Valid Values/Format: Numeric
        CreateFeeRequest body = new CreateFeeRequest(); // CreateFeeRequest | Create Fee Request
        try {
            FeeResponse result = apiInstance.createFee(claimId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FeesApi#createFee");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import fees_api
from openapi_client.model.create_fee_request import CreateFeeRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = fees_api.FeesApi(client)
claim_id = "200002020654"  # str | Claim Id for the Fee item.   Length: 1-19   Valid Values/Format: Numeric
body = CreateFeeRequest()  # CreateFeeRequest | Create Fee Request
try:
    # This resource creates a new fee event
    api_response = api_instance.create_fee(claim_id, body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Create Fee API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.FeesApi();
let claimId = '200002020654'; // String | Claim Id for the Fee item.   Length: 1-19   Valid Values/Format: Numeric
let body = new MasterCom.CreateFeeRequest(); // CreateFeeRequest | Create Fee Request
apiInstance.createFee(claimId, body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::FeesApi.new api_client
claim_id = '200002020654' # String | Claim Id for the Fee item.   Length: 1-19   Valid Values/Format: Numeric
body = OpenapiClient::CreateFeeRequest.new # CreateFeeRequest | Create Fee Request
begin
  # This resource creates a new fee event
  result = api_instance.create_fee(claim_id, body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Create Fee API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\FeesApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id for the Fee item.   Length: 1-19   Valid Values/Format: Numeric
$body = new \OpenAPI\Client\Model\CreateFeeRequest(); // \OpenAPI\Client\Model\CreateFeeRequest | Create Fee Request
try {
    $result = $apiInstance->createFee($claim_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Create Fee API: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#"); 
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new FeesApi
            {
                Client = client
            };
            var claimId = "200002020654";  // string | Claim Id for the Fee item.   Length: 1-19   Valid Values/Format: Numeric
            var body = new CreateFeeRequest(); // CreateFeeRequest | Create Fee Request
            try
            {
                // This resource creates a new fee event
                var result = apiInstance.CreateFee(claimId, body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling FeesApi.CreateFee: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Get Possible Values for Fee Collection Event {#get-possible-values-for-fee-collection-event}

Before Get Possible Values for Fee, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.

|                   API Call                   |                                     Description                                      |                      URI                       |   Response   |
|----------------------------------------------|--------------------------------------------------------------------------------------|------------------------------------------------|--------------|
| Get possible values for fee collection event | This resource retrieves a structure containing possible values used to create a fee. | GET /v6/claims/{claim-id}/fees/loaddataforfees | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.FeesApi;
import com.mastercard.api.mastercom.model.LoadDataForFeeResponse;
import com.mastercard.api.mastercom.model.LoadDataForFeesRequest;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        FeesApi apiInstance = new FeesApi(client);
        String claimId = "200002020654"; // String | Claim Id for the Fee.   Length: 1-19   Valid Values/Format: Numeric
        LoadDataForFeesRequest body = new LoadDataForFeesRequest(); // LoadDataForFeesRequest | Load Data For Fee Request
        try {
            LoadDataForFeeResponse result = apiInstance.getDataForCreateFee(claimId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FeesApi#getDataForCreateFee");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import fees_api
from openapi_client.model.load_data_for_fees_request import LoadDataForFeesRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = fees_api.FeesApi(client)
claim_id = "200002020654"  # str | Claim Id for the Fee.   Length: 1-19   Valid Values/Format: Numeric
body = LoadDataForFeesRequest()  # LoadDataForFeesRequest | Load Data For Fee Request
try:
    # This resource retrieves a structure containing possible values used to create a fee
    api_response = api_instance.get_data_for_create_fee(claim_id, body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Get Data for Fee API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.FeesApi();
let claimId = '200002020654'; // String | Claim Id for the Fee.   Length: 1-19   Valid Values/Format: Numeric
let body = new MasterCom.LoadDataForFeesRequest(); // LoadDataForFeesRequest | Load Data For Fee Request
apiInstance.getDataForCreateFee(claimId, body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::FeesApi.new api_client
claim_id = '200002020654' # String | Claim Id for the Fee.   Length: 1-19   Valid Values/Format: Numeric
body = OpenapiClient::LoadDataForFeesRequest.new # LoadDataForFeesRequest | Load Data For Fee Request
begin
  # This resource retrieves a structure containing possible values used to create a fee
  result = api_instance.get_data_for_create_fee(claim_id, body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Get Data for Fee API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\FeesApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id for the Fee.   Length: 1-19   Valid Values/Format: Numeric
$body = new \OpenAPI\Client\Model\LoadDataForFeesRequest(); // \OpenAPI\Client\Model\LoadDataForFeesRequest | Load Data For Fee Request
try {
    $result = $apiInstance->getDataForCreateFee($claim_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Get Data for Fee API: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");   
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);          
            var apiInstance = new FeesApi
            {
                Client = client
            };
            var claimId = "200002020654";  // string | Claim Id for the Fee.   Length: 1-19   Valid Values/Format: Numeric
            var body = new LoadDataForFeesRequest(); // LoadDataForFeesRequest | Load Data For Fee Request
            try
            {
                // This resource retrieves a structure containing possible values used to create a fee
                var result = apiInstance.GetDataForCreateFee(claimId, body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling FeesApi.GetDataForCreateFee: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

## 5. Fraud {#5-fraud}

### Create Fraud Item {#create-fraud-item}

Before Create Fraud, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.

|     API Call      |                         Description                          |                     URI                     |   Response   |
|-------------------|--------------------------------------------------------------|---------------------------------------------|--------------|
| Create fraud item | This resource is used to create a fraud item for Mastercard. | POST /v6/claims/{claim-id}/fraud/mastercard | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.FraudApi;
import com.mastercard.api.mastercom.model.CreateFraudMastercardRequest;
import com.mastercard.api.mastercom.model.FraudResponse;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        FraudApi apiInstance = new FraudApi(client);
        String claimId = "200002020654"; // String | Claim Id for the fraud item.   Length: 1-19   Valid Values/Format: Numeric
        CreateFraudMastercardRequest body = new CreateFraudMastercardRequest(); // CreateFraudMastercardRequest | Create Fraud Mastercard Request
        try {
            FraudResponse result = apiInstance.createFraudMastercard(claimId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FraudApi#createFraudMastercard");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import fraud_api
from openapi_client.model.create_fraud_master_card_request import CreateFraudMastercardRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = fraud_api.FraudApi(client)
claim_id = "200002020654"  # str | Claim Id for the fraud item.   Length: 1-19   Valid Values/Format: Numeric
body = CreateFraudMastercardRequest()  # CreateFraudMastercardRequest | Create Fraud Mastercard Request
try:
    # This resource is used to create a fraud item for Mastercard
    api_response = api_instance.create_fraud_master_card(claim_id, body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Create Fraud API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.FraudApi();
let claimId = '200002020654'; // String | Claim Id for the fraud item.   Length: 1-19   Valid Values/Format: Numeric
let body = new MasterCom.CreateFraudMastercardRequest(); // CreateFraudMastercardRequest | Create Fraud Mastercard Request
apiInstance.createFraudMastercard(claimId, body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::FraudApi.new api_client
claim_id = '200002020654' # String | Claim Id for the fraud item.   Length: 1-19   Valid Values/Format: Numeric
body = OpenapiClient::CreateFraudMastercardRequest.new # CreateFraudMastercardRequest | Create Fraud Mastercard Request
begin
  # This resource is used to create a fraud item for Mastercard
  result = api_instance.create_fraud_master_card(claim_id, body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Create Fraud API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\FraudApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id for the fraud item.   Length: 1-19   Valid Values/Format: Numeric
$body = new \OpenAPI\Client\Model\CreateFraudMastercardRequest(); // \OpenAPI\Client\Model\CreateFraudMastercardRequest | Create Fraud Mastercard Request
try {
    $result = $apiInstance->createFraudMastercard($claim_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Create Fraud API: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");  
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey); 
            var apiInstance = new FraudApi
            {
                Client = client
            };
            var claimId = "200002020654";  // string | Claim Id for the fraud item.   Length: 1-19   Valid Values/Format: Numeric
            var body = new CreateFraudMastercardRequest(); // CreateFraudMastercardRequest | Create Fraud Mastercard Request
            try
            {
                // This resource is used to create a fraud item for Mastercard
                var result = apiInstance.CreateFraudMastercard(claimId, body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling FraudApi.CreateFraudMastercard: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

#### Get Possible Values for Fraud Item {#get-possible-values-for-fraud-item}

Before Get Possible Values for Fraud, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.

|              API Call              |                                         Description                                         |                       URI                        |   Response   |
|------------------------------------|---------------------------------------------------------------------------------------------|--------------------------------------------------|--------------|
| Get possible values for fraud item | This resource retrieves a structure containing possible values used to create a fraud item. | GET /v6/claims/{claim-id}/fraud/loaddataforfraud | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.FraudApi;
import com.mastercard.api.mastercom.model.LoadDataForFraudResponse;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        FraudApi apiInstance = new FraudApi(client);
        String claimId = "200002020654"; // String | Claim Id for the fraud item.   Length: 1-19   Valid Values/Format: Numeric
        try {
            LoadDataForFraudResponse result = apiInstance.getDataForCreateFraud(claimId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FraudApi#getDataForCreateFraud");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import fraud_api
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = fraud_api.FraudApi(client)
claim_id = "200002020654"  # str | Claim Id for the fraud item.   Length: 1-19   Valid Values/Format: Numeric
try:
    # This resource retrieves a structure containing possible values used to create a fraud item
    api_response = api_instance.get_data_for_create_fraud(claim_id)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Get Data for Fraud API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.FraudApi();
let claimId = '200002020654'; // String | Claim Id for the fraud item.   Length: 1-19   Valid Values/Format: Numeric
apiInstance.getDataForCreateFraud(claimId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::FraudApi.new api_client
claim_id = '200002020654' # String | Claim Id for the fraud item.   Length: 1-19   Valid Values/Format: Numeric
begin
  # This resource retrieves a structure containing possible values used to create a fraud item
  result = api_instance.get_data_for_create_fraud(claim_id)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Get Data for Fraud API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\FraudApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id for the fraud item.   Length: 1-19   Valid Values/Format: Numeric
try {
    $result = $apiInstance->getDataForCreateFraud($claim_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Get Data for Fraud API: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");   
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);   
            var apiInstance = new FraudApi
            {
                Client = client
            };
            var claimId = "200002020654";  // string | Claim Id for the fraud item.   Length: 1-19   Valid Values/Format: Numeric
            try
            {
                // This resource retrieves a structure containing possible values used to create a fraud item
                var result = apiInstance.GetDataForCreateFraud(claimId);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling FraudApi.GetDataForCreateFraud: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

## 6. Queues {#6-queues}

### Retrieve Queue Names {#retrieve-queue-names}

|       API Call       |                  Description                   |         URI          |   Response   |
|----------------------|------------------------------------------------|----------------------|--------------|
| Retrieve queue names | This resource retrieves a list of queue names. | GET /v6/queues/names | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.QueuesApi;
import com.mastercard.api.mastercom.model.Queue;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
import java.util.List;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        QueuesApi apiInstance = new QueuesApi(client);
        try {
            List<Queue> result = apiInstance.getQueues();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QueuesApi#getQueues");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import queues_api
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = queues_api.QueuesApi(client)
try:
    # This resource retrieves a list of queue names
    api_response = api_instance.get_queues()
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Retrieve Queue Names API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.QueuesApi();
apiInstance.getQueues((error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::QueuesApi.new api_client
begin
  # This resource retrieves a list of queue names
  result = api_instance.get_queues
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Retrieve Queue Names API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\QueuesApi($client, $config);
try {
    $result = $apiInstance->getQueues();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Queue Names API: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new QueuesApi
            {
                Client = client
            };
            try
            {
                var queuesList = apiInstance.GetQueues();
                queuesList.ForEach(q => Console.WriteLine("  " + q.ToJson()));
            }
            catch (ApiException e)
            {
                Console.WriteLine("Exception: " + e.Message);
                Console.WriteLine("Error Code: " + e.ErrorCode);
                Console.WriteLine(e.StackTrace);
            }
        }
    }
}
```

### Retrieve Claims from Queue {#retrieve-claims-from-queue}

Before Retrieve Claims from Queue, [Retrieve Queue Names](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-queue-names) can be used to retrieve a queue-name.

|          API Call          |                     Description                      |      URI       |   Response   |
|----------------------------|------------------------------------------------------|----------------|--------------|
| Retrieve claims from queue | This resource retrieves claims within a given queue. | GET /v6/queues | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.QueuesApi;
import com.mastercard.api.mastercom.model.ClaimSummary;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
import java.util.List;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        QueuesApi apiInstance = new QueuesApi(client);
        String queueName = "Rejects"; // String | The queue to be queried for a list of claims.   Length: 1-30   Valid Values/Format: Alpha
        try {
            List<ClaimSummary> result = apiInstance.getQueueSummary(queueName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QueuesApi#getQueueSummary");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import queues_api
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = queues_api.QueuesApi(client)
queue_name = "Rejects"  # str | The queue to be queried for a list of claims.   Length: 1-30   Valid Values/Format: Alpha
try:
    # This resource retrieves claims within given queue
    api_response = api_instance.get_queue_summary(queue_name)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Retrieve Claims from Queue API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.QueuesApi();
let queueName = 'Rejects'; // String | The queue to be queried for a list of claims.   Length: 1-30   Valid Values/Format: Alpha
apiInstance.getQueueSummary(queueName, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::QueuesApi.new api_client
queue_name = 'Rejects' # String | The queue to be queried for a list of claims.   Length: 1-30   Valid Values/Format: Alpha
begin
  # This resource retrieves claims within given queue
  result = api_instance.get_queue_summary(queue_name)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Retrieve Claims from Queue API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\QueuesApi($client, $config);
$queue_name = 'Rejects'; // string | The queue to be queried for a list of claims.   Length: 1-30   Valid Values/Format: Alpha
try {
    $result = $apiInstance->getQueueSummary($queue_name);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Queue Claims API: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new QueuesApi
            {
                Client = client
            };
            var queueName = "Rejects";  // string | The queue to be queried for a list of claims.   Length: 1-30   Valid Values/Format: Alpha
            try
            {
                // This resource retrieves claims within given queue
                var claimSummaryList = apiInstance.GetQueueSummary(queueName);
                claimSummaryList.ForEach(c => Console.WriteLine("  " + c.ToJson()));
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling QueuesApi.GetQueueSummary: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Retrieve Claims from Queue within Date Range {#retrieve-claims-from-queue-within-date-range}

|                   API Call                   |                                         Description                                         |       URI       |   Response   |
|----------------------------------------------|---------------------------------------------------------------------------------------------|-----------------|--------------|
| Retrieve claims from queue within date range | Allows the retrieval of claims in a queue within the Last Modified Date range of the claim. | POST /v6/queues | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.QueuesApi;
import com.mastercard.api.mastercom.model.GetQueueContentRequest;
import com.mastercard.api.mastercom.model.QueueContentSummary;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        QueuesApi apiInstance = new QueuesApi(client);
        GetQueueContentRequest body = new GetQueueContentRequest(); // GetQueueContentRequest | Get queue content request
        try {
            QueueContentSummary result = apiInstance.getQueueSummaryPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QueuesApi#getQueueSummaryPost");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import queues_api
from openapi_client.model.get_queue_content_request import GetQueueContentRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = queues_api.QueuesApi(client)
body = GetQueueContentRequest()  # GetQueueContentRequest | Get queue content request
try:
    # Allows the retrieval of claims in a queue within Last Modified Date range of the claim
    api_response = api_instance.get_queue_summary_post(body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Retrieve Claims from Queue with Dates: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.QueuesApi();
let body = new MasterCom.GetQueueContentRequest(); // GetQueueContentRequest | Get queue content request
apiInstance.getQueueSummaryPost(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::QueuesApi.new api_client
body = OpenapiClient::GetQueueContentRequest.new # GetQueueContentRequest | Get queue content request
begin
  # Allows the retrieval of claims in a queue within Last Modified Date range of the claim
  result = api_instance.get_queue_summary_post(body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Retrieve Claims from Queue with Dates API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\QueuesApi($client, $config);
$body = new \OpenAPI\Client\Model\GetQueueContentRequest(); // \OpenAPI\Client\Model\GetQueueContentRequest | Get queue content request
try {
    $result = $apiInstance->getQueueSummaryPost($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QueuesApi->getQueueSummaryPost: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");  
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey); 
            var apiInstance = new QueuesApi
            {
                Client = client
            };
            var body = new GetQueueContentRequest(); // GetQueueContentRequest | Get queue content request
            try
            {
                // Allows the retrieval of claims in a queue within Last Modified Date range of the claim
                var result = apiInstance.GetQueueSummaryPost(body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling QueuesApi.GetQueueSummaryPost: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

## 7. Retrievals {#7-retrievals}

### Create Retrieval Request {#create-retrieval-request}

Before Create Retrieval Request, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.

|         API Call         |                  Description                   |                     URI                      |   Response   |
|--------------------------|------------------------------------------------|----------------------------------------------|--------------|
| Create retrieval request | This resource creates a new retrieval request. | POST /v6/claims/{claim-id}/retrievalrequests | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.RetrievalsApi;
import com.mastercard.api.mastercom.model.CreateRetrievalRequest;
import com.mastercard.api.mastercom.model.CreateRetrievalResponse;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        RetrievalsApi apiInstance = new RetrievalsApi(client);
        String claimId = "200002020654"; // String | Claim Id for the retrieval request.   Length: 1-19   Valid Values/Format: Numeric
        CreateRetrievalRequest body = new CreateRetrievalRequest(); // CreateRetrievalRequest | Create Retrieval Request
        try {
            CreateRetrievalResponse result = apiInstance.createRetrievalRequest(claimId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RetrievalsApi#createRetrievalRequest");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import retrievals_api
from openapi_client.model.create_retrieval_request import CreateRetrievalRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = retrievals_api.RetrievalsApi(client)
claim_id = "200002020654"  # str | Claim Id for the retrieval request.   Length: 1-19   Valid Values/Format: Numeric
body = CreateRetrievalRequest()  # CreateRetrievalRequest | Create Retrieval Request
try:
    # This resource creates a new retrieval request
    api_response = api_instance.create_retrieval_request(claim_id, body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Create Retrieval Request API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.RetrievalsApi();
let claimId = '200002020654'; // String | Claim Id for the retrieval request.   Length: 1-19   Valid Values/Format: Numeric
let body = new MasterCom.CreateRetrievalRequest(); // CreateRetrievalRequest | Create Retrieval Request
apiInstance.createRetrievalRequest(claimId, body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::RetrievalsApi.new api_client
claim_id = '200002020654' # String | Claim Id for the retrieval request.   Length: 1-19   Valid Values/Format: Numeric
body = OpenapiClient::CreateRetrievalRequest.new # CreateRetrievalRequest | Create Retrieval Request
begin
  # This resource creates a new retrieval request
  result = api_instance.create_retrieval_request(claim_id, body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Create Retrieval Request API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\RetrievalsApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id for the retrieval request.   Length: 1-19   Valid Values/Format: Numeric
$body = new \OpenAPI\Client\Model\CreateRetrievalRequest(); // \OpenAPI\Client\Model\CreateRetrievalRequest | Create Retrieval Request
try {
    $result = $apiInstance->createRetrievalRequest($claim_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RetrievalsApi->createRetrievalRequest: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new RetrievalsApi
            {
                Client = client
            };
            var claimId = "200002020654";  // string | Claim Id for the retrieval request.   Length: 1-19   Valid Values/Format: Numeric
            var body = new CreateRetrievalRequest(); // CreateRetrievalRequest | Create Retrieval Request
            try
            {
                // This resource creates a new retrieval request
                var result = apiInstance.CreateRetrievalRequest(claimId, body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling RetrievalsApi.CreateRetrievalRequest: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Acquirer Fulfill a Request {#acquirer-fulfill-a-request}

Before Acquirer Fulfill Request, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.  

[Create Retrieval Request](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-retrieval-request) can be used to create a new request-id, or [Retrieve Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claim) can be used to retrieve an existing request-id associated with a claim.

|          API Call          |                            Description                             |                                  URI                                   |   Response   |
|----------------------------|--------------------------------------------------------------------|------------------------------------------------------------------------|--------------|
| Acquirer fulfill a request | This resource is used by Acquirers to fulfill a retrieval request. | POST /v6/claims/{claim-id}/retrievalrequests/{request-id}/fulfillments | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.RetrievalsApi;
import com.mastercard.api.mastercom.model.AcquirerFulfillmentRequest;
import com.mastercard.api.mastercom.model.AcquirerFulfillmentResponse;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        RetrievalsApi apiInstance = new RetrievalsApi(client);
        String claimId = "200002020654"; // String | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
        String requestId = "300002296235"; // String | Request Id for the retrieval request.   Length: 1-19   Valid Values/Format: Numeric
        AcquirerFulfillmentRequest body = new AcquirerFulfillmentRequest(); // AcquirerFulfillmentRequest | Acquirer Retrieval Fulfillment information
        try {
            AcquirerFulfillmentResponse result = apiInstance.acqFulfillRetrievalRequest(claimId, requestId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RetrievalsApi#acqFulfillRetrievalRequest");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import retrievals_api
from openapi_client.model.acquirer_fulfillment_request import AcquirerFulfillmentRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = retrievals_api.RetrievalsApi(client)
claim_id = "200002020654"  # str | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
request_id = "300002296235"  # str | Request Id for the retrieval request.   Length: 1-19   Valid Values/Format: Numeric
body = AcquirerFulfillmentRequest()  # AcquirerFulfillmentRequest | Acquirer Retrieval Fulfillment information
try:
    # This resource is used by Acquirers to fulfill a retrieval request
    api_response = api_instance.acq_fulfill_retrieval_request(claim_id, request_id, body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Acquirer Fulfill API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.RetrievalsApi();
let claimId = '200002020654'; // String | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
let requestId = '300002296235'; // String | Request Id for the retrieval request.   Length: 1-19   Valid Values/Format: Numeric
let body = new MasterCom.AcquirerFulfillmentRequest(); // AcquirerFulfillmentRequest | Acquirer Retrieval Fulfillment information
apiInstance.acqFulfillRetrievalRequest(claimId, requestId, body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::RetrievalsApi.new api_client
claim_id = '200002020654' # String | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
request_id = '300002296235' # String | Request Id for the retrieval request.   Length: 1-19   Valid Values/Format: Numeric
body = OpenapiClient::AcquirerFulfillmentRequest.new # AcquirerFulfillmentRequest | Acquirer Retrieval Fulfillment information
begin
  # This resource is used by Acquirers to fulfill a retrieval request
  result = api_instance.acq_fulfill_retrieval_request(claim_id, request_id, body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Acquirer Fulfill Retrieval Request API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\RetrievalsApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
$request_id = '300002296235'; // string | Request Id for the retrieval request.   Length: 1-19   Valid Values/Format: Numeric
$body = new \OpenAPI\Client\Model\AcquirerFulfillmentRequest(); // \OpenAPI\Client\Model\AcquirerFulfillmentRequest | Acquirer Retrieval Fulfillment information
try {
    $result = $apiInstance->acqFulfillRetrievalRequest($claim_id, $request_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RetrievalsApi->acqFulfillRetrievalRequest: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#"); 
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new RetrievalsApi
            {
                Client = client
            };
            var claimId = "200002020654";  // string | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
            var requestId = "300002296235";  // string | Request Id for the retrieval request.   Length: 1-19   Valid Values/Format: Numeric
            var body = new AcquirerFulfillmentRequest(); // AcquirerFulfillmentRequest | Acquirer Retrieval Fulfillment information
            try
            {
                // This resource is used by Acquirers to fulfill a retrieval request
                var result = apiInstance.AcqFulfillRetrievalRequest(claimId, requestId, body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling RetrievalsApi.AcqFulfillRetrievalRequest: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Issuer Respond to Fulfillment {#issuer-respond-to-fulfillment}

Before Issuer Respond to Fulfillment Request, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.
[Create Retrieval Request](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-retrieval-request) can be used to create a new request-id, or [Retrieve Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claim) can be used to retrieve an existing request-id associated with a claim.

|           API Call            |                          Description                          |                                       URI                                        |   Response   |
|-------------------------------|---------------------------------------------------------------|----------------------------------------------------------------------------------|--------------|
| Issuer respond to fulfillment | This resource is used by Issuers to respond to a fulfillment. | POST /v6/claims/{claim-id}/retrievalrequests/{request-id}/fulfillments/ response | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.RetrievalsApi;
import com.mastercard.api.mastercom.model.IssuerFulfillmentRequest;
import com.mastercard.api.mastercom.model.RetrievalResponse;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        RetrievalsApi apiInstance = new RetrievalsApi(client);
        String claimId = "200002020654"; // String | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
        String requestId = "300002296235"; // String | Request Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
        IssuerFulfillmentRequest body = new IssuerFulfillmentRequest(); // IssuerFulfillmentRequest | Issuer Fulfillment Response
        try {
            RetrievalResponse result = apiInstance.issuerResponseRetrievalRequest(claimId, requestId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RetrievalsApi#issuerResponseRetrievalRequest");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import retrievals_api
from openapi_client.model.issuer_fulfillment_request import IssuerFulfillmentRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = retrievals_api.RetrievalsApi(client)
claim_id = "200002020654"  # str | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
request_id = "300002296235"  # str | Request Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
body = IssuerFulfillmentRequest()  # IssuerFulfillmentRequest | Issuer Fulfillment Response
try:
    # This resource is used by Issuers to respond to a fulfillment
    api_response = api_instance.issuer_response_retrieval_request(claim_id, request_id, body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Issuer Respond Fulfillment API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.RetrievalsApi();
let claimId = '200002020654'; // String | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
let requestId = '300002296235'; // String | Request Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
let body = new MasterCom.IssuerFulfillmentRequest(); // IssuerFulfillmentRequest | Issuer Fulfillment Response
apiInstance.issuerResponseRetrievalRequest(claimId, requestId, body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::RetrievalsApi.new api_client
claim_id = '200002020654' # String | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
request_id = '300002296235' # String | Request Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
body = OpenapiClient::IssuerFulfillmentRequest.new # IssuerFulfillmentRequest | Issuer Fulfillment Response
begin
  # This resource is used by Issuers to respond to a fulfillment
  result = api_instance.issuer_response_retrieval_request(claim_id, request_id, body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Issuer Respond to Fulfillment API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\RetrievalsApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
$request_id = '300002296235'; // string | Request Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
$body = new \OpenAPI\Client\Model\IssuerFulfillmentRequest(); // \OpenAPI\Client\Model\IssuerFulfillmentRequest | Issuer Fulfillment Response
try {
    $result = $apiInstance->issuerResponseRetrievalRequest($claim_id, $request_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RetrievalsApi->issuerResponseRetrievalRequest: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new RetrievalsApi
            {
                Client = client
            };
            var claimId = "200002020654";  // string | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
            var requestId = "300002296235";  // string | Request Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
            var body = new IssuerFulfillmentRequest(); // IssuerFulfillmentRequest | Issuer Fulfillment Response
            try
            {
                // This resource is used by Issuers to respond to a fulfillment
                var result = apiInstance.IssuerResponseRetrievalRequest(claimId, requestId, body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling RetrievalsApi.IssuerResponseRetrievalRequest: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Get Possible Value Lists for Create {#get-possible-value-lists-for-create}

Before Get Possible Values for Retrieval, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.

|              API Call               |                                            Description                                             |                                   URI                                   |   Response   |
|-------------------------------------|----------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------|--------------|
| Get possible value lists for create | This resource retrieves a structure containing possible values used to create a retrieval request. | GET /v6/claims/{claim-id}/retrievalrequest/loaddataforretrievalrequests | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.RetrievalsApi;
import com.mastercard.api.mastercom.model.LoadDataForRetrievalResponse;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        RetrievalsApi apiInstance = new RetrievalsApi(client);
        String claimId = "200002020654"; // String | Claim Id for the retrieval request.   Length: 1-19   Valid Values/Format: Numeric
        try {
            LoadDataForRetrievalResponse result = apiInstance.getDataForCreateRetrievalRequest(claimId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RetrievalsApi#getDataForCreateRetrievalRequest");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import retrievals_api
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = retrievals_api.RetrievalsApi(client)
claim_id = "200002020654"  # str | Claim Id for the retrieval request.   Length: 1-19   Valid Values/Format: Numeric
try:
    # This resource retrieves a structure containing possible values used to create a retrieval request
    api_response = api_instance.get_data_for_create_retrieval_request(claim_id)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Retrieve Data for Retrieval Request API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.RetrievalsApi();
let claimId = '200002020654'; // String | Claim Id for the retrieval request.   Length: 1-19   Valid Values/Format: Numeric
apiInstance.getDataForCreateRetrievalRequest(claimId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::RetrievalsApi.new api_client
claim_id = '200002020654' # String | Claim Id for the retrieval request.   Length: 1-19   Valid Values/Format: Numeric
begin
  # This resource retrieves a structure containing possible values used to create a retrieval request
  result = api_instance.get_data_for_create_retrieval_request(claim_id)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Get Data for Retrieval Request API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\RetrievalsApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id for the retrieval request.   Length: 1-19   Valid Values/Format: Numeric
try {
    $result = $apiInstance->getDataForCreateRetrievalRequest($claim_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RetrievalsApi->getDataForCreateRetrievalRequest: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new RetrievalsApi
            {
                Client = client
            };
            var claimId = "200002020654";  // string | Claim Id for the retrieval request.   Length: 1-19   Valid Values/Format: Numeric
            try
            {
                // This resource retrieves a structure containing possible values used to create a retrieval request
                var result = apiInstance.GetDataForCreateRetrievalRequest(claimId);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling RetrievalsApi.GetDataForCreateRetrievalRequest: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Get documentation {#get-documentation}

Before Get Retrieval Doc, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.  

[Create Retrieval Request](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-retrieval-request) can be used to create a new request-id, or [Retrieve Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claim) can be used to retrieve an existing request-id associated with a claim.

|     API Call      |                             Description                             |                                URI                                 |   Response   |
|-------------------|---------------------------------------------------------------------|--------------------------------------------------------------------|--------------|
| Get Documentation | This resource retrievals all documentation for a retrieval request. | GET /v6/claims/{claim-id}/retrievalrequests/{request-id}/documents | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.RetrievalsApi;
import com.mastercard.api.mastercom.model.DocumentResponseStructure;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        RetrievalsApi apiInstance = new RetrievalsApi(client);
        String claimId = "200002020654"; // String | The Claim Id.   Length: 1-19   Valid Values/Format: Numeric
        String requestId = "300002296235"; // String | The Request Id.   Length: 1-19   Valid Values/Format: Numeric
        String format = "ORIGINAL"; // String | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
        try {
            DocumentResponseStructure result = apiInstance.getRetrievalDoc(claimId, requestId, format);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RetrievalsApi#getRetrievalDoc");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import retrievals_api
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = retrievals_api.RetrievalsApi(client)
claim_id = "200002020654"  # str | The Claim Id.   Length: 1-19   Valid Values/Format: Numeric
request_id = "300002296235"  # str | The Request Id.   Length: 1-19   Valid Values/Format: Numeric
format = "ORIGINAL"  # str | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
try:
    # This resource retrievals all documentation for a retrieval request
    api_response = api_instance.get_retrieval_doc(claim_id, request_id, format)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Retrieval Document API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.RetrievalsApi();
let claimId = '200002020654'; // String | The Claim Id.   Length: 1-19   Valid Values/Format: Numeric
let requestId = '300002296235'; // String | The Request Id.   Length: 1-19   Valid Values/Format: Numeric
let format = 'ORIGINAL'; // String | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
apiInstance.getRetrievalDoc(claimId, requestId, format, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::RetrievalsApi.new api_client
claim_id = '200002020654' # String | The Claim Id.   Length: 1-19   Valid Values/Format: Numeric
request_id = '300002296235' # String | The Request Id.   Length: 1-19   Valid Values/Format: Numeric
format = 'ORIGINAL' # String | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
begin
  # This resource retrievals all documentation for a retrieval request
  result = api_instance.get_retrieval_doc(claim_id, request_id, format)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Get Retrieval Doc API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\RetrievalsApi($client, $config);
$claim_id = '200002020654'; // string | The Claim Id.   Length: 1-19   Valid Values/Format: Numeric
$request_id = '300002296235'; // string | The Request Id.   Length: 1-19   Valid Values/Format: Numeric
$format = 'ORIGINAL'; // string | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
try {
    $result = $apiInstance->getRetrievalDoc($claim_id, $request_id, $format);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RetrievalsApi->getRetrievalDoc: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new RetrievalsApi
            {
                Client = client
            };
            var claimId = "200002020654";  // string | The Claim Id.   Length: 1-19   Valid Values/Format: Numeric
            var requestId = "300002296235";  // string | The Request Id.   Length: 1-19   Valid Values/Format: Numeric
            var format = "ORIGINAL";  // string | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
            try
            {
                // This resource retrievals all documentation for a retrieval request
                var result = apiInstance.GetRetrievalDoc(claimId, requestId, format);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling RetrievalsApi.GetRetrievalDoc: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Retrieval Fulfillment Status {#retrieval-fulfillment-status}

|           API Call           |                           Description                           |               URI                |   Response   |
|------------------------------|-----------------------------------------------------------------|----------------------------------|--------------|
| Retrieval Fulfillment Status | This resource retrieves the processing status of a fulfillment. | PUT /v6/retrievalrequests/status | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.RetrievalsApi;
import com.mastercard.api.mastercom.model.RetrievalStatusRequest;
import com.mastercard.api.mastercom.model.RetrievalStatusResponse;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        RetrievalsApi apiInstance = new RetrievalsApi(client);
        RetrievalStatusRequest body = new RetrievalStatusRequest(); // RetrievalStatusRequest | Retrieval information
        try {
            RetrievalStatusResponse result = apiInstance.retrieveFulfillmentStatus(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RetrievalsApi#retrieveFulfillmentStatus");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import retrievals_api
from openapi_client.model.retrieval_status_request import RetrievalStatusRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = retrievals_api.RetrievalsApi(client)
body = RetrievalStatusRequest()  # RetrievalStatusRequest | Retrieval information
try:
    # This resource retrieves the processing status of a fulfilment image
    api_response = api_instance.retrieve_fulfillment_status(body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Retrieval Status API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.RetrievalsApi();
let body = new MasterCom.RetrievalStatusRequest(); // RetrievalStatusRequest | Retrieval information
apiInstance.retrieveFulfillmentStatus(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::RetrievalsApi.new api_client
body = OpenapiClient::RetrievalStatusRequest.new # RetrievalStatusRequest | Retrieval information
begin
  # This resource retrieves the processing status of a fulfilment image
  result = api_instance.retrieve_fulfillment_status(body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Retrieval Request Status API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\RetrievalsApi($client, $config);
$body = new \OpenAPI\Client\Model\RetrievalStatusRequest(); // \OpenAPI\Client\Model\RetrievalStatusRequest | Retrieval information
try {
    $result = $apiInstance->retrieveFulfillmentStatus($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RetrievalsApi->retrieveFulfillmentStatus: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new RetrievalsApi
            {
                Client = client
            };
            var body = new RetrievalStatusRequest(); // RetrievalStatusRequest | Retrieval information
            try
            {
                // This resource retrieves the processing status of a fulfilment image
                var result = apiInstance.RetrieveFulfillmentStatus(body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling RetrievalsApi.RetrieveFulfillmentStatus: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

## 8. Transactions {#8-transactions}

### Transaction Search {#transaction-search}

|        API Call        |                     Description                      |             URI              |   Response   |
|------------------------|------------------------------------------------------|------------------------------|--------------|
| Search for transaction | This resource is used to query for transaction data. | POST /v6/transactions/search | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.TransactionsApi;
import com.mastercard.api.mastercom.model.TransactionSearchRequest;
import com.mastercard.api.mastercom.model.TransactionSummary;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        TransactionsApi apiInstance = new TransactionsApi(client);
        TransactionSearchRequest body = new TransactionSearchRequest(); // TransactionSearchRequest | Transaction Search Request
        try {
            TransactionSummary result = apiInstance.transactionSearch(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TransactionsApi#transactionSearch");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import transactions_api
from openapi_client.model.transaction_search_request import TransactionSearchRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = transactions_api.TransactionsApi(client)
body = TransactionSearchRequest()  # TransactionSearchRequest | Transaction Search Request
try:
    # This resource is used to query for transaction data
    api_response = api_instance.transaction_search(body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Transaction Search API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.TransactionsApi();
let body = new MasterCom.TransactionSearchRequest(); // TransactionSearchRequest | Transaction Search Request
apiInstance.transactionSearch(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::TransactionsApi.new api_client
body = OpenapiClient::TransactionSearchRequest.new # TransactionSearchRequest | Transaction Search Request
begin
  # This resource is used to query for transaction data
  result = api_instance.transaction_search(body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Transaction Search API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\TransactionsApi($client, $config);
$body = new \OpenAPI\Client\Model\TransactionSearchRequest(); // \OpenAPI\Client\Model\TransactionSearchRequest | Transaction Search Request
try {
    $result = $apiInstance->transactionSearch($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TransactionsApi->transactionSearch: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new TransactionsApi
            {
                Client = client
            };
            var body = new TransactionSearchRequest(); // TransactionSearchRequest | Transaction Search Request
            try
            {
                // This resource is used to query for transaction data
                var result = apiInstance.TransactionSearch(body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling TransactionsApi.TransactionSearch: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Retrieve Clearing Details {#retrieve-clearing-details}

Before Retrieve Transaction Clearing Details, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.
[Transaction Search](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#transaction-search) can be used to retrieve transaction-id.

|         API Call         |                                Description                                 |                               URI                                |   Response   |
|--------------------------|----------------------------------------------------------------------------|------------------------------------------------------------------|--------------|
| Retrieve clearing detail | This resource is used to retrieve clearing detail for a given transaction. | GET /v6/claims/{claim-id}/transactions/clearing/{transaction-id} | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.TransactionsApi;
import com.mastercard.api.mastercom.model.ClearingDetail;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        TransactionsApi apiInstance = new TransactionsApi(client);
        String claimId = "200002020654"; // String | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
        String transactionId = "FIEaEgnM3bwPijwZgjc3Te+Y0ieLbN9ijUugqNSvJmVbO1xs6Jh5iIlmpOpkbax79L8Yj1rBOWBACx+Vj17rzvOepWobpgWNJNdsgHB4ag"; // String | Clearing transaction id.   Length: N/A   Valid Values/Format: Alphanumeric, Special Char (~!@#$%^&*()_+{}|:\"<>?,./;'[]-=)
        try {
            ClearingDetail result = apiInstance.getTransactionClearingDetail(claimId, transactionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TransactionsApi#getTransactionClearingDetail");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import transactions_api
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = transactions_api.TransactionsApi(client)
claim_id = "200002020654"  # str | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
transaction_id = "FIEaEgnM3bwPijwZgjc3Te+Y0ieLbN9ijUugqNSvJmVbO1xs6Jh5iIlmpOpkbax79L8Yj1rBOWBACx+Vj17rzvOepWobpgWNJNdsgHB4ag"  # str | Clearing transaction id.   Length: N/A   Valid Values/Format: Alphanumeric, Special Char (~!@#$%^&*()_+{}|:\"<>?,./;'[]-=)
try:
    # This resource is used to retrieve clearing detail for a given transaction
    api_response = api_instance.get_transaction_clearing_detail(claim_id, transaction_id)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Transaction Clearing Details API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.TransactionsApi();
let claimId = '200002020654'; // String | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
let transactionId = 'FIEaEgnM3bwPijwZgjc3Te+Y0ieLbN9ijUugqNSvJmVbO1xs6Jh5iIlmpOpkbax79L8Yj1rBOWBACx+Vj17rzvOepWobpgWNJNdsgHB4ag'; // String | Clearing transaction id.   Length: N/A   Valid Values/Format: Alphanumeric, Special Char (~!@#$%^&*()_+{}|:\"<>?,./;'[]-=)
apiInstance.getTransactionClearingDetail(claimId, transactionId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::TransactionsApi.new api_client
claim_id = '200002020654' # String | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
transaction_id = 'FIEaEgnM3bwPijwZgjc3Te+Y0ieLbN9ijUugqNSvJmVbO1xs6Jh5iIlmpOpkbax79L8Yj1rBOWBACx+Vj17rzvOepWobpgWNJNdsgHB4ag' # String | Clearing transaction id.   Length: N/A   Valid Values/Format: Alphanumeric, Special Char (~!@#$%^&*()_+{}|:\"<>?,./;'[]-=)
begin
  # This resource is used to retrieve clearing detail for a given transaction
  result = api_instance.get_transaction_clearing_detail(claim_id, transaction_id)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Transaction Clearing Details API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\TransactionsApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
$transaction_id = 'FIEaEgnM3bwPijwZgjc3Te+Y0ieLbN9ijUugqNSvJmVbO1xs6Jh5iIlmpOpkbax79L8Yj1rBOWBACx+Vj17rzvOepWobpgWNJNdsgHB4ag'; // string | Clearing transaction id.   Length: N/A   Valid Values/Format: Alphanumeric, Special Char (~!@#$%^&*()_+{}|:\"<>?,./;'[]-=)
try {
    $result = $apiInstance->getTransactionClearingDetail($claim_id, $transaction_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TransactionsApi->getTransactionClearingDetail: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new TransactionsApi
            {
                Client = client
            };
            var claimId = "200002020654";  // string | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
            var transactionId = "FIEaEgnM3bwPijwZgjc3Te+Y0ieLbN9ijUugqNSvJmVbO1xs6Jh5iIlmpOpkbax79L8Yj1rBOWBACx+Vj17rzvOepWobpgWNJNdsgHB4ag";  // string | Clearing transaction id.   Length: N/A   Valid Values/Format: Alphanumeric, Special Char (~!@#$%^&*()_+{}|:\"<>?,./;'[]-=)
            try
            {
                // This resource is used to retrieve clearing detail for a given transaction
                var result = apiInstance.GetTransactionClearingDetail(claimId, transactionId);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling TransactionsApi.GetTransactionClearingDetail: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Retrieve authorization details {#retrieve-authorization-details}

Before Retrieve Transaction Authorization Details, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.
[Transaction Search](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#transaction-search) can be used to retrieve transaction-id.

|           API Call            |                                   Description                                    |                                  URI                                  |   Response   |
|-------------------------------|----------------------------------------------------------------------------------|-----------------------------------------------------------------------|--------------|
| Retrieve authorization detail | This resource is used to retrieve authorization details for a given transaction. | GET /v6/claims/{claim-id}/transactions/authorization/{transaction-id} | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.TransactionsApi;
import com.mastercard.api.mastercom.model.AuthorizationDetail;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        TransactionsApi apiInstance = new TransactionsApi(client);
        String claimId = "200002020654"; // String | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
        String transactionId = "FIEaEgnM3bwPijwZgjc3Te+Y0ieLbN9ijUugqNSvJmVbO1xs6Jh5iIlmpOpkbax79L8Yj1rBOWBACx+Vj17rzvOepWobpgWNJNdsgHB4ag"; // String | The Authorization Transaction Identifier from Authorization Summary Results.   Length: N/A   Valid Values/Format: Alphanumeric, Special Char (~!@#$%^&*()_+{}|:\"<>?,./;'[]-=)
        try {
            AuthorizationDetail result = apiInstance.retrieveAuthorizationDetail(claimId, transactionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TransactionsApi#retrieveAuthorizationDetail");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import transactions_api
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = transactions_api.TransactionsApi(client)
claim_id = "200002020654"  # str | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
transaction_id = "FIEaEgnM3bwPijwZgjc3Te+Y0ieLbN9ijUugqNSvJmVbO1xs6Jh5iIlmpOpkbax79L8Yj1rBOWBACx+Vj17rzvOepWobpgWNJNdsgHB4ag"  # str | The Authorization Transaction Identifier from Authorization Summary Results.   Length: N/A   Valid Values/Format: Alphanumeric, Special Char (~!@#$%^&*()_+{}|:\"<>?,./;'[]-=)
try:
    # This resource is used to retrieve authorization detail for a given transaction
    api_response = api_instance.retrieve_authorization_detail(claim_id, transaction_id)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Transaction Authorization Details API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.TransactionsApi();
let claimId = '200002020654'; // String | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
let transactionId = 'FIEaEgnM3bwPijwZgjc3Te+Y0ieLbN9ijUugqNSvJmVbO1xs6Jh5iIlmpOpkbax79L8Yj1rBOWBACx+Vj17rzvOepWobpgWNJNdsgHB4ag'; // String | The Authorization Transaction Identifier from Authorization Summary Results.   Length: N/A   Valid Values/Format: Alphanumeric, Special Char (~!@#$%^&*()_+{}|:\"<>?,./;'[]-=)
apiInstance.retrieveAuthorizationDetail(claimId, transactionId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::TransactionsApi.new api_client
claim_id = '200002020654' # String | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
transaction_id = 'FIEaEgnM3bwPijwZgjc3Te+Y0ieLbN9ijUugqNSvJmVbO1xs6Jh5iIlmpOpkbax79L8Yj1rBOWBACx+Vj17rzvOepWobpgWNJNdsgHB4ag' # String | The Authorization Transaction Identifier from Authorization Summary Results.   Length: N/A   Valid Values/Format: Alphanumeric, Special Char (~!@#$%^&*()_+{}|:\"<>?,./;'[]-=)
begin
  # This resource is used to retrieve authorization detail for a given transaction
  result = api_instance.retrieve_authorization_detail(claim_id, transaction_id)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Transaction Authorization Details API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\TransactionsApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
$transaction_id = 'FIEaEgnM3bwPijwZgjc3Te+Y0ieLbN9ijUugqNSvJmVbO1xs6Jh5iIlmpOpkbax79L8Yj1rBOWBACx+Vj17rzvOepWobpgWNJNdsgHB4ag'; // string | The Authorization Transaction Identifier from Authorization Summary Results.   Length: N/A   Valid Values/Format: Alphanumeric, Special Char (~!@#$%^&*()_+{}|:\"<>?,./;'[]-=)
try {
    $result = $apiInstance->retrieveAuthorizationDetail($claim_id, $transaction_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TransactionsApi->retrieveAuthorizationDetail: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new TransactionsApi
            {
                Client = client
            };
            var claimId = "200002020654";  // string | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
            var transactionId = "FIEaEgnM3bwPijwZgjc3Te+Y0ieLbN9ijUugqNSvJmVbO1xs6Jh5iIlmpOpkbax79L8Yj1rBOWBACx+Vj17rzvOepWobpgWNJNdsgHB4ag";  // string | The Authorization Transaction Identifier from Authorization Summary Results.   Length: N/A   Valid Values/Format: Alphanumeric, Special Char (~!@#$%^&*()_+{}|:\"<>?,./;'[]-=)
            try
            {
                // This resource is used to retrieve authorization detail for a given transaction
                var result = apiInstance.RetrieveAuthorizationDetail(claimId, transactionId);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling TransactionsApi.RetrieveAuthorizationDetail: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

## 9. Health Check {#9-health-check}

### Health Check {#health-check}

|   API Call   |                          Description                           |         URI         |   Response   |
|--------------|----------------------------------------------------------------|---------------------|--------------|
| Health Check | This resource retrieves the status of the Mastercom API suite. | GET /v6/healthcheck | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.HealthCheckApi;
import com.mastercard.api.mastercom.model.HealthCheckResponse;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        HealthCheckApi apiInstance = new HealthCheckApi(client);
        try {
            HealthCheckResponse result = apiInstance.healthcheck();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HealthCheckApi#healthcheck");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import health_check_api
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = health_check_api.HealthCheckApi(client)
try:
    # This resource retrieves the status of the Mastercom API suite.
    api_response = api_instance.healthcheck()
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Health Check API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.HealthCheckApi();
apiInstance.healthcheck((error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::HealthCheckApi.new api_client
begin
  # This resource retrieves the status of the Mastercom API suite.
  result = api_instance.healthcheck
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Health Check API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\HealthCheckApi($client, $config);
try {
    $result = $apiInstance->healthcheck();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling HealthCheckApi->healthcheck: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new HealthCheckApi
            {
                Client = client
            };
            try
            {
                // This resource retrieves the status of the Mastercom API suite.
                var result = apiInstance.Healthcheck();
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling HealthCheckApi.Healthcheck: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

## 10. Reconciliation {#10-reconciliation}

### Reconciliation acknowledge {#reconciliation-acknowledge}

|          API Call          |                                    Description                                    |                URI                |   Response   |
|----------------------------|-----------------------------------------------------------------------------------|-----------------------------------|--------------|
| Reconciliation Acknowledge | This resource acknowledges the request and returns a UUID for the reconciliation. | POST /v6/reconreport/data/request | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.ReconciliationApi;
import com.mastercard.api.mastercom.model.ReconReportDataAcknowledgeRequest;
import com.mastercard.api.mastercom.model.ReconReportDataAcknowledgeResponse;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        ReconciliationApi apiInstance = new ReconciliationApi(client);
        ReconReportDataAcknowledgeRequest reconDataRequest = new ReconReportDataAcknowledgeRequest(); // ReconReportDataAcknowledgeRequest | Reconciliation data request
        try {
            ReconReportDataAcknowledgeResponse result = apiInstance.reconReportDataAcknowledge(reconDataRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReconciliationApi#reconReportDataAcknowledge");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import reconciliation_api
from openapi_client.model.recon_report_data_acknowledge_request import ReconReportDataAcknowledgeRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = reconciliation_api.ReconciliationApi(client)
body = ReconReportDataAcknowledgeRequest()  # ReconReportDataAcknowledgeRequest | Reconciliation data request
try:
    # This resource acknowledges the request and returns a UUID for the reconciliation
    api_response = api_instance.recon_report_data_acknowledge(body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Acknowledge Reconciliation Request API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.ReconciliationApi();
let reconDataRequest = new MasterCom.ReconReportDataAcknowledgeRequest(); // ReconReportDataAcknowledgeRequest | Reconciliation data request
apiInstance.reconReportDataAcknowledge(reconDataRequest, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::ReconciliationApi.new api_client
body = OpenapiClient::ReconReportDataAcknowledgeRequest.new # ReconReportDataAcknowledgeRequest | Reconciliation data request
begin
  # This resource acknowledges the request and returns a UUID for the reconciliation
  result = api_instance.recon_report_data_acknowledge(body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Reconciliation Report Acknowledge API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\ReconciliationApi($client, $config);
$body = new \OpenAPI\Client\Model\ReconReportDataAcknowledgeRequest(); // \OpenAPI\Client\Model\ReconReportDataAcknowledgeRequest | Reconciliation data request
try {
    $result = $apiInstance->reconReportDataAcknowledge($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReconciliationApi->reconReportDataAcknowledge: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new ReconciliationApi
            {
                Client = client
            };
            var reconDataRequest = new ReconReportDataAcknowledgeRequest(); // ReconReportDataAcknowledgeRequest | Reconciliation data request
            try
            {
                // This resource acknowledges the request and returns a UUID for the reconciliation
                var result = apiInstance.ReconReportDataAcknowledge(reconDataRequest);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ReconciliationApi.ReconReportDataAcknowledge: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Reconciliation Report {#reconciliation-report}

Before Retrieve Reconciliation Report, [Reconciliation Acknowledge](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#reconciliation-acknowledge) can be used to create a new request-id   
[Retrieve Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claim) can be used to generate a new reportIdentifier.

|       API Call        |                                   Description                                    |                          URI                           |   Response   |
|-----------------------|----------------------------------------------------------------------------------|--------------------------------------------------------|--------------|
| Reconciliation Report | This resource returns a reconciliation report stored in a base64 encoded string. | POST /v6/reconreport/data/retrieval/{reportIdentifier} | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.ReconciliationApi;
import com.mastercard.api.mastercom.model.ReconReportDataRetrivalResponse;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        ReconciliationApi apiInstance = new ReconciliationApi(client);
        String reportIdentifier = "123e4567-e89b-42d3-a456-556642440000"; // String | A reconciliation id that identifies the report to be retrieved.   Length: 36   Valid Values/Format: Alphanumeric
        try {
            ReconReportDataRetrivalResponse result = apiInstance.reconReportDataRetrieval(reportIdentifier);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReconciliationApi#reconReportDataRetrieval");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import reconciliation_api
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = reconciliation_api.ReconciliationApi(client)
report_identifier = "123e4567-e89b-42d3-a456-556642440000"  # str | A reconciliation id that identifies the report to be retrieved.   Length: 36   Valid Values/Format: Alphanumeric
try:
    # This resource returns a reconciliation report stored in a base64 encoded string
    api_response = api_instance.recon_report_data_retrieval(report_identifier)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Retrieve Reconciliation Report API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.ReconciliationApi();
let reportIdentifier = '123e4567-e89b-42d3-a456-556642440000'; // String | A reconciliation id that identifies the report to be retrieved.   Length: 36   Valid Values/Format: Alphanumeric
apiInstance.reconReportDataRetrieval(reportIdentifier, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::ReconciliationApi.new api_client
report_identifier = '123e4567-e89b-42d3-a456-556642440000' # String | A reconciliation id that identifies the report to be retrieved.   Length: 36   Valid Values/Format: Alphanumeric
begin
  # This resource returns a reconciliation report stored in a base64 encoded string
  result = api_instance.recon_report_data_retrieval(report_identifier)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Retrieve Reconciliation Report API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\ReconciliationApi($client, $config);
$report_identifier = '123e4567-e89b-42d3-a456-556642440000'; // string | A reconciliation id that identifies the report to be retrieved.   Length: 36   Valid Values/Format: Alphanumeric
try {
    $result = $apiInstance->reconReportDataRetrieval($report_identifier);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReconciliationApi->reconReportDataRetrieval: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new ReconciliationApi
            {
                Client = client
            };
            var reportIdentifier = "123e4567-e89b-42d3-a456-556642440000";  // string | A reconciliation id that identifies the report to be retrieved.   Length: 36   Valid Values/Format: Alphanumeric
            try
            {
                // This resource returns a reconciliation report stored in a base64 encoded string
                var result = apiInstance.ReconReportDataRetrieval(reportIdentifier);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ReconciliationApi.ReconReportDataRetrieval: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

## 11. Chargebacks (Debit Mastercard and Europe Dual Acquirer) {#11-chargebacks-debit-mastercard-and-europe-dual-acquirer}

### Create Debit MC Chargeback {#create-debit-mc-chargeback}

Before Create Debit MC Chargeback, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.

|          API Call          |                                              Description                                               |                      URI                       |   Response   |
|----------------------------|--------------------------------------------------------------------------------------------------------|------------------------------------------------|--------------|
| Create Debit MC chargeback | This resource creates a new Debit MC message chargeback for Debit Mastercard and Europe Dual Acquirer. | POST /v6/claims/{claim-id}/chargebacks/debitmc | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.ChargebacksDebitMastercardAndEuropeDualAcquirerApi;
import com.mastercard.api.mastercom.model.ChargebackResponse;
import com.mastercard.api.mastercom.model.CreateChargebackSingleRequest;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        ChargebacksDebitMastercardAndEuropeDualAcquirerApi apiInstance = new ChargebacksDebitMastercardAndEuropeDualAcquirerApi(client);
        String claimId = "200002020654"; // String | Claim Id where the chargeback will be added.   Length: 1-19   Valid Values/Format: Numeric
        CreateChargebackSingleRequest body = new CreateChargebackSingleRequest(); // CreateChargebackSingleRequest | Create Chargeback information
        try {
            ChargebackResponse result = apiInstance.createChargebackDebitMC(claimId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChargebacksDebitMastercardAndEuropeDualAcquirerApi#createChargebackDebitMC");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import chargebacks__debit_master_card_and_europe_dual_acquirer_api
from openapi_client.model.create_chargeback_single_request import CreateChargebackSingleRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = chargebacks__debit_master_card_and_europe_dual_acquirer_api.ChargebacksDebitMastercardAndEuropeDualAcquirerApi(client)
claim_id = "200002020654"  # str | Claim Id where the chargeback will be added.   Length: 1-19   Valid Values/Format: Numeric
body = CreateChargebackSingleRequest()  # CreateChargebackSingleRequest | Create Chargeback information
try:
    # This resource creates a new Debit MC message chargeback for Debit Mastercard and Europe Dual Acquirer
    api_response = api_instance.create_chargeback_debit_mc(claim_id, body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Debit Mastercard And Europe Dual Acquirer Create Chargeback API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.ChargebacksDebitMastercardAndEuropeDualAcquirerApi();
let claimId = '200002020654'; // String | Claim Id where the chargeback will be added.   Length: 1-19   Valid Values/Format: Numeric
let body = new MasterCom.CreateChargebackSingleRequest(); // CreateChargebackSingleRequest | Create Chargeback information
apiInstance.createChargebackDebitMC(claimId, body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::ChargebacksDebitMastercardAndEuropeDualAcquirerApi.new api_client
claim_id = '200002020654' # String | Claim Id where the chargeback will be added.   Length: 1-19   Valid Values/Format: Numeric
body = OpenapiClient::CreateChargebackSingleRequest.new # CreateChargebackSingleRequest | Create Chargeback information
begin
  # This resource creates a new Debit MC message chargeback for Debit Mastercard and Europe Dual Acquirer
  result = api_instance.create_chargeback_debit_mc(claim_id, body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Debit Mastercard And Europe Dual Acquirer Create Chargeback API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\ChargebacksDebitMastercardAndEuropeDualAcquirerApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id where the chargeback will be added.   Length: 1-19   Valid Values/Format: Numeric
$body = new \OpenAPI\Client\Model\CreateChargebackSingleRequest(); // \OpenAPI\Client\Model\CreateChargebackSingleRequest | Create Chargeback information
try {
    $result = $apiInstance->createChargebackDebitMC($claim_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ChargebacksDebitMastercardAndEuropeDualAcquirerApi->createChargebackDebitMC: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new ChargebacksDebitMastercardAndEuropeDualAcquirerApi
            {
                Client = client
            };
            var claimId = "200002020654";  // string | Claim Id where the chargeback will be added.   Length: 1-19   Valid Values/Format: Numeric
            var body = new CreateChargebackSingleRequest(); // CreateChargebackSingleRequest | Create Chargeback information
            try
            {
                // This resource creates a new Debit MC message chargeback for Debit Mastercard and Europe Dual Acquirer
                var result = apiInstance.CreateChargebackDebitMC(claimId, body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ChargebacksDebitMastercardAndEuropeDualAcquirerApi.CreateChargebackDebitMC: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Create Debit MC chargeback Reversal {#create-debit-mc-chargeback-reversal}

Before Create Debit MC Chargeback Reversal, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.
[Create Debit MC Chargeback](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-debit-mc-chargeback) can be used to create a new chargeback-id, or [Retrieve Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claim) to retrieve an existing chargeback-id associated with a claim.

|              API Call               |                                        Description                                         |                                   URI                                   |   Response   |
|-------------------------------------|--------------------------------------------------------------------------------------------|-------------------------------------------------------------------------|--------------|
| Create Debit MC chargeback reversal | This resource creates a chargeback reversal for Debit Mastercard and Europe Dual Acquirer. | POST /v6/claims/{claim-id}/chargebacks/debitmc/{chargeback-id}/reversal | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.ChargebacksDebitMastercardAndEuropeDualAcquirerApi;
import com.mastercard.api.mastercom.model.ChargebackResponse;
import com.mastercard.api.mastercom.model.CreateChargebackSingleReversalRequest;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        ChargebacksDebitMastercardAndEuropeDualAcquirerApi apiInstance = new ChargebacksDebitMastercardAndEuropeDualAcquirerApi(client);
        String claimId = "200002020654"; // String | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
        String chargebackId = "300018439680"; // String | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
        CreateChargebackSingleReversalRequest body = new CreateChargebackSingleReversalRequest(); // CreateChargebackSingleReversalRequest | Create Chargeback Reversal information
        try {
            ChargebackResponse result = apiInstance.createChargebackReversalDebitMC(claimId, chargebackId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChargebacksDebitMastercardAndEuropeDualAcquirerApi#createChargebackReversalDebitMC");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import chargebacks__debit_master_card_and_europe_dual_acquirer_api
from openapi_client.model.create_chargeback_single_reversal_request import CreateChargebackSingleReversalRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = chargebacks__debit_master_card_and_europe_dual_acquirer_api.ChargebacksDebitMastercardAndEuropeDualAcquirerApi(client)
claim_id = "200002020654"  # str | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
chargeback_id = "300018439680"  # str | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
body = CreateChargebackSingleReversalRequest()  # CreateChargebackSingleReversalRequest | Create Chargeback Reversal information
try:
    # This resource creates a chargeback reversal for Debit Mastercard and Europe Dual Acquirer
    api_response = api_instance.create_chargeback_reversal_debit_mc(claim_id, chargeback_id, body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Debit Mastercard And Europe Dual Acquirer Create Chargeback Reversal API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.ChargebacksDebitMastercardAndEuropeDualAcquirerApi();
let claimId = '200002020654'; // String | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
let chargebackId = '300018439680'; // String | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
let body = new MasterCom.CreateChargebackSingleReversalRequest(); // CreateChargebackSingleReversalRequest | Create Chargeback Reversal information
apiInstance.createChargebackReversalDebitMC(claimId, chargebackId, body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::ChargebacksDebitMastercardAndEuropeDualAcquirerApi.new api_client
claim_id = '200002020654' # String | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
chargeback_id = '300018439680' # String | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
body = OpenapiClient::CreateChargebackSingleReversalRequest.new # CreateChargebackSingleReversalRequest | Create Chargeback Reversal information
begin
  # This resource creates a chargeback reversal for Debit Mastercard and Europe Dual Acquirer
  result = api_instance.create_chargeback_reversal_debit_mc(claim_id, chargeback_id, body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Debit Mastercard And Europe Dual Acquirer Create Chargeback Reversal API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\ChargebacksDebitMastercardAndEuropeDualAcquirerApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
$chargeback_id = '300018439680'; // string | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
$body = new \OpenAPI\Client\Model\CreateChargebackSingleReversalRequest(); // \OpenAPI\Client\Model\CreateChargebackSingleReversalRequest | Create Chargeback Reversal information
try {
    $result = $apiInstance->createChargebackReversalDebitMC($claim_id, $chargeback_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ChargebacksDebitMastercardAndEuropeDualAcquirerApi->createChargebackReversalDebitMC: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new ChargebacksDebitMastercardAndEuropeDualAcquirerApi
            {
                Client = client
            };
            var claimId = "200002020654";  // string | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
            var chargebackId = "300018439680";  // string | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
            var body = new CreateChargebackSingleReversalRequest(); // CreateChargebackSingleReversalRequest | Create Chargeback Reversal information
            try
            {
                // This resource creates a chargeback reversal for Debit Mastercard and Europe Dual Acquirer
                var result = apiInstance.CreateChargebackReversalDebitMC(claimId, chargebackId, body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ChargebacksDebitMastercardAndEuropeDualAcquirerApi.CreateChargebackReversalDebitMC: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Update Debit MC Chargeback {#update-debit-mc-chargeback}

Before Update Debit MC Chargeback, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.
[Create Debit MC Chargeback](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-debit-mc-chargeback) can be used to create a new chargeback-id, or [Retrieve Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claim) to retrieve an existing chargeback-id associated with a claim.

|          API Call          |                                    Description                                    |                              URI                              |   Response   |
|----------------------------|-----------------------------------------------------------------------------------|---------------------------------------------------------------|--------------|
| Update Debit MC chargeback | This resource updates a chargeback for Debit Mastercard and Europe Dual Acquirer. | PUT /v6/claims/{claim-id}/chargebacks/debitmc/{chargeback-id} | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.ChargebacksDebitMastercardAndEuropeDualAcquirerApi;
import com.mastercard.api.mastercom.model.ChargebackResponse;
import com.mastercard.api.mastercom.model.UpdateChargebackRequest;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        ChargebacksDebitMastercardAndEuropeDualAcquirerApi apiInstance = new ChargebacksDebitMastercardAndEuropeDualAcquirerApi(client);
        String claimId = "200002020654"; // String | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
        String chargebackId = "300018439680"; // String | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
        UpdateChargebackRequest body = new UpdateChargebackRequest(); // UpdateChargebackRequest | Update Chargeback information
        try {
            ChargebackResponse result = apiInstance.updateChargebackDebitMC(claimId, chargebackId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChargebacksDebitMastercardAndEuropeDualAcquirerApi#updateChargebackDebitMC");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import chargebacks__debit_master_card_and_europe_dual_acquirer_api
from openapi_client.model.update_chargeback_request import UpdateChargebackRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = chargebacks__debit_master_card_and_europe_dual_acquirer_api.ChargebacksDebitMastercardAndEuropeDualAcquirerApi(client)
claim_id = "200002020654"  # str | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
chargeback_id = "300018439680"  # str | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
body = UpdateChargebackRequest()  # UpdateChargebackRequest | Update Chargeback information
try:
    # This resource updates a chargeback for Debit Mastercard and Europe Dual Acquirer
    api_response = api_instance.update_chargeback_debit_mc(claim_id, chargeback_id, body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Debit Mastercard And Europe Dual Acquirer Update Chargeback API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.ChargebacksDebitMastercardAndEuropeDualAcquirerApi();
let claimId = '200002020654'; // String | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
let chargebackId = '300018439680'; // String | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
let body = new MasterCom.UpdateChargebackRequest(); // UpdateChargebackRequest | Update Chargeback information
apiInstance.updateChargebackDebitMC(claimId, chargebackId, body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::ChargebacksDebitMastercardAndEuropeDualAcquirerApi.new api_client
claim_id = '200002020654' # String | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
chargeback_id = '300018439680' # String | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
body = OpenapiClient::UpdateChargebackRequest.new # UpdateChargebackRequest | Update Chargeback information
begin
  # This resource updates a chargeback for Debit Mastercard and Europe Dual Acquirer
  result = api_instance.update_chargeback_debit_mc(claim_id, chargeback_id, body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Debit Mastercard And Europe Dual Acquirer Update Chargeback API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\ChargebacksDebitMastercardAndEuropeDualAcquirerApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
$chargeback_id = '300018439680'; // string | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
$body = new \OpenAPI\Client\Model\UpdateChargebackRequest(); // \OpenAPI\Client\Model\UpdateChargebackRequest | Update Chargeback information
try {
    $result = $apiInstance->updateChargebackDebitMC($claim_id, $chargeback_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ChargebacksDebitMastercardAndEuropeDualAcquirerApi->updateChargebackDebitMC: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new ChargebacksDebitMastercardAndEuropeDualAcquirerApi
            {
                Client = client
            };
            var claimId = "200002020654";  // string | Claim Id for the chargeback.   Length: 1-19   Valid Values/Format: Numeric
            var chargebackId = "300018439680";  // string | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
            var body = new UpdateChargebackRequest(); // UpdateChargebackRequest | Update Chargeback information
            try
            {
                // This resource updates a chargeback for Debit Mastercard and Europe Dual Acquirer
                var result = apiInstance.UpdateChargebackDebitMC(claimId, chargebackId, body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ChargebacksDebitMastercardAndEuropeDualAcquirerApi.UpdateChargebackDebitMC: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Retrieve Debit MC Chargeback Documentation {#retrieve-debit-mc-chargeback-documentation}

Before Retrieve Debit MC Chargeback Doc, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.
[Create Debit MC Chargeback](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-debit-mc-chargeback) can be used to create a new chargeback-id, or [Retrieve Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claim) to retrieve an existing chargeback-id associated with a claim.

|                  API Call                  |                                              Description                                              |                                   URI                                   |   Response   |
|--------------------------------------------|-------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------|--------------|
| Retrieve Debit MC chargeback documentation | This resource retrieves documentation for a chargeback for Debit Mastercard and Europe Dual Acquirer. | GET /v6/claims/{claim-id}/chargebacks/debitmc/{chargeback-id}/documents | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.ChargebacksDebitMastercardAndEuropeDualAcquirerApi;
import com.mastercard.api.mastercom.model.DocumentResponseStructure;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        ChargebacksDebitMastercardAndEuropeDualAcquirerApi apiInstance = new ChargebacksDebitMastercardAndEuropeDualAcquirerApi(client);
        String claimId = "200002020654"; // String | The Claim Id.   Length: 1-19   Valid Values/Format: Numeric
        String chargebackId = "300002063556"; // String | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
        String format = "ORIGINAL"; // String | File format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
        try {
            DocumentResponseStructure result = apiInstance.getChargebackDocDebitMC(claimId, chargebackId, format);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChargebacksDebitMastercardAndEuropeDualAcquirerApi#getChargebackDocDebitMC");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import chargebacks__debit_master_card_and_europe_dual_acquirer_api
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = chargebacks__debit_master_card_and_europe_dual_acquirer_api.ChargebacksDebitMastercardAndEuropeDualAcquirerApi(client)
claim_id = "200002020654"  # str | The Claim Id.   Length: 1-19   Valid Values/Format: Numeric
chargeback_id = "300002063556"  # str | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
format = "ORIGINAL"  # str | File format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
try:
    # This resource retrieves documentation for a chargeback for Debit Mastercard and Europe Dual Acquirer
    api_response = api_instance.get_chargeback_doc_debit_mc(claim_id, chargeback_id, format)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Debit Mastercard And Europe Dual Acquirer Retrieve Chargeback Doc API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.ChargebacksDebitMastercardAndEuropeDualAcquirerApi();
let claimId = '200002020654'; // String | The Claim Id.   Length: 1-19   Valid Values/Format: Numeric
let chargebackId = '300002063556'; // String | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
let format = 'ORIGINAL'; // String | File format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
apiInstance.getChargebackDocDebitMC(claimId, chargebackId, format, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::ChargebacksDebitMastercardAndEuropeDualAcquirerApi.new api_client
claim_id = '200002020654' # String | The Claim Id.   Length: 1-19   Valid Values/Format: Numeric
chargeback_id = '300002063556' # String | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
format = 'ORIGINAL' # String | File format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
begin
  # This resource retrieves documentation for a chargeback for Debit Mastercard and Europe Dual Acquirer
  result = api_instance.get_chargeback_doc_debit_mc(claim_id, chargeback_id, format)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Debit Mastercard And Europe Dual Acquirer Get Chargeback Doc API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\ChargebacksDebitMastercardAndEuropeDualAcquirerApi($client, $config);
$claim_id = '200002020654'; // string | The Claim Id.   Length: 1-19   Valid Values/Format: Numeric
$chargeback_id = '300002063556'; // string | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
$format = 'ORIGINAL'; // string | File format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
try {
    $result = $apiInstance->getChargebackDocDebitMC($claim_id, $chargeback_id, $format);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ChargebacksDebitMastercardAndEuropeDualAcquirerApi->getChargebackDocDebitMC: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new ChargebacksDebitMastercardAndEuropeDualAcquirerApi
            {
                Client = client
            };
            var claimId = "200002020654";  // string | The Claim Id.   Length: 1-19   Valid Values/Format: Numeric
            var chargebackId = "300002063556";  // string | Chargeback Id.   Length: 1-19   Valid Values/Format: Numeric
            var format = "ORIGINAL";  // string | File format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
            try
            {
                // This resource retrieves documentation for a chargeback for Debit Mastercard and Europe Dual Acquirer
                var result = apiInstance.GetChargebackDocDebitMC(claimId, chargebackId, format);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ChargebacksDebitMastercardAndEuropeDualAcquirerApi.GetChargebackDocDebitMC: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Acknowledge Received Debit MC Chargebacks {#acknowledge-received-debit-mc-chargebacks}

|                 API Call                  |                                              Description                                              |                   URI                   |   Response   |
|-------------------------------------------|-------------------------------------------------------------------------------------------------------|-----------------------------------------|--------------|
| Acknowledge received Debit MC chargebacks | This resource marks a received chargeback as processed for Debit Mastercard and Europe Dual Acquirer. | PUT /v6/chargebacks/debitmc/acknowledge | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.ChargebacksDebitMastercardAndEuropeDualAcquirerApi;
import com.mastercard.api.mastercom.model.ChargebackMarkProcessedRequest;
import com.mastercard.api.mastercom.model.ChargebackMarkProcessedResponse;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        ChargebacksDebitMastercardAndEuropeDualAcquirerApi apiInstance = new ChargebacksDebitMastercardAndEuropeDualAcquirerApi(client);
        ChargebackMarkProcessedRequest body = new ChargebackMarkProcessedRequest(); // ChargebackMarkProcessedRequest | Chargeback Receiver information
        try {
            ChargebackMarkProcessedResponse result = apiInstance.acknowledgeChargebacksDebitMC(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChargebacksDebitMastercardAndEuropeDualAcquirerApi#acknowledgeChargebacksDebitMC");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import chargebacks__debit_master_card_and_europe_dual_acquirer_api
from openapi_client.model.chargeback_mark_processed_request import ChargebackMarkProcessedRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = chargebacks__debit_master_card_and_europe_dual_acquirer_api.ChargebacksDebitMastercardAndEuropeDualAcquirerApi(client)
body = ChargebackMarkProcessedRequest()  # ChargebackMarkProcessedRequest | Chargeback Receiver information
try:
    # This resource marks a received chargebacks as processed for Debit Mastercard and Europe Dual Acquirer
    api_response = api_instance.acknowledge_chargebacks_debit_mc(body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Debit Mastercard And Europe Dual Acquirer Acknowledge Chargeback API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.ChargebacksDebitMastercardAndEuropeDualAcquirerApi();
let body = new MasterCom.ChargebackMarkProcessedRequest(); // ChargebackMarkProcessedRequest | Chargeback Receiver information
apiInstance.acknowledgeChargebacksDebitMC(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::ChargebacksDebitMastercardAndEuropeDualAcquirerApi.new api_client
body = OpenapiClient::ChargebackMarkProcessedRequest.new # ChargebackMarkProcessedRequest | Chargeback Receiver information
begin
  # This resource marks a received chargebacks as processed for Debit Mastercard and Europe Dual Acquirer
  result = api_instance.acknowledge_chargebacks_debit_mc(body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Debit Mastercard And Europe Dual Acquirer Acknowledge Chargeback API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\ChargebacksDebitMastercardAndEuropeDualAcquirerApi($client, $config);
$body = new \OpenAPI\Client\Model\ChargebackMarkProcessedRequest(); // \OpenAPI\Client\Model\ChargebackMarkProcessedRequest | Chargeback Receiver information
try {
    $result = $apiInstance->acknowledgeChargebacksDebitMC($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ChargebacksDebitMastercardAndEuropeDualAcquirerApi->acknowledgeChargebacksDebitMC: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new ChargebacksDebitMastercardAndEuropeDualAcquirerApi
            {
                Client = client
            };
            var body = new ChargebackMarkProcessedRequest(); // ChargebackMarkProcessedRequest | Chargeback Receiver information
            try
            {
                // This resource marks a received chargebacks as processed for Debit Mastercard and Europe Dual Acquirer
                var result = apiInstance.AcknowledgeChargebacksDebitMC(body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ChargebacksDebitMastercardAndEuropeDualAcquirerApi.AcknowledgeChargebacksDebitMC: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Retrieve Debit MC Chargeback Status {#retrieve-debit-mc-chargeback-status}

|              API Call               |                                                    Description                                                     |                URI                 |   Response   |
|-------------------------------------|--------------------------------------------------------------------------------------------------------------------|------------------------------------|--------------|
| Retrieve Debit MC chargeback status | This resource retrieves the processing status of a chargeback image for Debit Mastercard and Europe Dual Acquirer. | PUT /v6/chargebacks/debitmc/status | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.ChargebacksDebitMastercardAndEuropeDualAcquirerApi;
import com.mastercard.api.mastercom.model.ChargebackStatusRequest;
import com.mastercard.api.mastercom.model.ChargebackStatusResponse;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        ChargebacksDebitMastercardAndEuropeDualAcquirerApi apiInstance = new ChargebacksDebitMastercardAndEuropeDualAcquirerApi(client);
        ChargebackStatusRequest body = new ChargebackStatusRequest(); // ChargebackStatusRequest | Chargeback information
        try {
            ChargebackStatusResponse result = apiInstance.retrieveChargebackStatusDebitMC(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChargebacksDebitMastercardAndEuropeDualAcquirerApi#retrieveChargebackStatusDebitMC");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import chargebacks__debit_master_card_and_europe_dual_acquirer_api
from openapi_client.model.chargeback_status_request import ChargebackStatusRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = chargebacks__debit_master_card_and_europe_dual_acquirer_api.ChargebacksDebitMastercardAndEuropeDualAcquirerApi(client)
body = ChargebackStatusRequest()  # ChargebackStatusRequest | Chargeback information
try:
    # This resource retrieves the processing status of a chargeback image for Debit Mastercard and Europe Dual Acquirer
    api_response = api_instance.retrieve_chargeback_status_debit_mc(body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Debit Mastercard And Europe Dual Acquirer Chargeback Status API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.ChargebacksDebitMastercardAndEuropeDualAcquirerApi();
let body = new MasterCom.ChargebackStatusRequest(); // ChargebackStatusRequest | Chargeback information
apiInstance.retrieveChargebackStatusDebitMC(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::ChargebacksDebitMastercardAndEuropeDualAcquirerApi.new api_client
body = OpenapiClient::ChargebackStatusRequest.new # ChargebackStatusRequest | Chargeback information
begin
  # This resource retrieves the processing status of a chargeback image for Debit Mastercard and Europe Dual Acquirer
  result = api_instance.retrieve_chargeback_status_debit_mc(body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Debit Mastercard And Europe Dual Acquirer Chargeback Status API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\ChargebacksDebitMastercardAndEuropeDualAcquirerApi($client, $config);
$body = new \OpenAPI\Client\Model\ChargebackStatusRequest(); // \OpenAPI\Client\Model\ChargebackStatusRequest | Chargeback information
try {
    $result = $apiInstance->retrieveChargebackStatusDebitMC($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ChargebacksDebitMastercardAndEuropeDualAcquirerApi->retrieveChargebackStatusDebitMC: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new ChargebacksDebitMastercardAndEuropeDualAcquirerApi
            {
                Client = client
            };
            var body = new ChargebackStatusRequest(); // ChargebackStatusRequest | Chargeback information
            try
            {
                // This resource retrieves the processing status of a chargeback image for Debit Mastercard and Europe Dual Acquirer
                var result = apiInstance.RetrieveChargebackStatusDebitMC(body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ChargebacksDebitMastercardAndEuropeDualAcquirerApi.RetrieveChargebackStatusDebitMC: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

## 12. Fees (Debit Mastercard and Europe Dual Acquirer) {#12-fees-debit-mastercard-and-europe-dual-acquirer}

### Create Debit MC / Europe Dual Acquirer Fee Collection Item {#create-debit-mc--europe-dual-acquirer-fee-collection-item}

Before Create Debit MC/Europe Dual Acquirer Fee, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.

|                          API Call                          |                                                 Description                                                 |                  URI                   |   Response   |
|------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|----------------------------------------|--------------|
| Create Debit MC / Europe Dual Acquirer fee collection item | This resource creates a new fee for Debit MC message records for Debit Mastercard and Europe Dual Acquirer. | POST /v6/claims/{claim-id}/fee/debitmc | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.FeesDebitMastercardAndEuropeDualAcquirerApi;
import com.mastercard.api.mastercom.model.CreateFeeRequestSingle;
import com.mastercard.api.mastercom.model.FeeSingleResponse;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        FeesDebitMastercardAndEuropeDualAcquirerApi apiInstance = new FeesDebitMastercardAndEuropeDualAcquirerApi(client);
        String claimId = "200002020654"; // String | Claim Id for the fee item.   Length: 1-19   Valid Values/Format: Numeric
        CreateFeeRequestSingle body = new CreateFeeRequestSingle(); // CreateFeeRequestSingle | Create Fee Request
        try {
            FeeSingleResponse result = apiInstance.createFeeDebitMC(claimId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FeesDebitMastercardAndEuropeDualAcquirerApi#createFeeDebitMC");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import fees__debit_master_card_and_europe_dual_acquirer_api
from openapi_client.model.create_fee_request_single import CreateFeeRequestSingle
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = fees__debit_master_card_and_europe_dual_acquirer_api.FeesDebitMastercardAndEuropeDualAcquirerApi(client)
claim_id = "200002020654"  # str | Claim Id for the fee item.   Length: 1-19   Valid Values/Format: Numeric
body = CreateFeeRequestSingle()  # CreateFeeRequestSingle | Create Fee Request
try:
    # This resource creates a new fee for Debit MC message records for Debit Mastercard and Europe Dual Acquirer
    api_response = api_instance.create_fee_debit_mc(claim_id, body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Debit Mastercard And Europe Dual Acquirer Create Fee API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.FeesDebitMastercardAndEuropeDualAcquirerApi();
let claimId = '200002020654'; // String | Claim Id for the fee item.   Length: 1-19   Valid Values/Format: Numeric
let body = new MasterCom.CreateFeeRequestSingle(); // CreateFeeRequestSingle | Create Fee Request
apiInstance.createFeeDebitMC(claimId, body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::FeesDebitMastercardAndEuropeDualAcquirerApi.new api_client
claim_id = '200002020654' # String | Claim Id for the fee item.   Length: 1-19   Valid Values/Format: Numeric
body = OpenapiClient::CreateFeeRequestSingle.new # CreateFeeRequestSingle | Create Fee Request
begin
  # This resource creates a new fee for Debit MC message records for Debit Mastercard and Europe Dual Acquirer
  result = api_instance.create_fee_debit_mc(claim_id, body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Debit Mastercard And Europe Dual Acquirer Create Fee API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\FeesDebitMastercardAndEuropeDualAcquirerApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id for the fee item.   Length: 1-19   Valid Values/Format: Numeric
$body = new \OpenAPI\Client\Model\CreateFeeRequestSingle(); // \OpenAPI\Client\Model\CreateFeeRequestSingle | Create Fee Request
try {
    $result = $apiInstance->createFeeDebitMC($claim_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FeesDebitMastercardAndEuropeDualAcquirerApi->createFeeDebitMC: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new FeesDebitMastercardAndEuropeDualAcquirerApi
            {
                Client = client
            };
            var claimId = "200002020654";  // string | Claim Id for the fee item.   Length: 1-19   Valid Values/Format: Numeric
            var body = new CreateFeeRequestSingle(); // CreateFeeRequestSingle | Create Fee Request
            try
            {
                // This resource creates a new fee for Debit MC message records for Debit Mastercard and Europe Dual Acquirer
                var result = apiInstance.CreateFeeDebitMC(claimId, body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling FeesDebitMastercardAndEuropeDualAcquirerApi.CreateFeeDebitMC: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

## 13. Retrievals (Debit Mastercard and Europe Dual Acquirer) {#13-retrievals-debit-mastercard-and-europe-dual-acquirer}

### Create Debit MC Retrieval Request {#create-debit-mc-retrieval-request}

Before Create Retrieval Request, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.

|             API Call              |                                         Description                                          |                         URI                          |   Response   |
|-----------------------------------|----------------------------------------------------------------------------------------------|------------------------------------------------------|--------------|
| Create debit mc retrieval request | This resource creates a new retrieval request for Debit Mastercard and Europe Dual Acquirer. | POST /v6/claims/{claim-id}/retrievalrequests/debitmc | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.RetrievalsDebitMastercardAndEuropeDualAcquirerApi;
import com.mastercard.api.mastercom.model.CreateRetrievalRequestSingle;
import com.mastercard.api.mastercom.model.CreateRetrievalResponse;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        RetrievalsDebitMastercardAndEuropeDualAcquirerApi apiInstance = new RetrievalsDebitMastercardAndEuropeDualAcquirerApi(client);
        String claimId = "200002020654"; // String | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
        CreateRetrievalRequestSingle body = new CreateRetrievalRequestSingle(); // CreateRetrievalRequestSingle | Create Retrieval Request
        try {
            CreateRetrievalResponse result = apiInstance.createRetrievalRequestDebitMC(claimId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RetrievalsDebitMastercardAndEuropeDualAcquirerApi#createRetrievalRequestDebitMC");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import retrievals__debit_master_card_and_europe_dual_acquirer_api
from openapi_client.model.create_retrieval_request_single import CreateRetrievalRequestSingle
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = retrievals__debit_master_card_and_europe_dual_acquirer_api.RetrievalsDebitMastercardAndEuropeDualAcquirerApi(client)
claim_id = "200002020654"  # str | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
body = CreateRetrievalRequestSingle()  # CreateRetrievalRequestSingle | Create Retrieval Request
try:
    # This resource creates a new retrieval request for Debit Mastercard and Europe Dual Acquirer
    api_response = api_instance.create_retrieval_request_debit_mc(claim_id, body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling RetrievalsDebitMastercardAndEuropeDualAcquirerApi->create_retrieval_request_debit_mc: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.RetrievalsDebitMastercardAndEuropeDualAcquirerApi();
let claimId = '200002020654'; // String | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
let body = new MasterCom.CreateRetrievalRequestSingle(); // CreateRetrievalRequestSingle | Create Retrieval Request
apiInstance.createRetrievalRequestDebitMC(claimId, body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::RetrievalsDebitMastercardAndEuropeDualAcquirerApi.new api_client
claim_id = '200002020654' # String | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
body = OpenapiClient::CreateRetrievalRequestSingle.new # CreateRetrievalRequestSingle | Create Retrieval Request
begin
  # This resource creates a new retrieval request for Debit Mastercard and Europe Dual Acquirer
  result = api_instance.create_retrieval_request_debit_mc(claim_id, body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling RetrievalsDebitMastercardAndEuropeDualAcquirerApi->create_retrieval_request_debit_mc: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\RetrievalsDebitMastercardAndEuropeDualAcquirerApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
$body = new \OpenAPI\Client\Model\CreateRetrievalRequestSingle(); // \OpenAPI\Client\Model\CreateRetrievalRequestSingle | Create Retrieval Request
try {
    $result = $apiInstance->createRetrievalRequestDebitMC($claim_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RetrievalsDebitMastercardAndEuropeDualAcquirerApi->createRetrievalRequestDebitMC: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new RetrievalsDebitMastercardAndEuropeDualAcquirerApi
            {
                Client = client
            };
            var claimId = "200002020654";  // string | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
            var body = new CreateRetrievalRequestSingle(); // CreateRetrievalRequestSingle | Create Retrieval Request
            try
            {
                // This resource creates a new retrieval request for Debit Mastercard and Europe Dual Acquirer
                var result = apiInstance.CreateRetrievalRequestDebitMC(claimId, body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling RetrievalsDebitMastercardAndEuropeDualAcquirerApi.CreateRetrievalRequestDebitMC: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Issuer Respond to Fulfillment {#issuer-respond-to-fulfillment-1}

Before Issuer Respond to Fulfillment Request, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.
[Create Debit MC Retrieval Request](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-debit-mc-retrieval-request) can be used to create a new request-id, or [Retrieve Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claim) can be used to retrieve an existing request-id associated with a claim.

|           API Call            |                                                 Description                                                 |                                           URI                                           |   Response   |
|-------------------------------|-------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|--------------|
| Issuer respond to fulfillment | This resource is used by Issuers to respond to a fulfillment for Debit Mastercard and Europe Dual Acquirer. | POST /v6/claims/{claim-id}/retrievalrequests/debitmc/{request-id}/fulfillments/response | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.RetrievalsDebitMastercardAndEuropeDualAcquirerApi;
import com.mastercard.api.mastercom.model.IssuerFulfillmentRequest;
import com.mastercard.api.mastercom.model.RetrievalResponse;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        RetrievalsDebitMastercardAndEuropeDualAcquirerApi apiInstance = new RetrievalsDebitMastercardAndEuropeDualAcquirerApi(client);
        String claimId = "200002020654"; // String | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
        String requestId = "300002296235"; // String | Request Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
        IssuerFulfillmentRequest body = new IssuerFulfillmentRequest(); // IssuerFulfillmentRequest | Issuer Fulfillment Response
        try {
            RetrievalResponse result = apiInstance.issuerResponseRetrievalDebitMCRequest(claimId, requestId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RetrievalsDebitMastercardAndEuropeDualAcquirerApi#issuerResponseRetrievalDebitMCRequest");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import retrievals__debit_master_card_and_europe_dual_acquirer_api
from openapi_client.model.issuer_fulfillment_request import IssuerFulfillmentRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = retrievals__debit_master_card_and_europe_dual_acquirer_api.RetrievalsDebitMastercardAndEuropeDualAcquirerApi(client)
claim_id = "200002020654"  # str | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
request_id = "300002296235"  # str | Request Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
body = IssuerFulfillmentRequest()  # IssuerFulfillmentRequest | Issuer Fulfillment Response
try:
    # This resource is used by Issuers to respond to a fulfillment for Debit Mastercard and Europe Dual Acquirer
    api_response = api_instance.issuer_response_retrieval_debit_mc_request(claim_id, request_id, body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling RetrievalsDebitMastercardAndEuropeDualAcquirerApi->issuer_response_retrieval_debit_mc_request: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.RetrievalsDebitMastercardAndEuropeDualAcquirerApi();
let claimId = '200002020654'; // String | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
let requestId = '300002296235'; // String | Request Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
let body = new MasterCom.IssuerFulfillmentRequest(); // IssuerFulfillmentRequest | Issuer Fulfillment Response
apiInstance.issuerResponseRetrievalDebitMCRequest(claimId, requestId, body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::RetrievalsDebitMastercardAndEuropeDualAcquirerApi.new api_client
claim_id = '200002020654' # String | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
request_id = '300002296235' # String | Request Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
body = OpenapiClient::IssuerFulfillmentRequest.new # IssuerFulfillmentRequest | Issuer Fulfillment Response
begin
  # This resource is used by Issuers to respond to a fulfillment for Debit Mastercard and Europe Dual Acquirer
  result = api_instance.issuer_response_retrieval_debit_mc_request(claim_id, request_id, body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling RetrievalsDebitMastercardAndEuropeDualAcquirerApi->issuer_response_retrieval_debit_mc_request: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\RetrievalsDebitMastercardAndEuropeDualAcquirerApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
$request_id = '300002296235'; // string | Request Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
$body = new \OpenAPI\Client\Model\IssuerFulfillmentRequest(); // \OpenAPI\Client\Model\IssuerFulfillmentRequest | Issuer Fulfillment Response
try {
    $result = $apiInstance->issuerResponseRetrievalDebitMCRequest($claim_id, $request_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RetrievalsDebitMastercardAndEuropeDualAcquirerApi->issuerResponseRetrievalDebitMCRequest: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new RetrievalsDebitMastercardAndEuropeDualAcquirerApi
            {
                Client = client
            };
            var claimId = "200002020654";  // string | Claim Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
            var requestId = "300002296235";  // string | Request Id for the Retrieval Request.   Length: 1-19   Valid Values/Format: Numeric
            var body = new IssuerFulfillmentRequest(); // IssuerFulfillmentRequest | Issuer Fulfillment Response
            try
            {
                // This resource is used by Issuers to respond to a fulfillment for Debit Mastercard and Europe Dual Acquirer
                var result = apiInstance.IssuerResponseRetrievalDebitMCRequest(claimId, requestId, body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling RetrievalsDebitMastercardAndEuropeDualAcquirerApi.IssuerResponseRetrievalDebitMCRequest: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Get documentation {#get-documentation-1}

Before Get Retrieval Doc, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.
[Create Debit MC Retrieval Request](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-debit-mc-retrieval-request) can be used to create a new request-id, or [Retrieve Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claim) can be used to retrieve an existing request-id associated with a claim.

|     API Call      |                                                   Description                                                    |                                    URI                                     |   Response   |
|-------------------|------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------|--------------|
| Get Documentation | This resource retrieves all documentation for a retrieval request for Debit Mastercard and Europe Dual Acquirer. | GET /v6/claims/{claim-id}/retrievalrequests/debitmc/{request-id}/documents | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.RetrievalsDebitMastercardAndEuropeDualAcquirerApi;
import com.mastercard.api.mastercom.model.DocumentResponseStructure;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        RetrievalsDebitMastercardAndEuropeDualAcquirerApi apiInstance = new RetrievalsDebitMastercardAndEuropeDualAcquirerApi(client);
        String claimId = "200002020654"; // String | The Claim Id.   Length: 1-19   Valid Values/Format: Numeric
        String requestId = "300002296235"; // String | The Request Id.   Length: 1-19   Valid Values/Format: Numeric
        String format = "ORIGINAL"; // String | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
        try {
            DocumentResponseStructure result = apiInstance.getRetrievalDocDebitMC(claimId, requestId, format);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RetrievalsDebitMastercardAndEuropeDualAcquirerApi#getRetrievalDocDebitMC");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import retrievals__debit_master_card_and_europe_dual_acquirer_api
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = retrievals__debit_master_card_and_europe_dual_acquirer_api.RetrievalsDebitMastercardAndEuropeDualAcquirerApi(client)
claim_id = "200002020654"  # str | The Claim Id.   Length: 1-19   Valid Values/Format: Numeric
request_id = "300002296235"  # str | The Request Id.   Length: 1-19   Valid Values/Format: Numeric
format = "ORIGINAL"  # str | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
try:
    # This resource retrievals all documentation for a retrieval request for Debit Mastercard and Europe Dual Acquirer
    api_response = api_instance.get_retrieval_doc_debit_mc(claim_id, request_id, format)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling RetrievalsDebitMastercardAndEuropeDualAcquirerApi->get_retrieval_doc_debit_mc: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.RetrievalsDebitMastercardAndEuropeDualAcquirerApi();
let claimId = '200002020654'; // String | The Claim Id.   Length: 1-19   Valid Values/Format: Numeric
let requestId = '300002296235'; // String | The Request Id.   Length: 1-19   Valid Values/Format: Numeric
let format = 'ORIGINAL'; // String | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
apiInstance.getRetrievalDocDebitMC(claimId, requestId, format, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::RetrievalsDebitMastercardAndEuropeDualAcquirerApi.new api_client
claim_id = '200002020654' # String | The Claim Id.   Length: 1-19   Valid Values/Format: Numeric
request_id = '300002296235' # String | The Request Id.   Length: 1-19   Valid Values/Format: Numeric
format = 'ORIGINAL' # String | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
begin
  # This resource retrievals all documentation for a retrieval request for Debit Mastercard and Europe Dual Acquirer
  result = api_instance.get_retrieval_doc_debit_mc(claim_id, request_id, format)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling RetrievalsDebitMastercardAndEuropeDualAcquirerApi->get_retrieval_doc_debit_mc: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\RetrievalsDebitMastercardAndEuropeDualAcquirerApi($client, $config);
$claim_id = '200002020654'; // string | The Claim Id.   Length: 1-19   Valid Values/Format: Numeric
$request_id = '300002296235'; // string | The Request Id.   Length: 1-19   Valid Values/Format: Numeric
$format = 'ORIGINAL'; // string | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
try {
    $result = $apiInstance->getRetrievalDocDebitMC($claim_id, $request_id, $format);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RetrievalsDebitMastercardAndEuropeDualAcquirerApi->getRetrievalDocDebitMC: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new RetrievalsDebitMastercardAndEuropeDualAcquirerApi
            {
                Client = client
            };
            var claimId = "200002020654";  // string | The Claim Id.   Length: 1-19   Valid Values/Format: Numeric
            var requestId = "300002296235";  // string | The Request Id.   Length: 1-19   Valid Values/Format: Numeric
            var format = "ORIGINAL";  // string | File Format.   Length: 8-11   Valid Values/Format: ORIGINAL, MERGED_TIFF, MERGED_PDF
            try
            {
                // This resource retrievals all documentation for a retrieval request for Debit Mastercard and Europe Dual Acquirer
                var result = apiInstance.GetRetrievalDocDebitMC(claimId, requestId, format);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling RetrievalsDebitMastercardAndEuropeDualAcquirerApi.GetRetrievalDocDebitMC: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Retrieval Fulfillment Status {#retrieval-fulfillment-status-1}

|           API Call           |                                                     Description                                                     |                   URI                    |   Response   |
|------------------------------|---------------------------------------------------------------------------------------------------------------------|------------------------------------------|--------------|
| Retrieval Fulfillment Status | This resource retrieves the processing status of a fulfillment image for Debit Mastercard and Europe Dual Acquirer. | PUT /v6/retrievalrequests/debitmc/status | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.RetrievalsDebitMastercardAndEuropeDualAcquirerApi;
import com.mastercard.api.mastercom.model.RetrievalStatusRequest;
import com.mastercard.api.mastercom.model.RetrievalStatusResponse;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        RetrievalsDebitMastercardAndEuropeDualAcquirerApi apiInstance = new RetrievalsDebitMastercardAndEuropeDualAcquirerApi(client);
        RetrievalStatusRequest body = new RetrievalStatusRequest(); // RetrievalStatusRequest | Retrieval information
        try {
            RetrievalStatusResponse result = apiInstance.retrieveFulfillmentDebitMCStatus(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RetrievalsDebitMastercardAndEuropeDualAcquirerApi#retrieveFulfillmentDebitMCStatus");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import retrievals__debit_master_card_and_europe_dual_acquirer_api
from openapi_client.model.retrieval_status_request import RetrievalStatusRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = retrievals__debit_master_card_and_europe_dual_acquirer_api.RetrievalsDebitMastercardAndEuropeDualAcquirerApi(client)
body = RetrievalStatusRequest()  # RetrievalStatusRequest | Retrieval information
try:
    # This resource retrieves the processing status of a fulfilment image for Debit Mastercard and Europe Dual Acquirer
    api_response = api_instance.retrieve_fulfillment_debit_mc_status(body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling RetrievalsDebitMastercardAndEuropeDualAcquirerApi->retrieve_fulfillment_debit_mc_status: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.RetrievalsDebitMastercardAndEuropeDualAcquirerApi();
let body = new MasterCom.RetrievalStatusRequest(); // RetrievalStatusRequest | Retrieval information
apiInstance.retrieveFulfillmentDebitMCStatus(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::RetrievalsDebitMastercardAndEuropeDualAcquirerApi.new api_client
body = OpenapiClient::RetrievalStatusRequest.new({retrieval_list: [OpenapiClient::RetrievalStatusRequestStructure.new # RetrievalStatusRequest | Retrieval information
begin
  # This resource retrieves the processing status of a fulfilment image for Debit Mastercard and Europe Dual Acquirer
  result = api_instance.retrieve_fulfillment_debit_mc_status(body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling RetrievalsDebitMastercardAndEuropeDualAcquirerApi->retrieve_fulfillment_debit_mc_status: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\RetrievalsDebitMastercardAndEuropeDualAcquirerApi($client, $config);
$body = new \OpenAPI\Client\Model\RetrievalStatusRequest(); // \OpenAPI\Client\Model\RetrievalStatusRequest | Retrieval information
try {
    $result = $apiInstance->retrieveFulfillmentDebitMCStatus($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RetrievalsDebitMastercardAndEuropeDualAcquirerApi->retrieveFulfillmentDebitMCStatus: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new RetrievalsDebitMastercardAndEuropeDualAcquirerApi
            {
                Client = client
            };
            var body = new RetrievalStatusRequest(); // RetrievalStatusRequest | Retrieval information
            try
            {
                // This resource retrieves the processing status of a fulfilment image for Debit Mastercard and Europe Dual Acquirer
                var result = apiInstance.RetrieveFulfillmentDebitMCStatus(body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling RetrievalsDebitMastercardAndEuropeDualAcquirerApi.RetrieveFulfillmentDebitMCStatus: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

## 14. Transactions (Debit Mastercard and Europe Dual Acquirer) {#14-transactions-debit-mastercard-and-europe-dual-acquirer}

### Transaction Search Debit MC {#transaction-search-debit-mc}

|          API Call           |                                                     Description                                                     |                 URI                  |   Response   |
|-----------------------------|---------------------------------------------------------------------------------------------------------------------|--------------------------------------|--------------|
| Debit MC transaction search | This resource is used to query for Debit MC message transaction data for Debit Mastercard and Europe Dual Acquirer. | POST /v6/transactions/debitmc/search | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.TransactionsDebitMastercardAndEuropeDualAcquirerApi;
import com.mastercard.api.mastercom.model.TransactionSingleMessageSummaryList;
import com.mastercard.api.mastercom.model.TransactionSingleSearchRequest;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class Example {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        TransactionsDebitMastercardAndEuropeDualAcquirerApi apiInstance = new TransactionsDebitMastercardAndEuropeDualAcquirerApi(client);
        TransactionSingleSearchRequest body = new TransactionSingleSearchRequest(); // TransactionSingleSearchRequest | Transaction DebitMC Message Search Request
        try {
            TransactionSingleMessageSummaryList result = apiInstance.transactionMessageSearchDebitMC(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TransactionsDebitMastercardAndEuropeDualAcquirerApi#transactionMessageSearchDebitMC");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import transactions__debit_master_card_and_europe_dual_acquirer_api
from openapi_client.model.transaction_single_search_request import TransactionSingleSearchRequest
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = transactions__debit_master_card_and_europe_dual_acquirer_api.TransactionsDebitMastercardAndEuropeDualAcquirerApi(client)
body = TransactionSingleSearchRequest()  # TransactionSingleSearchRequest | Transaction DebitMC Message Search Request
try:
    # This resource is used to query for Debit MC message transaction data for Debit Mastercard and Europe Dual Acquirer
    api_response = api_instance.transaction_message_search_debit_mc(body)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Debit Mastercard And Europe Dual Acquirer Transaction Search API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.TransactionsDebitMastercardAndEuropeDualAcquirerApi();
let body = new MasterCom.TransactionSingleSearchRequest(); // TransactionSingleSearchRequest | Transaction DebitMC Message Search Request
apiInstance.transactionMessageSearchDebitMC(body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::TransactionsDebitMastercardAndEuropeDualAcquirerApi.new api_client
body = OpenapiClient::TransactionSingleSearchRequest.new # TransactionSingleSearchRequest | Transaction DebitMC Message Search Request
begin
  # This resource is used to query for Debit MC message transaction data for Debit Mastercard and Europe Dual Acquirer
  result = api_instance.transaction_message_search_debit_mc(body)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Debit Mastercard And Europe Dual Acquirer Transaction Search API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\TransactionsDebitMastercardAndEuropeDualAcquirerApi($client, $config);
$body = new \OpenAPI\Client\Model\TransactionSingleSearchRequest(); // \OpenAPI\Client\Model\TransactionSingleSearchRequest | Transaction DebitMC Message Search Request
try {
    $result = $apiInstance->transactionMessageSearchDebitMC($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TransactionsDebitMastercardAndEuropeDualAcquirerApi->transactionMessageSearchDebitMC: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new TransactionsDebitMastercardAndEuropeDualAcquirerApi
            {
                Client = client
            };
            var body = new TransactionSingleSearchRequest(); // TransactionSingleSearchRequest | Transaction DebitMC Message Search Request
            try
            {
                // This resource is used to query for Debit MC message transaction data for Debit Mastercard and Europe Dual Acquirer
                var result = apiInstance.TransactionMessageSearchDebitMC(body);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling TransactionsDebitMastercardAndEuropeDualAcquirerApi.TransactionMessageSearchDebitMC: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

### Retrieve Debit MC Transaction Details {#retrieve-debit-mc-transaction-details}

Before Retrieve Debit MC Transaction Details, [Create Claim](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#create-claim) can be used to create a new claim-id, or [Retrieve Claim from Queue](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue) and [Retrieve Claims from Queue Within Date Range](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#retrieve-claims-from-queue-within-date-range) to retrieve an existing claim-id.
[Transaction Search Debit MC](https://developer.mastercard.com/mastercom/documentation/test-cases/test-cases/index.md#transaction-search-debit-mc) can be used to retrieve transaction-id.

|               API Call                |                                                   Description                                                    |                      URI                       |   Response   |
|---------------------------------------|------------------------------------------------------------------------------------------------------------------|------------------------------------------------|--------------|
| Retrieve Debit MC transaction details | This resource is used to retrieve details for a given transaction for Debit Mastercard and Europe Dual Acquirer. | GET /v6/{claim-id}/transactions/debitmc/detail | HTTP: 200 OK |

* Java
* Python
* NodeJS
* Ruby
* PHP
* C#

```java
import com.mastercard.api.mastercom.ApiClient;
import com.mastercard.api.mastercom.ApiException;
import com.mastercard.api.mastercom.api.TransactionsDebitMastercardAndEuropeDualAcquirerApi;
import com.mastercard.api.mastercom.model.TransactionSingleMessageDetail;
import com.mastercard.developer.interceptors.OkHttpOAuth1Interceptor;
import com.mastercard.developer.utils.AuthenticationUtils;
import java.security.PrivateKey;
public class DebitmcTransactionDetails {
    public static void main(String[] args) throws Exception {
        String consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#"; // change accordingly
        String signingKeyFilePath = "#PATH TO YOUR P12 FILE HERE#"; // change accordingly
        String signingKeyAlias = "#YOUR KEY ALIAS HERE#"; // change accordingly
        String signingKeyPass = "#YOUR KEY PASSWORD HERE#"; // change accordingly
        PrivateKey signingKey = AuthenticationUtils.loadSigningKey(signingKeyFilePath, signingKeyAlias, signingKeyPass); // Provided by the OAuth1 Signer lib
        ApiClient client = new ApiClient();
        client.setBasePath("https://sandbox.api.mastercard.com/mastercom");
        client.setDebugging(true);
        client.setHttpClient(
                client.getHttpClient()
                        .newBuilder()
                        .addInterceptor(new OkHttpOAuth1Interceptor(consumerKey, signingKey)) // Provided by the OAuth1 Signer lib
                        .build()
        );
        TransactionsDebitMastercardAndEuropeDualAcquirerApi apiInstance = new TransactionsDebitMastercardAndEuropeDualAcquirerApi(client);
        String claimId = "200002020654"; // String | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
        try {
            TransactionSingleMessageDetail result = apiInstance.transactionDebitMCMessageDetail(claimId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TransactionsDebitMastercardAndEuropeDualAcquirerApi#transactionDebitMCMessageDetail");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}
```

```python
import openapi_client
from openapi_client.api import transactions__debit_master_card_and_europe_dual_acquirer_api
from oauth1.signer_interceptor import add_signer_layer
from pprint import pprint
config = openapi_client.Configuration(
    host = "https://sandbox.api.mastercard.com/mastercom"
)
client = openapi_client.ApiClient(config)
add_signer_layer(
    client,
    "#PATH TO YOUR P12 FILE HERE#", 
    "#YOUR KEY PASSWORD HERE#",
    "#YOUR 97 CHARACTER CONSUMER KEY HERE#"
)
api_instance = transactions__debit_master_card_and_europe_dual_acquirer_api.TransactionsDebitMastercardAndEuropeDualAcquirerApi(client)
claim_id = "200002020654"  # str | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
try:
    # This resource is used to retrieve detail for a given transaction for Debit Mastercard and Europe Dual Acquirer
    api_response = api_instance.transaction_debit_mc_message_detail(claim_id)
    pprint(api_response)
except openapi_client.ApiException as e:
    print("Exception when calling Debit Mastercard And Europe Dual Acquirer Transaction Details API: %s\n" % e)
```

```javascript
const MasterCom = require('master_com');
const forge = require("node-forge");
const fs = require("fs");
const oauth = require("mastercard-oauth1-signer");
const p12Content = fs.readFileSync("#PATH TO YOUR P12 FILE HERE#", 'binary');
const p12Asn1 = forge.asn1.fromDer(p12Content, false);
const p12 = forge.pkcs12.pkcs12FromAsn1(p12Asn1, false, "#YOUR KEY PASSWORD HERE#");
const keyObj = p12.getBags({
    friendlyName: "#YOUR KEY ALIAS HERE#",
    bagType: forge.pki.oids.pkcs8ShroudedKeyBag
}).friendlyName[0];
const signingKey = forge.pki.privateKeyToPem(keyObj.key);
const client = MasterCom.ApiClient.instance;
client.basePath = "https://sandbox.api.mastercard.com/mastercom";
const consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
client.applyAuthToRequest = function(request) {
    const _end = request._end;
    request._end = function() {
        const authHeader = oauth.getAuthorizationHeader(request.url, request.method, request._data, consumerKey, signingKey);
        request.req.setHeader('Authorization', authHeader);
        _end.call(request);
    }
    return request;
};
let apiInstance = new MasterCom.TransactionsDebitMastercardAndEuropeDualAcquirerApi();
let claimId = '200002020654'; // String | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
apiInstance.transactionDebitMCMessageDetail(claimId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

```ruby
require 'openssl'
require 'oauth'
require 'openapi_client'
is = File.binread('#PATH TO YOUR P12 FILE HERE#')
signing_key = OpenSSL::PKCS12.new(is, '#YOUR KEY PASSWORD HERE#').key;
consumer_key = '#YOUR 97 CHARACTER CONSUMER KEY HERE#'
config = OpenapiClient::Configuration.default
api_client = OpenapiClient::ApiClient.new
config.base_path = 'https://sandbox.api.mastercard.com/mastercom'
api_client.config = config
Typhoeus.before do |request|
    authHeader =
        OAuth.get_authorization_header request.base_url, request.options[:method],
                                       request.options[:body], consumer_key, signing_key.key
    request.options[:headers] = request.options[:headers].merge({'Authorization' => authHeader})
end
api_instance = OpenapiClient::TransactionsDebitMastercardAndEuropeDualAcquirerApi.new api_client
claim_id = '200002020654' # String | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
begin
  # This resource is used to retrieve detail for a given transaction for Debit Mastercard and Europe Dual Acquirer
  result = api_instance.transaction_debit_mc_message_detail(claim_id)
  p result
rescue OpenapiClient::ApiError => e
  puts "Error when calling Debit Mastercard And Europe Dual Acquirer Retrieve Transaction Details API: #{e}"
end
```

```PHP
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use Mastercard\Developer\OAuth\Utils\AuthenticationUtils;
use Mastercard\Developer\OAuth\Signers\PsrHttpMessageSigner;
$signingKey = AuthenticationUtils::loadSigningKey(
                '#PATH TO YOUR P12 FILE HERE#',
                '#YOUR KEY ALIAS HERE#', 
                '#YOUR KEY PASSWORD HERE#');
$consumerKey = '#YOUR 97 CHARACTER CONSUMER KEY HERE#';
$stack = new GuzzleHttp\HandlerStack();
$stack->setHandler(new GuzzleHttp\Handler\CurlHandler());
$stack->push(GuzzleHttp\Middleware::mapRequest([new PsrHttpMessageSigner($consumerKey, $signingKey), 'sign']));
$options = ['handler' => $stack];
$client = new GuzzleHttp\Client($options);
$config = new OpenAPI\Client\Configuration();
$config->setHost('https://sandbox.api.mastercard.com/mastercom');
$apiInstance = new OpenAPI\Client\Api\TransactionsDebitMastercardAndEuropeDualAcquirerApi($client, $config);
$claim_id = '200002020654'; // string | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
try {
    $result = $apiInstance->transactionDebitMCMessageDetail($claim_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TransactionsDebitMastercardAndEuropeDualAcquirerApi->transactionDebitMCMessageDetail: ', $e->getMessage(), PHP_EOL;
}
?>
```

```c#
using Com.Mastercard.Api.Mastercom.Api;
using Com.Mastercard.Api.Mastercom.Client;
using Mastercard.Developer.OAuth1Signer.Core.Utils;
using System;
namespace Example
{
    public class Example
    {
        public static void Main()
        {
            var signingKey = AuthenticationUtils.LoadSigningKey(
                        @"#PATH TO YOUR P12 FILE HERE#", 
                        "#YOUR KEY ALIAS HERE#", 
                        "#YOUR KEY PASSWORD HERE#");
            var consumerKey = "#YOUR 97 CHARACTER CONSUMER KEY HERE#";
            var basePath = "https://sandbox.api.mastercard.com/mastercom";
            var client = new ApiClient(signingKey, basePath, consumerKey);
            var apiInstance = new TransactionsDebitMastercardAndEuropeDualAcquirerApi
            {
                Client = client
            };
            var claimId = "200002020654";  // string | Claim Id.   Length: 1-19   Valid Values/Format: Numeric
            try
            {
                // This resource is used to retrieve detail for a given transaction for Debit Mastercard and Europe Dual Acquirer
                var result = apiInstance.TransactionDebitMCMessageDetail(claimId);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling TransactionsDebitMastercardAndEuropeDualAcquirerApi.TransactionDebitMCMessageDetail: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}
```

