question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Shopify Checkout Throttling and Queue

See original GitHub issue

This repository is missing two critical features required for large Shopify stores:

Checkout-level throttle Shopify limits the amount of checkouts that can be created on the Storefront API per minute. If an API client exceeds this throttle, then a 200 Throttled error response is returned. Shopify recommends designing your app to be resilient to this scenario. For example, you could implement a request queue with an exponential backoff algorithm.

/throttle/queue Shopify redirects users in the checkout flow to /throttle/queue if the store is under high traffic.

Without these features, two things will happen. The API silently fails when creating a checkout session, meaning that addToCart requests also silently fail. Also, during the checkout flow, the user will be redirected to a nonexistent URL.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
cond0rcommented, Aug 5, 2021

@ottomated just created a PR with your suggestion to create a checkout only on the fist cart interaction, not the very first visit of the store.

I started also to implement the Cart API instead of Checkout, i will make a PR with that too when is finished.

@balakedev would be nice for the community to create a PR when you have a fix or an improvement so we all can benefit from it 😃. Cart API was released last month, and is available only on the unstable version of the Storefront API (Ajax Cart API cannot be used for Headless Storefronts).

0reactions
balakedevcommented, Aug 4, 2021

@ottomated, I might be able to help you with this issue as my team has solved it. There’s only a few lines of code to change to stop useCart() initialising a cart immediately on page view and only triggering it on add to cart. Happy to collaborate here.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Checkout API Queue Throttling - Shopify Community
Im creating a program to speed up how people checkout, I know there is a tiny bit of documentation on handling the queue...
Read more >
Shopify Checkout Throttling "You're in line to check out"
Hi all, We recently had a flash sale resulting a large number of sessions (around 40000 users) and orders (around 5000) within a...
Read more >
Checkout API - Polling / throttling - Shopify Community
Hi, The documentation ( https://help.shopify.com/en/api/guides/sell-through-the-checkout-api#polling ) states that apps using the Checkout ...
Read more >
"Throttled" Error Message on CheckoutCreate mutation
Hey Guys, I manage an iOS app for a shopify store that does ... once) and because of this the checkout queue sometimes...
Read more >
Queue Storefront API For checking out - Shopify Community
We're getting a doc change pushed into the documentation as I write. To mitigate the throttling on Checkout (and negate the need for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found