# HTTP Response Codes
source: https://developer.mastercard.com/cross-border-services/documentation/response-error-codes/http-response-codes/index.md

Resource requests use HTTP response codes to provide a coarse grain indication of the result of each request. The most common expected response codes for the supported HTTP methods are as follows:

| Request Method |                                                                                                                 Common Response Codes                                                                                                                 |
|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| POST           | * 200 (OK) = Request completed successfully * 400 (BAD REQUEST) = General errors with request message * 402 (REQUEST FAILED) = Transfer declined * 409 (CONFLICT) = Errors with transaction reference ID * 500 (INTERNAL SERVER ERROR) = System error |
| GET            | * 200 (OK) = Request completed successfully * 400 (BAD REQUEST) = General errors with request message * 404 (NOT FOUND) = Supplied ID not found or invalid                                                                                            |

The following table includes more response codes that may be returned for requests. In the event of network or infrastructure issues, other response codes may be returned by the infrastructure.

|     HTTP Response Codes     |                                                                                                                                                                                  Description                                                                                                                                                                                  |
|-----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 200 (OK)                    | The request was completed successfully.                                                                                                                                                                                                                                                                                                                                       |
| 400 (BAD REQUEST)           | General error when the request could not be fulfilled due to errors such as validation errors or missing required data.                                                                                                                                                                                                                                                       |
| 401 (UNAUTHORIZED)          | Missing or invalid authentication token.                                                                                                                                                                                                                                                                                                                                      |
| 402 (REQUEST FAILED)        | The transaction was declined. Parameters were valid but the request failed.                                                                                                                                                                                                                                                                                                   |
| 403 (FORBIDDEN)             | The user is not authorized to perform the operation or the resource is unavailable for some reason, such as time constraints.                                                                                                                                                                                                                                                 |
| 404 (NOT FOUND)             | The requested resource is not found.                                                                                                                                                                                                                                                                                                                                          |
| 405 (METHOD NOT ALLOWED)    | The requested URL exists, but the requested HTTP method is not applicable.                                                                                                                                                                                                                                                                                                    |
| 409 (CONFLICT)              | A resource conflict would be caused by fulfilling the request, for example trying to create a duplicate transfer request using the same transaction reference ID as a previous transfer request.                                                                                                                                                                              |
| 429 (TOO MANY REQUESTS)     | The user has sent too many requests in a given amount of time ('rate limiting'). The response will include a Retry-After header indicating how long to wait before making a new request. This is a courtesy response. When the service is receiving a very large number of requests from a single party, the system may drop connections to minimize resource monopolization. |
| 500 (INTERNAL SERVER ERROR) | The Mastercard Cross-Border Service API server encountered an unexpected condition which prevented it from fulfilling the request. Requests resulting in a 500 response code will generally include the Send API Errors structure in the response.                                                                                                                            |
| 5XX (SERVER ERROR)          | Errors that occur in the network infrastructure between the client and Mastercard Cross-Border Service API server will typically result in a response code in the 500 range. These errors will never contain the Send API Errors structure in the response.                                                                                                                   |

For additional details on the HTTP errors returned by the gateway and possible resolutions, see [here](https://developer.mastercard.com/platform/documentation/gateway-error-codes).
