> For the complete documentation index, see [llms.txt](https://docs.xaman.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xaman.dev/concepts/payloads-sign-requests/payload-return-url.md).

# Payload Return URL

After a user signs a payload, a user can return to a URL (your website / app).

The Return URL (`return_url)` determines where the user is sent when the payload is signed. If none is given, the user will simply be displayed `Close` button in Xumm. Otherwise, the user will be presented a button which launches the Return URL.

{% hint style="warning" %}
**Warning!** iOS and Android **do not allow** the user to return to the browser tab they came from (if your flow starts in a browser). Make sure you restore state based on the payload / session / custom identifier or custom metadata assigned to the payload.
{% endhint %}

{% hint style="info" %}
When a payload is created using the Xumm SDK in an xApp flow, the return URL is ignoded as the user will return to the xApp post signing, where an SDK event will be triggered.
{% endhint %}

## Replacement variables

#### You can add the following replacement tags in your Return URL. They will be replaced with the appropriate values by Xumm.

* `{id}` will be replaced with the xumm payload UUID.
* `{cid}` will be replaced with the optional custom payload identifier.
* `{txid}` will be replaced with the signed transaction hash.
* `{txblob}` will be replaced with the signed transaction HEX blob.

## Routing / origin logic

If both the `app` and `web` return URL values are present, and **if they are identical**, the XUMM platform will execute logic to see if the user is coming from a browser tab (local device or remote, e.g. desktop browser). If so, and **if the origin browser window is still active**, only the origin browser window will redirect, and the app won't. Else (if the browser window is not active anymore) XUMM will redirect to the return URL.

This behaviour prevents a double redirect (both on mobile and on desktop / browser window).

## Sample payload body

```json
{
  "txjson": {
    "TransactionType": "..."
  },
  "options": {
    "return_url": {
      "app": "https://...",
      "web": "https://..."
    }
  }
}
```


---

# 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.xaman.dev/concepts/payloads-sign-requests/payload-return-url.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.
