# Response and Error Codes
source: https://developer.mastercard.com/open-banking-connect/documentation/response-and-error-codes/index.md

## General HTTP response codes {#general-http-response-codes}

The HTTP response code communicates the success or failure of a TPP request message.

|   Response Code   |                                                          Description                                                           |
|-------------------|--------------------------------------------------------------------------------------------------------------------------------|
| `200 OK`          | The request has succeeded.                                                                                                     |
| `400 Bad Request` | The request failed due to an error with the information provided. The request should not be resubmitted without modifications. |
| `500 Error`       | The request failed due to an internal error in Open Banking Connect API.                                                       |

### HTTP Error code response body {#http-error-code-response-body}

If the HTTP response code = 400 is returned, the response body typically provides additional details on the error. The table below describes the structure of errors in such a scenario.

|   **Name**    |              **Condition**               | **Multiplicity** | **Type** |                                                                                             **Description**                                                                                             |
|---------------|------------------------------------------|------------------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `errors`      | M                                        | 1..1             | Object   | This section can include messages to the TPP on operational issues (errors)                                                                                                                             |
| `error`       | M                                        | 1..\*            | Object   | Error object. For example, include one instance per each schema validation error                                                                                                                        |
| `source`      | O                                        | 0..1             | String   | The application that generated this error. For Open Banking Connect API, this will usually be returned as 'OBC'.                                                                                        |
| `reasonCode`  | O                                        | 0..1             | String   | The code of the error. The following codes can be expected at the moment: · `INACTIVE_ACCOUNT` · `INACTIVE_PROVIDER` · `NOT_ALLOWED` · `INTERNAL_ERROR` · `FORMAT_ERROR` · `TIMEOUT` · `PROVIDER_ERROR` |
| `description` | O                                        | 0..1             | String   | In some scenarios, includes description of the error                                                                                                                                                    |
| `recoverable` | O                                        | 0..1             | Boolean  | N/A (not included in the response)                                                                                                                                                                      |
| `details`     | O                                        | 0..\*            | String   | In some scenarios, includes additional error details                                                                                                                                                    |
| `name`        | C ( if `value` populated then mandatory) | 0..1             | String   | The name field contains the index key of the error's detail, such as "path"                                                                                                                             |
| `value`       | C (if `name` populated then mandatory)   | 0..1             | String   | The value field contains the description of the error detail accessed by name index key. For example, return as path to the element that failed the validation                                          |

### HTTP 400 reason codes {#http-400-reason-codes}

|   **Message**    |  **Reason Code**   |                                    **Description**                                     | **Developer Details** |                                                                             **Typical Occurrences**                                                                              |                 **Next Steps**                 |
|------------------|--------------------|----------------------------------------------------------------------------------------|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------|
| Inactive Account | `INACTIVE_ACCOUNT` | The source TPP (`clientId`) that has sent the message is not recognized or is invalid. | n/a                   | Typically occurs when the TPP onboarding has not completed or TPP used incorrect `clientId` value. **Note:** `clientId` is equivalent of the ConsumerKey Id in Mastercard portal | Contact Open Banking Connect API support team. |

**Error example code**

```json
{
    "Errors": {
        "Error": [
            {
            "Source": "OBC",
            "ReasonCode": "INACTIVE_ACCOUNT"
            }
        ]
    }
}
```

|    **Message**    |   **Reason Code**   |                          **Description**                           | **Developer Details** |                          **Typical Occurrences**                          |                                                                                                                                              **Next Steps**                                                                                                                                              |
|-------------------|---------------------|--------------------------------------------------------------------|-----------------------|---------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Inactive Provider | `INACTIVE_PROVIDER` | The destination ASPSP (`aspspId`) is not recognized or is invalid. | n/a                   | Typically occurs when `aspspId` value is incorrect or ASPSP was disabled. | Check that the value used for `aspspId` in the request is valid as per the list of ASPSPs returned by Open Banking Connect API (for example, in /payments/aspsps or /accounts/aspsps). If you think you should be able to access the specified ASPSP, contact the Open Banking Connect API support team. |

**Error example code**

