# Code and Formats
source: https://developer.mastercard.com/merchant-match-tool/documentation/code-and-formats/index.md

## Error Codes {#error-codes}

### Gateway Errors {#gateway-errors}

When first integrating with the API you are likely to encounter errors from the gateway. These types of errors occur when the wrong ids are used, your access is not correct, or you hit a rate limit. These errors are common across Mastercard's APIs, and you can see all of them documented [here](https://developer.mastercard.com/platform/documentation/gateway-error-codes/).

#### Single API {#single-api}

| Code |                                         Description                                         |                                                                                                            Tip to Resolve                                                                                                             |
|------|---------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| R01  | Merchant DBA Name is required                                                               | Provided Merchant Name is empty. Please provide valid Merchant DBA name                                                                                                                                                               |
| R03  | State/Province Code is required (Australia, Canada and United States only)                  | Provided State/Province Code is empty. Please provide valid State/Province Code as documented [here](https://developer.mastercard.com/merchant-match-tool/documentation/code-and-formats/#iso-country-and-currency-codes)             |
| R04  | State/Province Code cannot exceed 3 characters (Australia, Canada and United States only)   | Provided State/Province Code exceeds 3 characters. Please provide valid State/Province Code as documented [here](https://developer.mastercard.com/merchant-match-tool/documentation/code-and-formats/#iso-country-and-currency-codes) |
| R09  | Country Code is required                                                                    | Provided Country Code is empty. Please provide valid Country Code as documented [here](https://developer.mastercard.com/merchant-match-tool/documentation/code-and-formats/#iso-country-and-currency-codes)                           |
| R10  | Country Code must be a valid, three-character code                                          | Please provide valid three-character Country Code as documented [here](https://developer.mastercard.com/merchant-match-tool/documentation/code-and-formats/#iso-country-and-currency-codes)                                           |
| R23  | Invalid Country and State/Province combination                                              | Please provide valid Country and State/Province combination as documented [here](https://developer.mastercard.com/merchant-match-tool/documentation/code-and-formats/#iso-country-and-currency-codes)                                 |
| R24  | U.S. Zip Codes must be numeric                                                              | Please provide numeric U.S. Zip Codes such as 11372                                                                                                                                                                                   |
| R50  | The request cannot be parsed correctly. Please check the format                             | Please make sure the JSON request body is valid                                                                                                                                                                                       |
| R51  | Invalid Search Term. Merchant DBA Name is blank after preprocessing.                        | Please make sure you have submitted a valid Merchant DBA name                                                                                                                                                                         |
| R52  | Merchant Name must be alphanumeric and allowed maximum length is 110                        | Please provide alphanumeric Merchant Name with maximum length of 110 characters                                                                                                                                                       |
| R53  | Street Address must be alphanumeric and allowed maximum length is 110                       | Please provide alphanumeric Street Address with maximum length of 110 characters                                                                                                                                                      |
| R54  | City must be alpha characters only and allowed maximum length is 30                         | Please provide City with alpha characters only and maximum length of 30 characters                                                                                                                                                    |
| R55  | Postal Code must be alphanumeric and allowed maximum length is 10                           | Please provide alphanumeric Postal Code with maximum length of 10 characters                                                                                                                                                          |
| R56  | Phone Number must be alphanumeric and allowed maximum length is 16                          | Please provide alphanumeric Phone Number with maximum length of 16 characters                                                                                                                                                         |
| R57  | Tax Id must be alphanumeric and allowed maximum length is 9                                 | Please provide alphanumeric Tax ID with maximum length of 9 characters                                                                                                                                                                |
| R90  | Too many requests received with the same API-Key. Please re-submit the query after a while. | Please make sure your application adheres to the number of request limitation for MMT                                                                                                                                                 |

#### Multiple API {#multiple-api}

| Code |                                         Description                                         |                                                                                                            Tip to Resolve                                                                                                             |
|------|---------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| R01  | Merchant DBA Name is required                                                               | Provided Merchant NBA Name is empty. Please provide valid Merchant DBA name                                                                                                                                                           |
| R02  | Request Id is required                                                                      | Please submit a unique Request ID with the MMT API request                                                                                                                                                                            |
| R03  | State/Province Code is required (Australia, Canada and United States only)                  | Provided State/Province Code is empty. Please provide valid State/Province Code as documented [here](https://developer.mastercard.com/merchant-match-tool/documentation/code-and-formats/#iso-country-and-currency-codes)             |
| R04  | State/Province Code cannot exceed 3 characters (Australia, Canada and United States only)   | Provided State/Province Code exceeds 3 characters. Please provide valid State/Province Code as documented [here](https://developer.mastercard.com/merchant-match-tool/documentation/code-and-formats/#iso-country-and-currency-codes) |
| R09  | Country Code is required                                                                    | Provided Country Code is empty. Please provide valid Country Code as documented [here](https://developer.mastercard.com/merchant-match-tool/documentation/code-and-formats/#iso-country-and-currency-codes)                           |
| R10  | Country Code must be a valid, three-character code                                          | Please provide valid three-character Country Code as documented [here](https://developer.mastercard.com/merchant-match-tool/documentation/code-and-formats/#iso-country-and-currency-codes)                                           |
| R23  | Invalid Country and State/Province combination                                              | Please provide valid Country and State/Province combination as documented [here](https://developer.mastercard.com/merchant-match-tool/documentation/code-and-formats/#iso-country-and-currency-codes)                                 |
| R24  | U.S. Zip Codes must be numeric                                                              | Please provide numeric U.S. Zip Codes such as 11372                                                                                                                                                                                   |
| R51  | Invalid Search Term. Merchant DBA Name is blank after preprocessing.                        | Please make sure you have submitted a valid Merchant DBA name                                                                                                                                                                         |
| R52  | Merchant Name must be alphanumeric and allowed maximum length is 110                        | Please provide alphanumeric Merchant Name with maximum length of 110 characters                                                                                                                                                       |
| R53  | Street Address must be alphanumeric and allowed maximum length is 110                       | Please provide alphanumeric Street Address with maximum length of 110 characters                                                                                                                                                      |
| R54  | City must be alpha characters only and allowed maximum length is 30                         | Please provide City with alpha characters only and maximum length of 30 characters                                                                                                                                                    |
| R55  | Postal Code must be alphanumeric and allowed maximum length is 10                           | Please provide alphanumeric Postal Code with maximum length of 10 characters                                                                                                                                                          |
| R56  | Phone Number must be alphanumeric and allowed maximum length is 16                          | Please provide alphanumeric Phone Number with maximum length of 16 characters                                                                                                                                                         |
| R57  | Tax Id must be alphanumeric and allowed maximum length is 9                                 | Please provide alphanumeric Tax ID with maximum length of 9 characters                                                                                                                                                                |
| R90  | Too many requests received with the same API-Key. Please re-submit the query after a while. | Please make sure your application adheres to the number of request limitation for MMT                                                                                                                                                 |

## HTTP Response codes/Reason codes {#http-response-codesreason-codes}

### Single API {#single-api-1}

#### 401 Response {#401-response}

| Code |                                   Description                                   |                                   Tip to Resolve                                   |
|------|---------------------------------------------------------------------------------|------------------------------------------------------------------------------------|
| R80  | The API Key must be specified in the header of the request as the field API-Key | Please make sure you have provided the API-Key in the header field named "API-Key" |
| R81  | The specified API-Key is invalid                                                | Please provide a valid API-Key procured from Mastercard Developers                 |

#### 429 Response {#429-response}

| Code |                                          Description                                          |                                          Tip to Resolve                                           |
|------|-----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|
| R92  | One multiple search request is already in progress. Please re-submit the query after a while. | Please wait for the executing multiple search request to complete before submitting a new request |

#### 500 Response {#500-response}

| Code |                            Description                            |                                                             Tip to Resolve                                                             |
|------|-------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|
| R91  | Internal Server Error. Please contact Mastercard API support team | Please contact Mastercard API [support team](https://developer.mastercard.com/merchant-match-tool/documentation/support/#single-api-1) |

### Multiple API {#multiple-api-1}

#### 400 Response {#400-response}

| Code |                                    Description                                    |                                                          Tip to Resolve                                                           |
|------|-----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|
| R50  | The request cannot be parsed correctly. Please check the format                   | Please make sure the JSON request body is valid                                                                                   |
| R81  | The maximum number of queries allowed for one multiple search API request is 100. | You have exceeded the maximum number of records allowed. Please reduce the number of records to be matched within the API request |

#### 401 Response {#401-response-1}

| Code |                                   Description                                   |                                   Tip to Resolve                                   |
|------|---------------------------------------------------------------------------------|------------------------------------------------------------------------------------|
| R80  | The API Key must be specified in the header of the request as the field API-Key | Please make sure you have provided the API-Key in the header field named "API-Key" |
| R81  | The specified API-Key is invalid                                                | Please provide a valid API-Key procured from Mastercard Developers                 |

#### 429 Response {#429-response-1}

| Code |                                          Description                                          |                                          Tip to Resolve                                           |
|------|-----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|
| R92  | One multiple search request is already in progress. Please re-submit the query after a while. | Please wait for the executing multiple search request to complete before submitting a new request |

#### 500 Response {#500-response-1}

| Code |                            Description                            |                                                             Tip to Resolve                                                             |
|------|-------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|
| R91  | Internal Server Error. Please contact Mastercard API support team | Please contact Mastercard API [support team](https://developer.mastercard.com/merchant-match-tool/documentation/support/#single-api-1) |

## ISO Country and State Codes {#iso-country-and-state-codes}

For country codes 'USA, AUS, CAN' following state codes are eligible:

| State Code | Country Code |
|------------|--------------|
| AL         | USA          |
| MT         | USA          |
| AK         | USA          |
| NE         | USA          |
| AS         | USA          |
| NV         | USA          |
| AZ         | USA          |
| NH         | USA          |
| AR         | USA          |
| NJ         | USA          |
| CA         | USA          |
| NM         | USA          |
| CO         | USA          |
| NY         | USA          |
| CT         | USA          |
| NC         | USA          |
| DE         | USA          |
| ND         | USA          |
| DC         | USA          |
| MP         | USA          |
| FM         | USA          |
| OH         | USA          |
| FL         | USA          |
| OK         | USA          |
| GA         | USA          |
| OR         | USA          |
| GU         | USA          |
| PW         | USA          |
| HI         | USA          |
| PA         | USA          |
| ID         | USA          |
| PR         | USA          |
| IL         | USA          |
| RI         | USA          |
| IN         | USA          |
| SC         | USA          |
| IA         | USA          |
| SD         | USA          |
| KS         | USA          |
| TN         | USA          |
| KY         | USA          |
| TX         | USA          |
| LA         | USA          |
| UT         | USA          |
| ME         | USA          |
| VT         | USA          |
| MH         | USA          |
| VI         | USA          |
| MD         | USA          |
| VA         | USA          |
| MA         | USA          |
| WA         | USA,AUS      |
| MI         | USA          |
| WV         | USA          |
| MN         | USA          |
| WI         | USA          |
| MS         | USA          |
| WY         | USA          |
| MO         | USA          |
| AA         | USA          |
| AE         | USA          |
| AP         | USA          |
| AB         | CAN          |
| NU         | CAN          |
| BC         | CAN          |
| ON         | CAN          |
| MB         | CAN          |
| PE         | CAN          |
| NB         | CAN          |
| QC         | CAN          |
| NL         | CAN          |
| SK         | CAN          |
| NT         | CAN,AUS      |
| YT         | CAN          |
| NS         | CAN          |
| ACT        | AUS          |
| SA         | AUS          |
| NSW        | AUS          |
| TAS        | AUS          |
| VIC        | AUS          |
| QLD        | AUS          |

