After your application detects a timeout or an error, it must next make a decision whether to retry the transaction immediately or wait before retrying.
Set your timeout setting appropriately. Run a single line item request and record the response time. Add 2 to 3 seconds to the response time to get a recommended client-side Timeout Setting value. Scale the timeout setting value accordingly for transactions containing multiple line items.
Retry your transaction a few times if timeouts are still being returned:
It’s important that you don’t retry so often that your attempts are mistaken as a denial-of-service attack. Limit your retries to 5 to 10 attempts to prevent a backlog of concurrent requests and allow system time to recover.
Things to consider when retrying a transaction:
doc
), such as a GUID, in your CalcTaxes
requestdoc
) to a new unique value if a timeout or other error is detected againIf you are using embedded geolocation (geo
= true
in a location object) as part of your CalcTaxes
request and AFC Geo is not responding, the entire transaction fails. To resolve, turn embedded geolocation off (geo
= false
) and retry the transaction. The AFC Tax Engine determines the taxing jurisdiction based on the address information provided.
For more information, see Geocode Offline.
We recommend not using the embedded geolocation functionality on a regular basis since it impacts performance and can cause the CalcTaxes
request to fail if AFC Geo is experiencing issues.