Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Slow checkout API (cart, shipping calc) responses: how to fix

PRF-064Medium impactPartlyBy FunnelGuardPublished Updated
On this page

What this issue is

When a shopper changes a quantity, enters a postcode or ZIP code, or picks a shipping option, the page sends a request to your server or to a third party. This is an API call: a background request that returns data without reloading the page. Examples are /wp-json/wc/store/v1/cart, /?wc-ajax=update_order_review, Shopify's /cart/change.js or /cart/shipping_rates.json, or a call to a carrier such as UPS or FedEx for live rates.

Why it costs you leads or sales

Checkout is where intent is highest. A frozen total, a spinner over the shipping options or a disabled Place order button makes shoppers think the site is broken. They wait a moment, then leave or click repeatedly, which can trigger duplicate requests and make things slower.

Where a slow shipping call hurts
  1. Product pageLoads fast
  2. CartItem added
  3. Shipping rates callTakes 8 s or hangs
  4. PaymentNever reached
  5. Order confirmationNo purchase

The shopper reaches checkout, but the shipping rates request stalls and the later steps are lost.

Checkout completion by shipping call timeExample numbers
Checkout completion by shipping call time (example)Under 1 s: 60 % completing checkout; 1-3 s: 52 % completing checkout; 3-6 s: 41 % completing checkout; Over 6 s: 28 % completing checkout0234660524128Under 1 s1-3 s3-6 sOver 6 s% completing checkout

Example: illustrative numbers only, showing how completion can fall as the shipping rates call gets slower.

How to check if your site has it

Time your checkout requests by hand
  1. Open DevTools

    In Chrome, press F12 and open the Network tab. Tick Preserve log and choose Fetch/XHR to hide images and scripts.

  2. Walk through checkout

    Add a product, open the cart, enter an address and change the shipping method. Use a real address in a region you ship to.

  3. Sort by Time

    Click the Time column. Any request over about 1 to 2 seconds is a candidate. Click it and read the Timing tab: a long Waiting for server response means the server is slow, not the network.

  4. Repeat with different carts

    Try a heavy cart, several shipping zones, a coupon code and a mobile connection (Network throttling set to Fast 4G).

  5. Check server logs or APM

    If you have access, look at slow query logs or application monitoring for the same endpoints to see what the server is doing.

How to fix it

The right fix depends on what the slow call is waiting for. These are the usual causes, in the order worth checking.

Common causes of slow checkout calls and what to do
CauseSignFix
Live carrier rate lookupSlow only when shipping is calculatedUse flat or table rates, cache rates, or cut the number of carriers queried
Heavy database queriesSlow Waiting time on every cart callAdd caching, remove heavy plugins, tune the database
Overloaded or small serverSlow everywhere, worse at busy timesUpgrade hosting, add object caching
Many shipping zones or rulesSlow grows with cart sizeSimplify zones and rules
Slow third-party tax or address serviceSlow only when entering addressCache results, use a faster provider, set timeouts
Speed up the slow call on your platform
  1. Find the slow plugin

    In WooCommerce, install Query Monitor on a staging copy and load checkout. It lists slow queries, slow HTTP calls and which plugin caused them.

  2. Replace live rates where possible

    Under WooCommerce > Settings > Shipping, use flat rate or free shipping thresholds for simple cases. Live carrier plugins often have a rate caching option: turn it on.

  3. Add object caching

    Ask your host for Redis or Memcached and enable it with a compatible object cache plugin. Do not full-page cache cart, checkout or account pages.

WooCommerce: cache a slow remote rate lookup for 10 minutes (example pattern)php
$key = 'rates_' . md5( $origin . '|' . $postcode . '|' . $weight );
$rates = get_transient( $key );
if ( false === $rates ) {
    $response = wp_remote_get( $api_url, array( 'timeout' => 4 ) );
    if ( ! is_wp_error( $response ) ) {
        $rates = json_decode( wp_remote_retrieve_body( $response ), true );
        set_transient( $key, $rates, 10 * MINUTE_IN_SECONDS );
    }
}

How to confirm it's fixed

Confirmation checks
  • Cart and shipping calls in the Network tab return in under about 1 to 2 seconds
  • Timing holds with a heavy cart and a coupon
  • Timing holds on a throttled mobile connection
  • Totals and shipping options update without a long spinner
  • A test order completes end to end
  • Timing stays good at your usual busy hours, not just when quiet
Checkout shipping step

Before

  • Live carrier call on every change
  • Spinner for 6 s or more
  • Shoppers leave or click repeatedly

After

  • Rates cached or simplified
  • Options appear in about a second
  • Shoppers continue to payment

How to prevent it happening again

Prevention habits
  • Retest checkout timing after installing or updating shipping, tax, discount or upsell apps
  • Keep a note of your normal cart and shipping call times to compare against
  • Set timeouts and fallback rates for any third-party call
  • Review hosting capacity before sales and campaigns
  • Monitor your checkout journey on a schedule, not only after complaints

How FunnelGuard handles this

FunnelGuard detects this issue only partly. It runs your checkout journey as a robot visitor on a schedule and tracks how long the journey takes. If the duration jumps well above its usual level, that is flagged as a duration anomaly, which can be a sign that a cart or shipping call has slowed down. A failure is re-checked from a second region before one alert goes out.

Questions people ask

Why is my checkout stuck on a spinner when I enter my address?

The page is waiting for a shipping rate or tax request to return. Open the browser Network tab, filter to Fetch/XHR and look for a request that takes several seconds or never finishes. It is usually a slow carrier lookup, a heavy plugin or an overloaded server.

Why is shipping calculation so slow at checkout?

Most often the store queries a carrier live for each change, or runs many shipping zones and rules. Database load and slow third-party apps also add time. Caching rates or using flat rates is the quickest fix.

How slow is too slow for a checkout API call?

Aim for cart and shipping calls to return in about 1 to 2 seconds or less. Anything that regularly takes 3 seconds or more is likely to make shoppers hesitate or leave. Test on mobile connections as well as desktop.

How do I measure checkout API response time?

Open DevTools, go to the Network tab, filter to Fetch/XHR and walk through checkout. Sort by Time and read the Timing tab of slow requests. A long Waiting for server response means the delay is on the server side.

Can a slow cart update cause abandoned checkouts?

Yes. If totals or shipping options lag, shoppers may think the site is broken and leave, or click repeatedly and slow it further. Because the page itself loads normally, the loss is easy to overlook.

Will page caching speed up my checkout requests?

Not for the cart and checkout themselves, which must stay uncached because they are personal to each shopper. You can cache individual rate lookups or use object caching such as Redis to speed up the underlying work.

Does FunnelGuard monitor slow checkout API calls?

Only partly. It flags when a checkout journey's total duration jumps above normal, but it does not time each cart or shipping request or name the slow one. Use the Network tab and server monitoring for the detail.

Does FunnelGuard catch this?

Partly

FunnelGuard checks part of this.

How: duration anomaly only.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.