> 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/pay-with-anything.md).

# "Pay With Anything"

Xaman allows you to easily craft a payload (Sign Request) that will always deliver the currency and amount you want to receive, while allowing the Xaman user to pay with anything (any asset they have)

## The Payload

To request delivery of 5 RLUSD:

```mjs
{
  options: {
    force_network: 'MAINNET',
    pathfinding: true
  },
  custom_meta: {
    instruction: 'Pay for this and that...'
  },
  txjson: {
    TransactionType: 'Payment',
    Destination: 'r...YourAddress...',
    Amount: {
      currency: '524C555344000000000000000000000000000000',
      issuer: 'rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De',
      value: '15'
    }
  }
}
```

It's as simple as that. Xaman sees Amount, Xaman sees pathfinding in the option and done!

You will always get what you asked for, user can pay with anything. `delivered_amount` is always your preferred currency from `Amount`.

## The Sign Request (user facing)

When a payload like above is opened by the user, they will have to wait a few seconds for the XRP Ledger to finish a Pathfinding request, to see which assets the user posesses that can satisfy delivering the requested amount (with in-line, in-transaction, atomic conversion of the asset the user sends to the asset you want to receive).

| First few seconds                                                                                                                                                                                                                                        | After paths are found                                                                                                                                                                                                                                    |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <img src="https://416994804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F61N8uUPfBBFEqPdV1U4Y%2Fuploads%2F0EuYfCDIyV7a7fRJFx4S%2Fimage.png?alt=media&amp;token=d5c7b18d-eff9-4240-ae32-68222e1b6275" alt="" data-size="original"> | <img src="https://416994804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F61N8uUPfBBFEqPdV1U4Y%2Fuploads%2FBmUzmSnyBuomfRQfvtOw%2Fimage.png?alt=media&amp;token=e08ad92a-c20f-4270-81d7-0bc169b9e804" alt="" data-size="original"> |


---

# 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/pay-with-anything.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.
