Customers might be charged additional duties when they receive international shipments. If a customer requests a refund on an international order, then you can refund duties that were previously applied to the order. This guide shows you how to preview and refund duties with the GraphQL Admin API. ## Requirements - Your app can make [authenticated requests](/docs/api/admin-graphql#authentication) to the GraphQL Admin API. - Your app has the `write_orders` [access scope](/docs/api/usage/access-scopes). Learn how to [configure your access scopes using Shopify CLI](/docs/apps/build/cli-for-apps/app-configuration). - You have a [development store](/docs/api/development-stores) with the [Shopify Markets developer preview](/docs/api/release-notes/developer-previews#shopify-markets-developer-preview) enabled so that you can manage duties. - You've met Shopify's [protected customer data requirements](/docs/apps/launch/protected-customer-data). ## Step 1: Create an order with a duty charge To preview and refund duties, you first need to create an international order with duties applied. You can create an international order with duties applied by using a development store that has the Shopify Markets developer preview enabled. 1. Set a [Harmonized System Code](https://help.shopify.com/manual/markets/duties-and-import-taxes/charging-duties#hs-codes) on all products that you expect to have duties applied. 2. Make sure that your store has [shipping rates](https://help.shopify.com/manual/shipping/understanding-shipping/shipping-rates) set for all the countries that you plan to support. 3. Make sure that your development store is set up to [place test orders](https://help.shopify.com/partners/dashboard/managing-stores/test-orders-in-dev-stores). 4. Complete a checkout from your storefront. For the shipping information checkout step, you need to enter a different country than the location where your product is fulfilled. If duties apply to your order, then they're displayed on the shipping rates view and order summary. > Note: > Duties might not be applied if the price of the order doesn't exceed the destination country’s _[de minimis](https://help.shopify.com/manual/markets/duties-and-import-taxes#de-minimis)_ threshold. 5. On the order details page of your Shopify admin, verify that duties have been charged on the order. Duties are calculated for each line item, and can be viewed in the [`duties` field on the `LineItem`](/docs/api/admin-graphql/latest/objects/lineitem#field-lineitem-duties) object in the GraphQL Admin API. ## Step 2: Retrieve duties on an order When you query an order, you can retrieve the total duties that are applied using the [`currentTotalDutiesSet`](/docs/api/admin-graphql/latest/objects/Order#field-order-currenttotaldutiesset) field. If you want to retrieve the duties applied to each line item, then you can include the [`duties` field on the `LineItem`](/docs/api/admin-graphql/latest/objects/LineItem#field-lineitem-duties) field on the `lineItems` connection. > Tip: > You can retrieve an order's ID with the [`orders`](/docs/api/admin-graphql/latest/queries/orders) query.