> For the complete documentation index, see [llms.txt](https://docs.validationcloud.io/v1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.validationcloud.io/v1/stellar/stellar-rpc-formerly-soroban-api/sendtransaction.md).

# sendTransaction

Submit a real transaction to the Stellar network. This is the only way to make changes "on-chain".

This method will use `10` [Compute Units](/v1/about/billing.md).

***

## Reference: [Here](https://soroban.stellar.org/api/methods/sendTransaction)

## **Parameters**

* `transaction (string)`(required) The signed transaction to broadcast (serialized in base64).

## Returns

* `hash` string - The transaction hash (in an hex-encoded string).
* `status` string - The current status of the transaction by hash.
  * Allowed values:PENDINGDUPLICATETRY\_AGAIN\_LATERERROR
* `latestLedger` string - The latest ledger known to Soroban-RPC at the time it handled the `sendTransaction()` request.
* `latestLedgerCloseTime` string - The unix timestamp of the close time of the latest ledger known to Soroban-RPC at the time it handled the `sendTransaction()` request.
* `errorResultXdr` string (optional) - If the transaction status is `ERROR`, this will be a base64 encoded string of the raw TransactionResult XDR struct containing details on why stellar-core rejected the transaction.

```bash
// Result
{
  "jsonrpc": "2.0",
  "id": 8675309,
  "result": {
    "hash": "a01441a4d0b80769d2c2d97dcd28d13e9036065da14ea83731424d77efc50894",
    "status": "PENDING",
    "latestLedger": "45075181",
    "latestLedgerCloseTime": "1677115742"
  }
}
```

{% tabs %}
{% tab title="mainnet" %}

<pre class="language-bash"><code class="lang-bash"><strong>curl https://mainnet.stellar.validationcloud.io/v1/&#x3C;YOUR_API_KEY_HERE> \
</strong>    -X POST \
    -H "Content-Type: application/json" \
    -d '{
  "jsonrpc": "2.0",
  "id": 8675309,
  "method": "sendTransaction",
  "params": {
    "transaction": "AAAAAgAAAABzdv3ojkzWHMD7KUoXhrPx0GH18vHKV0ZfqpMiEblG1gAAp18AAAAAAAAAAgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAHN2/eiOTNYcwPspSheGs/HQYfXy8cpXRl+qkyIRuUbWAAAAGAAAAAEAAAABAAAAAPVf8W9m9DNgJmuV22+P7AHXYDEFQwauSks4BZj2z9EUAAAAAO3beL34UBBpCfUUPCfcnqX8YQKn41UhnKu6BInkVe9lAAAAAAAAAAEAAAABAAAAB+3beL34UBBpCfUUPCfcnqX8YQKn41UhnKu6BInkVe9lAAAAAQAAAAbhq+vRxjISTR62JpK1SAnzz1cZKpSpkRlwLJH6ZrzssgAAABQAAUKLAAAUkAAAAIAAAACoAAAAAAAAACEAAAAAAAAAARG5RtYAAABA+Vy3k86bNEP7rP8hb3cY1QWYhRa3CnF7jqHUj22Rd++2a0YwCKrMbofTUOb21GP6aFZwfKVvaokS22u1to5xDw=="
  }
}'
</code></pre>

{% endtab %}

{% tab title="testnet" %}

```bash
curl https://testnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{
  "jsonrpc": "2.0",
  "id": 8675309,
  "method": "sendTransaction",
  "params": {
    "transaction": "AAAAAgAAAABzdv3ojkzWHMD7KUoXhrPx0GH18vHKV0ZfqpMiEblG1gAAp18AAAAAAAAAAgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAHN2/eiOTNYcwPspSheGs/HQYfXy8cpXRl+qkyIRuUbWAAAAGAAAAAEAAAABAAAAAPVf8W9m9DNgJmuV22+P7AHXYDEFQwauSks4BZj2z9EUAAAAAO3beL34UBBpCfUUPCfcnqX8YQKn41UhnKu6BInkVe9lAAAAAAAAAAEAAAABAAAAB+3beL34UBBpCfUUPCfcnqX8YQKn41UhnKu6BInkVe9lAAAAAQAAAAbhq+vRxjISTR62JpK1SAnzz1cZKpSpkRlwLJH6ZrzssgAAABQAAUKLAAAUkAAAAIAAAACoAAAAAAAAACEAAAAAAAAAARG5RtYAAABA+Vy3k86bNEP7rP8hb3cY1QWYhRa3CnF7jqHUj22Rd++2a0YwCKrMbofTUOb21GP6aFZwfKVvaokS22u1to5xDw=="
  }
}'

```

{% endtab %}
{% endtabs %}


---

# 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.validationcloud.io/v1/stellar/stellar-rpc-formerly-soroban-api/sendtransaction.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.
