# Codes and Formats
source: https://developer.mastercard.com/transaction-notifications/documentation/codes-and-formats/index.md

## Error Codes {#error-codes}

### Error Structure {#error-structure}

The Transaction Notifications API follows the following structure when returning an error:

```json
{
  "Errors": {
    "Error": [
      {
        "Source": "<source>",
        "ReasonCode": "<unique code>",
        "Description": "<short description of the error>",
        "Recoverable": true/false,
        "Details": "<Optional detailed description of the issue>"
      }
    ]
  }
}
```

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

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

You can find a list of the errors returned by our gateway, as well as resolutions to each, on the following page [Gateway Error Codes](https://developer.mastercard.com/platform/documentation/security-and-authentication/gateway-error-codes/).

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

| Response Code |    Reason Code     | Response Description                              | Resolution Tips                                                            |
|:--------------|:------------------:|:--------------------------------------------------|:---------------------------------------------------------------------------|
| 400           |  **invalid.data**  | Invalid data format for parameter/s               | Validate request parameters and ensure proper data formats before retrying |
| 400           |  **bad.request**   | Request is missing required fields                | Check required fields and ensure none is missing before retrying           |
| 403           | **card.not.found** | Card Reference passed in the request is not valid | Ensure Card Reference passed is valid before retrying                      |

