# Timeouts
source: https://developer.mastercard.com/cross-border-services/documentation/response-error-codes/timeouts/index.md

As a consumer of our API(s), we recommend that you set your time out to be at least "40" seconds.

The following are suggested actions for timeouts:

## Quote API Recommendations {#quote-api-recommendations}

Re-submit the Quote request with same Transaction Reference.   

The following table lists the possible responses and the action required:  

|                                                                                                      Response                                                                                                       |                                                                                                                                                 Action                                                                                                                                                 |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| A successful Quote                                                                                                                                                                                                  | No further action required                                                                                                                                                                                                                                                                             |
| Responses indicating a connectivity issue, such as: * Another timeout (no response received within 40 seconds) * A gateway HTTP 500 error with a source value of "Gateway" or "Service" * A "System Error" (150001) | Retry the same transaction (including the same transaction reference number) with a back-off algorithm or retry every 10 minutes up to 30 minutes until a response is received. If no response after 30 minutes, please reach out to the [API Support team](https://developer.mastercard.com/support). |

The following diagram reflects the sequence.
![](https://static.developer.mastercard.com/content/cross-border-services/documentation/images/Bpractices_scenarioone_updated.PNG)

## Payment API Recommendations {#payment-api-recommendations}

Call the Retrieve Payment API to verify the status of the Payment.  

The following table lists the possible responses and the action required:  

|                                                                                                                                                              Response                                                                                                                                                              |                                                                                                                                                 Action                                                                                                                                                 |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| A "Record Not Found" (110507) error. **Note:** In very rare instances, "Record not found" (110507) may be returned via the Retrieve call even if the transaction has reached the Cross-Border application. In such scenarios, a "duplicate"(082000) error will be returned via the Payment call if the transaction is resubmitted. | You may resubmit the same payment transaction (including the same transaction reference number).                                                                                                                                                                                                       |
| A successful response                                                                                                                                                                                                                                                                                                              | No further action required. The payment was processed, and the Retrieve API replies with the current status.                                                                                                                                                                                           |
| Responses indicating a connectivity issue, such as: * Another timeout (no response received within 40 seconds) * A gateway HTTP 500 error with a source value of "Gateway" or "Service" * A "System Error" (150001)                                                                                                                | Retry the same transaction (including the same transaction reference number) with a back-off algorithm or retry every 10 minutes up to 30 minutes until a response is received. If no response after 30 minutes, please reach out to the [API Support team](https://developer.mastercard.com/support). |

The following diagram reflects the sequence.
![](https://static.developer.mastercard.com/content/cross-border-services/documentation/images/Bpractices_scenariotwo.PNG)

## Quote Confirmation API Recommendations {#quote-confirmation-api-recommendations}

Re-submit the Quote Confirmation request with same Transaction Reference.  

The following table lists the possible responses and the action required:

|                                                                                                  Response                                                                                                   |                                                                                                                                               Action                                                                                                                                                |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| A successful Quote Confirmation                                                                                                                                                                             | No further action required                                                                                                                                                                                                                                                                          |
| Responses indicating a connectivity issue, such as: * Another timeout (no response received within 40 seconds) * A gateway HTTP 500 error with a source value of "Gateway" or "Service") * A "System Error" | Retry the same transaction (including the same transaction reference number) with a back-off algorithm or retry every 2 minutes up to 6 minutes until a response is received. If no response after 6 minutes, please reach out to the [API Support team](https://developer.mastercard.com/support). |

The following diagram reflects the sequence.
![](https://static.developer.mastercard.com/content/cross-border-services/documentation/images/Quote_confirmation.png)

## Cancel Confirmed Quote API Recommendations {#cancel-confirmed-quote-api-recommendations}

Re-submit the Quote confirmation request with same Transaction Reference.  

The following table lists the possible responses and the action required:

|                                                                                                  Response                                                                                                   |                                                                                                                                               Action                                                                                                                                                |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| A successful Quote Cancellation                                                                                                                                                                             | No further action required                                                                                                                                                                                                                                                                          |
| Responses indicating a connectivity issue, such as: * Another timeout (no response received within 40 seconds) * A gateway HTTP 500 error with a source value of "Gateway" or "Service") * A "System Error" | Retry the same transaction (including the same transaction reference number) with a back-off algorithm or retry every 2 minutes up to 6 minutes until a response is received. If no response after 6 minutes, please reach out to the [API Support team](https://developer.mastercard.com/support). |

The following diagram reflects the sequence.
![](https://static.developer.mastercard.com/content/cross-border-services/documentation/images/Quote_cancellation.png)
