# Code and Formats
source: https://developer.mastercard.com/bces-service/documentation/code-and-formats/index.md

## HTTP Status Codes {#http-status-codes}

| **HTTP Status Code** |  **Description**   |
|----------------------|--------------------|
| 200                  | OK                 |
| 400                  | BAD REQUEST        |
| 401                  | UNAUTHORIZED       |
| 403                  | FORBIDDEN          |
| 404                  | RESOURCE NOT FOUND |
| 405                  | METHOD NOT ALLOWED |

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

Mastercard returns errors in the following structure.

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

### Error Codes {#error-codes}

Error codes specific to Benefits Content Eligibility API are listed below.

| **Error or Reason Code** |                                              **Description**                                              |                        **How to Resolve**                        |
|--------------------------|-----------------------------------------------------------------------------------------------------------|------------------------------------------------------------------|
| BENEFITINFO_VAL_001      | Validation Error -- BIN Number should be numeric.                                                         | Provide a valid numeric BIN number                               |
| BENEFITINFO_VAL_002      | Validation Error -- Card number or Bin number must be 6, 12 or 19 digits.                                 | Provide Card or Bin number with 6, 12, or 19 digits              |
| BENEFITINFO_VAL_003      | No products found for bin or card number.                                                                 | Try a different bin or card number                               |
| BENEFITINFO_VAL_004      | Validation Error -- Card number or Bin number is required.                                                | Enter a Card number or BIN number                                |
| BENEFITINFO_VAL_005      | Products found, Selection Required.                                                                       | Multiple products have been found, product selection is required |
| BENEFITINFO_VAL_007      | In order to best service your account. Please allow me to transfer you to your bank for more information. | User must be transferred to their bank                           |
| BENEFITINFO_VAL_008      | In order to best service your account. Please allow me to transfer you to your bank for more information. | User must be transferred to their bank                           |
| BENEFITINFO_VAL_010      | Validation Error - Bin is invalid.                                                                        | Enter a valid BIN                                                |
| BENEFITINFO_VAL_011      | Validation Error -- Benefit Date is invalid.                                                              | Enter a valid Benefit Date                                       |
| BENEFITINFO_VAL_012      | Validation Error -- Source System Code is required.                                                       | Enter a valid Source System Code                                 |
| BENEFITINFO_VAL_014      | Validation Error -- Product Code is invalid.                                                              | Enter a valid Product Code                                       |
| BENEFITINFO_VAL_015      | Validation Error -- Product Group Code is invalid.                                                        | Enter a valid Product Group Code                                 |
| BENEFITINFO_VAL_016      | Validation Error -- Service Provider Code is invalid.                                                     | Enter a valid Service Provider Code                              |
| BENEFITINFO_VAL_023      | Please provide complete card number.                                                                      | Enter a complete card number                                     |

### No Benefits Found {#no-benefits-found}

If there are no benefits found that meet the request criteria the HTTP Status code will be **200 OK** and the return body will have the following structure:

```json
{
  "data": []
}
```

## 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 errors, on [Gateway Error Codes](https://developer.mastercard.com/platform/documentation/security-and-authentication/gateway-error-codes/).
