Frequently asked questions

Table of contents
  1. What’s my API rate limit?
  2. When should I refresh the tax amount on my checkout page?
  3. How should I handle errors?

What’s my API rate limit?

The default rate limit for each API key is 10 requests per second. If this rate limit is exceeded, the API will return HTTP 429: Too Many Requests. If you need to increase this limit, please email support@anrok.com.

When should I refresh the tax amount on my checkout page?

It’s common to show a preview of the tax amount on a checkout page before the customer completes their order. This tax amount can be estimated using the Anrok’s createEphemeral endpoint and should be refreshed any time the customer changes something that might impact the calculation.

Here are some common actions that should trigger a tax calculation:

  • The customer modifies the products in their cart.
  • The customer applies a discount/coupon code.
  • The customer updates their address.
  • The customer provides a tax ID or exemption certificate.

How should I handle errors?

There are various errors that can be returned by the Anrok API. These might be related to network problems, external services, or invalid requests. Below is a list of the most common errors you may receive and the recommended resolution for each.

Error Description Resolution
accountingTimeZoneNotSetForSeller No accounting timezone has been set for your Anrok account. Navigate to your Anrok settings and select an accounting timezone.
accountingTimeZoneNotSupported The provided accounting timezone is not supported by Anrok. Navigate to your Anrok settings to view the list of supported timezones.
certificateIdNotFound An exemption certificate matching certificateId cannot be found in Anrok. Correct the certificate ID and retry the request.
currencyCodeNotSupported The provided currency code for the transaction is not currently supported by Anrok. Retry the transaction with a supported currency code.
customerAddressCouldNotResolve The customerAddress provided for the transaction does not have enough information to determine a tax jurisdiction or the information is invalid. Collect additional address information or correct the existing information, then retry the request.
customerIdNotFound The provided customerId does not exist in Anrok. Retry the request with a customer ID that exists in Anrok or provide customerName so a customer can be created.
duplicateJurisIds Duplicate juris IDs were provided in the request when creating an exemption certificate. Remove the duplicate jurisId and retry the request.
externalServiceError An external service used by Anrok is experiencing technical difficulties. Retry the request.
productExternalIdUnknown The provided productExternalId for one or more of the transaction line items does not exist in Anrok. Add the Product ID to Anrok and select a tax configuration.
taxDateTooFarInFuture The provided accountingDate or taxDate of the transaction is too far in the future to accurately calculate tax. Anrok accepts dates up-to 31 days in the future. Adjust the date of the transaction or retry the request closer to the transaction date.
taxDateTooFarInPast The date of the transaction is too far in the past to accurately calculate sales tax. Adjust the date of the transaction and retry.
transactionFrozenForFiling The provided transaction has been added to a return and can no longer be modified. Negate the transaction and create a new transaction instead.
429: Too Many Requests The rate of requests for your API key has exceeded the rate limit. Retry the request after headers[Retry-After] seconds.