A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hey Shopify,
Another issue again from me relating to your Checkout API using REST. This time relating to duties!
When a retailer charges duties for any of their items in the Checkout, the amount is not expose to us when calling the REST API.
Shopify's API documentation does show that this field should get expose, but only being shown in examples:
https://shopify.dev/api/admin-rest/2022-10/resources/checkout#get-checkouts-token
(search for `total_duties`).
We only know duties exist implicitly because there is a price discrepancy. i.e.
total_price != total_line_items_price + total_tax + shipping_rate.price - applied_discount.discount
We have to calculate the amount ourselves, which is trivial, until you add the complexity that `total_line_items_price` might include the `total_tax` amount within its total. Even being informed by the `
{
"total_price": "6991.09",
"total_tax": "0.00",
"total_line_items_price": "6400.00",
"shipping_rate": {
"id": "shopify-Standard%20International-50.00",
"price": "50.00",
"title": "Standard International"
},
"applied_discount": null,
}
6991.09 - 6400.00 - 50.00 = 541.09
So total_duties = 541.09. Funnily enough, if you use your web checkout, that exact amount is being reported as the amount of duties to pay!
Can we have the `total_duties` amount exposed to us on all checkouts, whether any duties exist or not, please?