> For the complete documentation index, see [llms.txt](https://leather.gitbook.io/developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://leather.gitbook.io/developers/stacks-methods/stx_transferstx.md).

# stx\_transferStx

Request a transfer of STX tokens to a specified recipient.

## Method name

`stx_transferStx`

## **Parameters**

| Parameter   | Description                                                     | Required | Type               |
| ----------- | --------------------------------------------------------------- | -------- | ------------------ |
| `recipient` | Stacks c32-encoded address of the recipient                     | ✅        | `string`           |
| `amount`    | Amount of STX to transfer (BigInt constructor compatible)       | ✅        | `number \| string` |
| `memo`      | Optional memo for the transaction (defaults to an empty string) | ❌        | `string`           |

## **Example request**

```typescript
try {
  // Request STX transfer
  const response = await window.LeatherProvider.request("stx_transferStx", {
    recipient: "SP3TB3AJ0XMZ9S6CGY2CQ6R06H1Z6DJQ1SH15ZP2H",
    amount: "1000000", // 1 STX (in microSTX)
    memo: "Payment for services",
  });

  console.log("Response:", response);
} catch (error) {
  console.log("Request error:", error);
}
```

## Example Response

```json
{
    "jsonrpc": "2.0",
    "id": "d3f1a7b0-5e6c-4f18-92a4-8e3b9f7c5c71",
    "result": {
        "txid": "f9c2a8f1e3b1d5a7c8e2f6a9d4b3e1c7f2a5d9b8c6e4f1a3b7d2e9c5f8a1b6c3",
        "transaction": "dead...beef"
    }
}
```

## Sandbox

[Install the Leather extension](https://leather.io/install-extension) then try out this method below:

{% embed url="<https://codesandbox.io/p/sandbox/2y33p9>" %}

## Preview

<figure><img src="https://2085786563-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F41U87FfDFo2dIKYr0ZNX%2Fuploads%2FlkwR0R1giznMsDCO1IGS%2FScreenshot%202025-04-29%20at%208.24.13%E2%80%AFPM.png?alt=media&amp;token=4bc61fac-f84c-431b-876e-b3d942185e02" alt="" width="563"><figcaption></figcaption></figure>


---

# 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://leather.gitbook.io/developers/stacks-methods/stx_transferstx.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.