```json
{
    "Errors": {
        "Error": [
            {
            "Source": "OBC",
            "ReasonCode": "INACTIVE_PROVIDER"
            }
        ]
    }
}
```

|                      **Message**                       | **Reason Code** |                                                                                                                 **Description**                                                                                                                  |                   **Developer Details**                   |                 **Typical Occurrences**                 |                                                                                                                                             **Next Steps**                                                                                                                                             |
|--------------------------------------------------------|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------|---------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| "You are not allowed to perform request to this ASPSP" | `NOT_ALLOWED`   | TPP is not allowed to submit requests to this ASPSP. The availability of an ASPSP for a TPP is recorded in Open Banking Connect based on TPP registration Data. Only available ASPSPs are returned to the TPP from the Open Banking Connect API. | Return as path to the element that failed the validation. | Typically happens when TPP does not register correctly. | Check that the value used for aspspId in the request is valid as per the list of ASPSPs returned by Open Banking Connect API (for example, in /payments/aspsps or /accounts/aspsps). If you think you should be able to access the specified ASPSP, contact the Open Banking Connect API support team. |

**Error example code**

```json
{
    "Errors": {
        "Error": [
            {
            "Source": "OBC",
            "ReasonCode": "NOT_ALLOWED",
            "Description": "You are not allowed to perform this request to this ASPSP"
            }
        ]
    }
}
```

|                   **Message**                    | **Reason Code** |                                                                                                                           **Description**                                                                                                                            | **Developer Details** |                             **Typical Occurrences**                              |                                                                                                                                 **Next Steps**                                                                                                                                 |
|--------------------------------------------------|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| "Method not supported by Provider's API profile" | `NOT_FOUND`     | Method not supported by ASPSP. Depending on the API Standard /Profile implemented at the side of the ASPSP, some of the endpoints may not be available for that ASPSP. The information about API Profile support is provided in the specification for each endpoint. | n/a                   | Typically happens with new customers who send data not part of the API Standard. | Verify the specification and ensure that the endpoint the ASPSP supports the API Profile returned (for example, in /payments/aspsps or /accounts/aspsps). If you think you should be able to access the specified endpoint, contact the Open Banking Connect API support team. |

**Error example code**

```json
{
    "Errors": {
        "Error": [
            {
            "ReasonCode": "NOT_FOUND",
            "Description": "Method not supported by Provider's API profile"
            }
        ]
    }
}
```

|              **Message**               | **Reason Code**  |                           **Description**                            | **Developer Details** |                                  **Typical Occurrences**                                   |                 **Next Steps**                 |
|----------------------------------------|------------------|----------------------------------------------------------------------|-----------------------|--------------------------------------------------------------------------------------------|------------------------------------------------|
| "Unable to process request this time." | `PROVIDER_ERROR` | There was an error returned from the ASPSP or connectivity partners. | n/a                   | This typically occurs due to incorrect parameters sent to connectivity partners or ASPSPs. | Contact Open Banking Connect API support team. |

**Error example code**

```json
{
    "Errors": {
        "Error": [
            {
            "ReasonCode": "PROVIDER_ERROR",
            "Description": "Unable to process request this time"
            }
        ]
    }
}
```

|            **Message**             | **Reason Code**  |               **Description**               | **Developer Details** |                         **Typical Occurrences**                          |                     **Next Steps**                     |
|------------------------------------|------------------|---------------------------------------------|-----------------------|--------------------------------------------------------------------------|--------------------------------------------------------|
| "An issue happened on ASPSP side." | `PROVIDER_ERROR` | There was an error returned from the ASPSP. | n/a                   | This typically occurs when ASPSP responds with an Internal Server error. | Retry sending the same request after a period of time. |

**Error example code**

```json
{
  "Errors": {
     "Error": [
       {
          "ReasonCode": "PROVIDER_ERROR",
          "Description": "An issue happened on ASPSP side",
          "Recoverable": "true"
       }
  ]
           }
}
```

