APIs

Developer Docs

stx_transferStx API method

Visit website

May 16, 2025

Disclaimer: Leather does not control third-party integrations using this method. Developers must validate transaction parameters and recipients before requesting user signatures.

Request a transfer of STX tokens to a specified recipient using the user's connected Leather account.

Method name

stx_transferStx

Parameters

  • recipient: Stacks address (c32 format) — required

  • amount: Number or string (in microSTX) — required

  • memo: Optional string memo for the transaction

Examples

Example request

const response = await window.LeatherProvider.request("stx_transferStx", {
  recipient: "SP2J4V1A3Q0GJ6ZQ0H9D6X90XZJQ2A0WQ5P0K2RDS",
  amount: "1000000", // 1 STX
  memo: "Payment for services"
});

Example response

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

Use case

Use stx_transferStx to initiate STX token transfers within your app—from peer-to-peer tips to app-native payments.

Sandbox

Try the stx_transferStx method live in this CodeSandbox environment: 👉 Open Sandbox