> 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/js-ts-sdk/examples-user-stories/sign-requests-payloads/backend.md).

# Backend

When creating Sign Requests from a backend environment, the Xumm SDK is called with your API Key & Secret. A payload can be opened by any user. A user will not get notified about a payload, unless if they interacted with the payload through a **deeplink** or scanning the **Payload QR code**.

If you want to deliver backend created Sign Requests to a user & the user is identified by your application, you have to provide a `user_token` to the payload. The `user_token` can be obtained after the user interacted with your application & signed a payload. See: [Push](/concepts/payloads-sign-requests/delivery/push.md)

{% hint style="info" %}
For more information about the object contents to be used for Payloads & the return URL replacement variables, see: <https://xumm.readme.io/reference/post-payload>
{% endhint %}

```typescript
import { Xumm } from "xumm"

const xumm = new Xumm("some-api-key", "some-secret-key")

const payload = await xumm.payload?.create({
  user_token: "xxxxxxxxxx",
  txjson: {
    TransactionType: "SignIn"
  },
  options: {
    return_url: {
      app: "https://sample.test/?...",
      web: "https://sample.test/?id={id}"
    },
    force_network: "MAINNET"
  },
  custom_meta: {
    identifier: "123123",
    instruction: "Please sign this to..."
  }
})) 
```

{% hint style="info" %}
To decide where the user is sent after signing the payload, please read:\
[Payload Return URL](/concepts/payloads-sign-requests/payload-return-url.md)
{% endhint %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.xaman.dev/js-ts-sdk/examples-user-stories/sign-requests-payloads/backend.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
