How does OCU's checkout work with Shopify's API?

The first thing to understand is that the OneClickUpsell app's checkout uses Shopify API calls to accomplish several tasks including calculating taxes and shipping costs at checkout. 

Depending on your Shopify plan, you have API limits set for your store. I.e. there's a defined maximum number of calls we can make. 

Basic Shopify, Shopify and Advanced Shopify plans all have a regular API calls limitthat is described here in Shopify's article: Shopify Plus stores allow for twice the API calls compared to all other plans.

What happens if my OCU checkout exceeds my Shopify plan's API call limit?

If you exceed the Shopify API limit for your plan, due to too many simultaneous checkout attempts on the OCU checkout on your store, OCU will automatically direct checkouts to Shopify checkout until the checkout volume and API calls are back within your plan's API limits. OCU is designed this way and does this automatically to ensure that there will be no checkout interruption on your store, even if your Shopify plan's API limit is reached.

API Calls? Tell me more!

Interested in the technically nitty gritty? We admire your spirit!

There is no exact number of API requests made per OCU checkout, as the number of requests depend on things like taxes and shipping calculations required. Generally, it can be anywhere from 1 - 7 API calls per checkout on your store.

The regular API call limit operates using a "leaky bucket" algorithm as a controller. This allows for infrequent bursts of calls, and allows your app to continue to make an unlimited amount of calls over time. The bucket size is 40 calls (which cannot be exceeded at any given time), with a "leak rate" of 2 calls per second that continually empties the bucket. So for example, if your app averages 2 calls per second, it will never trip a 429 error ("bucket overflow") and will not exceed the limit. 

*Note: The bucket size and leak rate are doubled for Shopify Plus stores. So Plus stores have a higher API limit and therefore can process basically double the amount of API calls simultaneously compared to non-Plus stores.

Did this answer your question?