# Error Codes
source: https://developer.mastercard.com/mastercard-send-person-to-person/documentation/response-error-codes/error-codes/index.md

If your API request is unsuccessful, you should receive a service error response or a gateway error response.

## Service Error Codes {#service-error-codes}

Service error response messages (4xx status code) have the following structure (example values shown). The `Error` array may contain multiple error items.
* JSON
* XML

```JSON
{
  "Errors": {
    "Error": [
      {
        "RequestId": "rqst_73HB-5RO5-0OGS-53SG",
        "Source": "recipient_account_uri",
        "ReasonCode": "INVALID_INPUT_VALUE",
        "Description": "Invalid Account URI",
        "Recoverable": "false",
        "Details": {
          "Detail": [
            {
              "Name": "ErrorDetailCode",
              "Value": "082000"
            }
          ]
        }
      }
    ]
  }
}
```

```XML
<Errors>
   <Error>
      <RequestId>rqst_73HB-5RO5-0OGS-53SG</RequestId>
      <Source>recipient_account_uri</Source>
      <ReasonCode>INVALID_INPUT_VALUE</ReasonCode>
      <Description>Invalid Account URI</Description>
      <Recoverable>false</Recoverable>
      <Details>
         <Detail>
            <Name>ErrorDetailCode</Name>
            <Value>082000</Value>
         </Detail>
      </Details>
   </Error>
</Errors>
```

|    Field    |                                                                                                                                                                                                                                                       Description                                                                                                                                                                                                                                                       |
|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| RequestId   | An application-specific request identifier. Example: rqst_73HB-5RO5-0OGS-53SG                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Source      | The unique identifier that attempts to define the field in error, when available. If an error is not associated with a specific field, System will be returned. If an error is produced because of required data, it would be presented with the field missing data. Examples: amount, recipient_account_uri                                                                                                                                                                                                            |
| ReasonCode  | The general cause of the error; see the table below. Examples: INVALID_INPUT_FORMAT, INVALID_INPUT_LENGTH, INVALID_INPUT_VALUE                                                                                                                                                                                                                                                                                                                                                                                          |
| Description | A textual description of the error. This is optional and will only be displayed if more information is available than is stored in the data identifier and reason code. Examples: Invalid Account URI, Destination Currency ISO code must be within 3 characters length                                                                                                                                                                                                                                                 |
| Recoverable | A true/false indicator stating whether your API request might be successful if you re-sent the API request with the same parameters and data. For example, an unsuccessful API request caused by a server error (5xx response code) might be successful when re-sent. Valid values: true, false                                                                                                                                                                                                                         |
| Details     | Each Open API service has an option to add extra service-specific error information in the Details section. The details are optional and might not be present for every error message. If present, the details are returned in the form of individual detail items, each containing a Name and Value pair: * The Name element will explain what data you will find in the Value element. Example: ErrorDetailCode * The Value element will hold the actual data. Valid values shown in the table below. Example: 082000 |

The following table shows the `ErrorDetailCode`, `ReasonCode` and `Description` values that can be returned. Other values might also exist or be introduced periodically.

