Checkout API - Polling / throttling

Highlighted
Shopify Partner
46 0 11

Hi,

 

The documentation (https://help.shopify.com/en/api/guides/sell-through-the-checkout-api#polling) states that apps using the Checkout API should handle 202 and 303 messages properly.

 

How can app developers test their implementation of this polling mechanism?

We have tried to simulate this situation by creating multiple checkouts in parallel, but we were not successful in getting 202 or 303 messages, we received only 201 and 429 messages.

 

Can Shopify provide us with one or more of the following?:

- a procedure to reliably provoke the checkout api to respond with 202 / 303 messages

- a clear description of the exact header received in the case of 202 / 303 (the issue https://community.shopify.com/c/Shopify-APIs-SDKs/Polling-Queue-When-Creating-Checkout/m-p/523353#M3... seems to indicate that there is a discrepancy between what is documented and what is actually received in the header, at least in some cases)

- a test endpoint for 202 and a test endpoint for 303 that help to simulate this

 

As it stands we are unable to implement and test what we consider an absolutely critical aspect of the use of the Checkout API. 

 

Looking forward to your assistance on this.

 

Regards,

Bart 

 

Bart Coppens | Limoni Apps | Building apps for Shopify since 2016
0 Likes
Shopify Partner
46 0 11

Does anyone have experience with testing this scenario?

Shopify staff: any suggestions?

Bart Coppens | Limoni Apps | Building apps for Shopify since 2016
0 Likes
Shopify Staff
Shopify Staff
1460 66 218

Hey Bart.

 

Let me expand a bit on when you'll see these statuses:

 

  • 201 / 303 - When the checkouts created per-minute exceeds 5, 303s are returned rather than 201s. (Checkout creation)
  • 202 - This will occur on creation when the shop makes use of an asynchronous tax calculation service (more typical on Plus) or, more commonly, the checkout has yet to fetch shipping rates through an external service (such as our own carrier calculated shipping).

You should be able to test a 201/303 situation by surpassing 5 checkout creations in a minute from what I can tell, although you did mention that you were creating some simultaneously, so I wonder how many. A shop ID would give me more insight on that.

 

The 202 is going to be trickier and will likely require you to create a carrier service through which the rates will be requested on checkout creation.

 

I hope that helps a bit.

 

Cheers.

0 Likes