> For the complete documentation index, see [llms.txt](https://learn.layerswap.io/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.layerswap.io/api/mixed-integration/swap-link.md).

# Swap Link

You can programmatically generate a swap from your backend and then display the Layerswap UI to your users for transaction completion. This allows them to finalize the swap while benefiting from the Layerswap UX.\
\
To achive this:

1. [Create a swap ](/api/api-integration/deprecated-v1-api-reference/create-swap.md)using the Layerswap API.
2. Retrieve the `swap_id` from the response.
3. Construct a link to the transaction using the following format: `https://www.layerswap.io/app/swap/{SWAP_ID_FROM_PREVIOUS_STEP}`
4. Either redirect the user to the [Layerswap hosted page](/api/ui-integration/layerswap-hosted-page.md) or set the URL in your [embedded form](/api/ui-integration/embedded-form.md).