|                   **Message**                    | **Reason Code** |                **Description**                 | **Developer Details** |                        **Typical Occurrences**                         |                                                                      **Next Steps**                                                                       |
|--------------------------------------------------|-----------------|------------------------------------------------|-----------------------|------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
| "This feature is unavailable for this Provider." | `NOT_ALLOWED`   | This feature is unavailable for this Provider. | n/a                   | Typically occurs when a feature is not available for a given provider. | Verify the specifications and ensure that the endpoint and feature is supported by the API Profile returned for the ASPSP. Correct the request if needed. |

**Error example code**

```json
{
  "Errors": {
    "Error": [
      {
        "ReasonCode": "NOT_ALLOWED",
        "Description": "This feature is unavailable for this Provider.",
        "Details": "path[0]=/payments/schedule"
      }
    ]
  }
}
```

|    **Message**    | **Reason Code** |                                  **Description**                                   |                    **Developer Details**                     |                      **Typical Occurrences**                       |                     **Next Steps**                     |
|-------------------|-----------------|------------------------------------------------------------------------------------|--------------------------------------------------------------|--------------------------------------------------------------------|--------------------------------------------------------|
| "Duplicate field" | `FORMAT_ERROR`  | If an object contains two fields with the same name, the request fails validation. | "path\[i\]=(path to the element that failed the validation); | Occurs when an object contains 2 or more fields with similar name. | Make sure all objects do not contain duplicate fields. |

**Error example code**

```json
{
  "Errors": {
    "Error": [
      {
        "Source": "OBC",
        "ReasonCode": "FORMAT_ERROR",
        "Description": "Duplicate field",
        "Details": "path[0]=iban"
      }
    ]
  }
}
```

|         **Message**         | **Reason Code**  |      **Description**       | **Developer Details** |                              **Typical Occurrences**                               |                 **Next Steps**                 |
|-----------------------------|------------------|----------------------------|-----------------------|------------------------------------------------------------------------------------|------------------------------------------------|
| "ASPSP rate limit exceeded" | `PROVIDER_ERROR` | ASPSP rate limit exceeded. | N/A                   | Typically occurs when ASPSP limit of requests per hour, per licence, was exceeded. | Please try submitting the request again later. |

**Error example code**

```json
{
  "Errors": {
  "Error": [
    {
      "ReasonCode": " PROVIDER_ERROR ",
      "Description": "ASPSP rate limit exceeded."
    }
  ]
}
}
```

### HTTP 500 reason codes {#http-500-reason-codes}

|              **Message**               | **Reason Code**  |               **Description**                | **Developer Details** |                                                                                                                                     **Typical Occurrences**                                                                                                                                      |                 **Next Steps**                 |
|----------------------------------------|------------------|----------------------------------------------|-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------|
| "Unable to process request this time." | `INTERNAL_ERROR` | This is returned when HTTP Status Code = 500 | n/a                   | Not a typical error. If an unexpected internal error happens, it means additional investigation may be required to identify the issue. 500 error responses for domestic or SEPA payment requests will have a flag, recoverable = true, thus offering the possibility to resubmit those requests. | Contact Open Banking Connect API support team. |

**Error example code**

```json
{
  "Errors": {
    "Error": [
      {
        "Source": "OBC",
        "ReasonCode": "INTERNAL_ERROR",
        "Description": "Unable to process request this time"
 }
    ]
  }
}
```

|              **Message**               | **Reason Code** |               **Description**                | **Developer Details** |                                                                                                                                        **Typical Occurrences**                                                                                                                                        |                           **Next Steps**                            |
|----------------------------------------|-----------------|----------------------------------------------|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------|
| "Unable to process request this time." | `TIMEOUT`       | This is returned when HTTP Status Code = 500 | n/a                   | This usually occurs when server, while acting as a gateway or proxy, did not receive a timely response from the upstream server, such as the connectivity partner or the ASPSP. Exceptions: \[health\] and \[aspsps\] endpoints will not raise this error because they do not use an upstream server. | Re-try sending the same request after a recommended period of time. |

**Error example code**

```json
{
    "Errors": {
        "Error": [
            {
            "Source": "OBC",
            "ReasonCode": "TIMEOUT",
            "Recoverable": true
            }
        ]
    }
}
```

Note: Refer to the corresponding endpoint section for endpoint specific error codes.
