Hey Shopify,
Similar to the previous issue I reported - https://community.shopify.com/c/shopify-apis-and-sdks/checkout-rest-api-does-not-expose-the-total-duties-key-in-its/td-p/1785455 - we have also spotted another bug in your Checkout Admin REST API.
Prerequisites- A Shopify retailer that has configured Duties in their admin
- A Shopify retailer that has set a specific region to incur duties
- An item that is expensive enough to incur a duty tax.
Issue
When you make a PUT request to your Checkout API, after adding in line items (expensive item that is know to incur duty costs), shipping/billing address etc, with the shipping line you want to deliver the request items to, the returned response given is a 200 OK and no duties are exposed to total_duties (field is actually missing) and the total_price or payment_due fields don’t currently include the duty costs.
When you make another GET request for the specific Checkout some short time later (maybe only 1 second later), then the duties have been implicitly returned and are now included in the total_price and payment_due totals.
It is clear that Shopify is doing some internal processing in the BE, but is not making this visible to the client making the API request.
It appears that you are not consistently following the JSON API spec and returning a 202 ACCEPTED response back. This is inconsistent when we call other endpoints (e.g. shipping_rates.json) which will return 202 closely after PUTing the shipping address.
Solution
Could we fix this minor bug, please, and start returning a 202 ACCEPTED response until all costs have been processed and are now final.
Example for Debugging- Shopify domain: paul-denning-store.myshopify.com
- Product ID: 7889660379299
- Variant ID: 43020566659235
- Shipping/Billing Address - Any US address
- Shipping handle - shopify-Standard-15.00
Running a test checkout flow up to the point of setting the shipping line, the X-Request-ID for the PUT requests is:
- X-Request-ID - 072f0dea-526e-466c-b077-50c6beaa1f6e
Please let us know if you have any follow up questions or have any solutions to this issue, thanks.