# "Pay With Anything"

## 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="/files/oPcEdicQXA6PQVmDB9D3" alt="" data-size="original"> | <img src="/files/vPkj3m7OCMjZc35Bjj57" alt="" data-size="original"> |


---

# Agent Instructions: 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:

```
GET https://docs.xaman.dev/concepts/pay-with-anything.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
