> For the complete documentation index, see [llms.txt](https://docs.getpurpledot.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getpurpledot.com/integrations/tax-duties-and-shipping/swap.md). Agents can also search and read this documentation through its [MCP server](https://docs.getpurpledot.com/~gitbook/mcp).

# Connect Swap

Connect Swap and choose the tax zones that use it in the Purple Dot checkout.

Background: [How tax, duties, and shipping integrations work](https://docs.getpurpledot.com/integrations/tax-duties-and-shipping/how-tax-duties-and-shipping-integrations-work.md).

## Before you start

* You use the [Purple Dot checkout](https://docs.getpurpledot.com/understanding-purple-dot/glossary.md#purple-dot-checkout).
* You have an API key from Swap. [Swap's instructions](https://docs.api-swap-os.com/products/global/authentication/#getting-an-api-key) explain how to get one.
* If you want to charge duties, all the relevant products have correct HS codes saved in Shopify.
* Swap calculates tax and duties in the Purple Dot checkout on any platform. Recording the sale with Swap after release is supported for Shopify stores.

## Steps

### Connect to Swap

1. In the Merchant Portal, go to **Settings** > **Integrations**.
2. Under **Tax**, select **Connect** for **Swap**.
3. Paste your API key into **Global API Key**.

   <figure><img src="https://2758444809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM5A7csYKEplvsuQqHenE%2Fuploads%2Fgit-blob-3981438a665e69990872479ffb829c36eb2644d6%2Fhow-to-use-swap-global-with-purple-dot-1.png?alt=media" alt="Swap connection form with Global API Key"><figcaption></figcaption></figure>
4. Optional: select **Test Connection** to check that the API key works.
5. Save the integration.

### Configure tax zones

List all the markets where you want the Purple Dot checkout to charge taxes, duties, or both.

1. In the Merchant Portal, go to **Settings** > **Taxes**.
2. Add a tax zone for every region where you need to charge tax, and choose which connected tax integration each tax zone uses.
3. To charge tax or duties on domestic pre-order sales, add a tax zone that uses one of the other tax engines Purple Dot supports. See [Swap settings and data](https://docs.getpurpledot.com/integrations/tax-duties-and-shipping/swap/settings-and-data.md#limits) for domestic pricing-zone limits.

For a store using Swap for UK destinations and another tax provider for New York, create a UK tax zone with Swap and a New York tax zone with the other provider.

<figure><img src="https://2758444809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM5A7csYKEplvsuQqHenE%2Fuploads%2Fgit-blob-22c57ea71042f42fd5f02d606c7afbbc139b5724%2Fhow-to-use-swap-global-with-purple-dot-2.png?alt=media" alt="Swap and Purple Dot tax zones for the UK and New York"><figcaption></figcaption></figure>

## Verify

Place a test pre-order through the Purple Dot checkout with an address in a tax zone that uses Swap, and check that taxes, duties, and shipping are calculated. See [Test your setup](https://docs.getpurpledot.com/set-up-and-launch/test-your-setup.md).

## Troubleshooting

* [My integration is not syncing](https://docs.getpurpledot.com/troubleshooting/orders-and-inventory/integration-is-not-syncing.md)
* [Get more help](https://docs.getpurpledot.com/troubleshooting/get-more-help.md)

## Related

* **Concept:** [How tax, duties, and shipping integrations work](https://docs.getpurpledot.com/integrations/tax-duties-and-shipping/how-tax-duties-and-shipping-integrations-work.md)
* **Look up:** [Settings and data](https://docs.getpurpledot.com/integrations/tax-duties-and-shipping/swap/settings-and-data.md)
* **Fix it:** [The taxes are wrong at checkout](https://docs.getpurpledot.com/troubleshooting/storefront-and-checkout/taxes-are-wrong-at-checkout.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.getpurpledot.com/integrations/tax-duties-and-shipping/swap.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