| Error Detail Code |      Reason Code       |                                                            Reason Description                                                             |                                                                                                                                                                                                                                             How to Resolve                                                                                                                                                                                                                                             |
|-------------------|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 050005            | AUTHORIZATION_FAILED   | Transaction processing suspended                                                                                                          | Your Mastercard Send transaction processing has been suspended. Contact the Originating Institution that facilitates your Mastercard Send activity.                                                                                                                                                                                                                                                                                                                                                    |
| 050007            | AUTHORIZATION_FAILED   | Unauthorized access                                                                                                                       | Check you are using the correct key, Consumer Key (which identifies the key), and Partner Reference ID (for the `partnerId` part of the endpoint URL) for the API environment. If you recently created your key, you must ask Mastercard to set up the environment for your key and Consumer Key.                                                                                                                                                                                                      |
| 062000            | INVALID_INPUT_FORMAT   | Value contains invalid character                                                                                                          | Correct the value in the field shown by `Source`. For Account URI fields, it could be that part of the URI is the wrong length or missing; see [Account URIs](https://developer.mastercard.com/mastercard-send-person-to-person/documentation/field-uris-codes/account-uris/index.md).                                                                                                                                                                                                                 |
| 072000            | INVALID_INPUT_LENGTH   | Invalid length                                                                                                                            | Correct the length of the value in the field shown by `Source`.                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| 082000            | INVALID_INPUT_VALUE    | Invalid value                                                                                                                             | Correct the value in the field shown by `Source`. For Account URI fields, it could be that the card account is invalid or part of the URI is incorrect, for example wrong CVC or expiration date (e.g. not a future date).                                                                                                                                                                                                                                                                             |
| 092000            | MISSING_REQUIRED_INPUT | Value is required                                                                                                                         | Provide the field shown by `Source`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| 110501            | RESOURCE_ERROR         | Duplicate value                                                                                                                           | It is likely your request has the same `transfer_reference` value as a previous request. Resubmit with a unique value.                                                                                                                                                                                                                                                                                                                                                                                 |
| 110502            | RESOURCE_UNKNOWN       | No default account is defined for the consumer                                                                                            | If this error occurs for a field where you have used a Consumer Mapping ID, it likely means there is no default account record relating to that ID; see the Consumer Mapping service documentation for guidance on setting defaults.                                                                                                                                                                                                                                                                   |
| 110503            | RESOURCE_ERROR         | Account not eligible                                                                                                                      | The account is not eligible to receive the payment. Use a different card account.                                                                                                                                                                                                                                                                                                                                                                                                                      |
| 110504            | RESOURCE_ERROR         | Card type is not supported for merchant                                                                                                   | This error is only returned when credit and prepaid are not supported by your partner configuration.                                                                                                                                                                                                                                                                                                                                                                                                   |
| 110505            | RESOURCE_ERROR         | Invalid currency                                                                                                                          | Provide a valid ISO 4217 alpha-3 currency code; see [Country and Currency Codes](https://developer.mastercard.com/mastercard-send-person-to-person/documentation/field-uris-codes/country-currency-codes/index.md).                                                                                                                                                                                                                                                                                    |
| 110506            | RESOURCE_ERROR         | Network routing preference disabled                                                                                                       | You are unlikely to see this error. If you do, contact API Support or your Implementation Manager.                                                                                                                                                                                                                                                                                                                                                                                                     |
| 110507            | RESOURCE_UNKNOWN       | Record not found                                                                                                                          | For GET requests, check the provided Transfer Reference or ID is correct.                                                                                                                                                                                                                                                                                                                                                                                                                              |
| 110508            | RESOURCE_ERROR         | Primary contact cannot be deleted                                                                                                         | You are unlikely to see this error. If you do, contact API Support or your Implementation Manager.                                                                                                                                                                                                                                                                                                                                                                                                     |
| 110509            | RESOURCE_ERROR         | Updating a different type of URI is not allowed                                                                                           | You are unlikely to see this error. If you do, contact API Support or your Implementation Manager.                                                                                                                                                                                                                                                                                                                                                                                                     |
| 110510            | RESOURCE_ERROR         | Invalid Request                                                                                                                           | Check that your API request is correctly formatted and that the headers match the format (JSON or XML).                                                                                                                                                                                                                                                                                                                                                                                                |
| 110511            | RESOURCE_ERROR         | Operation not allowed                                                                                                                     | Check that you are making the correct type of API request: POST or GET.                                                                                                                                                                                                                                                                                                                                                                                                                                |
| 110515            | RESOURCE_ERROR         | Multiple resources found                                                                                                                  | If this error occurs for a field where you have used a Consumer Mapping ID, it likely means that Mastercard Send has found multiple Consumer Mapping account records relating to that ID; see the Consumer Mapping service documentation for guidance on setting defaults.                                                                                                                                                                                                                             |
| 110516            | RESOURCE_ERROR         | Country not supported for merchant                                                                                                        | Your partner configuration is not enabled for the specified country. Provide a valid country.                                                                                                                                                                                                                                                                                                                                                                                                          |
| 110536            | RESOURCE_ERROR         | Maximum number of records returned by this service has been exceeded. Please utilize the service which returns individual account balance | You are unlikely to see this error. If you do, contact API Support or your Implementation Manager.                                                                                                                                                                                                                                                                                                                                                                                                     |
| 130001            | DECLINE                | Card declined                                                                                                                             | The card account cannot be used. This error code can be returned for many different issuer reasons. To get further details, use a GET call to retrieve information about the transfer. The `network_status_code` and `network_status_description` response fields will indicate the issuer's reason for declining the transaction, see [Network Response Codes](https://developer.mastercard.com/mastercard-send-person-to-person/documentation/response-error-codes/network-response-codes/index.md). |
| 130002            | DECLINE                | Fraud detected                                                                                                                            | The card account cannot be used.                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| 130003            | DECLINE                | Card expired                                                                                                                              | The card account cannot be used.                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| 130004            | DECLINE                | Per transaction maximum amount limit reached                                                                                              | Additional details will be provided in some scenarios. The transaction amount exceeds the per transaction limit set for your partner configuration. The request `amount` must be lower.                                                                                                                                                                                                                                                                                                                |
| 130005            | DECLINE                | Partner has exceeded the daily limit configured in the system                                                                             | You have exceeded the daily transaction limit set for your partner configuration. To increase the limit, contact the Originating Institution that facilitates your Mastercard Send activity.                                                                                                                                                                                                                                                                                                           |
| 130006            | DECLINE                | Transaction Limit is less than the minimum configured for the partner                                                                     | The transaction amount is lower than the per transaction minimum set for your partner configuration. The request `amount` must be higher.                                                                                                                                                                                                                                                                                                                                                              |
| 130007            | DECLINE                | Consumer has exceeded the monthly limit configured in the system                                                                          | You have exceeded the monthly transaction limit set for your partner configuration. To increase the limit, contact the Originating Institution that facilitates your Mastercard Send activity.                                                                                                                                                                                                                                                                                                         |

## Gateway Error Codes {#gateway-error-codes}

Error codes can also be returned by Mastercard's gateway, which is used to verify your request's signature and route the request to the correct location.

Gateway error response messages (4xx/5xx status code) have the following structure:
* JSON
* XML

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "Gateway",
        "ReasonCode": "<Unique code>",
        "Description": "<Description of the error>",
        "Recoverable": true/false,
        "Details": null
      }
    ]
  }
}
```

```XML
<Errors>
   <Error>
      <Source>Gateway</Source>
      <ReasonCode>Unique code</ReasonCode>
      <Description>Description of the error</Description>
      <Recoverable>true/false</Recoverable>
      <Details>null</Details>
   </Error>
</Errors>
```

For a list of the errors returned by our gateway, as well as resolutions to each, see [Gateway Error Codes](https://developer.mastercard.com/platform/documentation/errors-troubleshooting/gateway-error-codes/).
