Skip to main content
Submit a real transaction to the Stellar network. This is the only way to make changes on-chain. Unlike Horizon, this does not wait for transaction completion. It simply validates and enqueues the transaction. Clients should call getTransaction to learn about transaction success/failure. This supports all transactions, not only smart contract-related transactions.

Params (1)

Please note that parameter structure within the request must contain named parameters as a by-name object, and not as positional arguments in a by-position array
string
required
The signed transaction to broadcast for inclusion in a ledger.A Stellar TransactionEnvelope (as a base64-encoded string)

Result

(sendTransactionResult) Transaction status and network state. The result will include if the transaction was successfully enqueued, and information about the current ledger.
string
required
Transaction hash (as a hex-encoded string)
string
required
The current status of the transaction by hash.Available options: PENDING, DUPLICATE, TRY_AGAIN_LATER, ERROR
number
required
The sequence number of the latest ledger known to Stellar RPC at the time it handled the request.
number
required
The unix timestamp of the close time of the latest ledger known to Stellar RPC at the time it handled the request.
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.
string[]
(optional) If the transaction status is ERROR, this field may be present with an array of base64 encoded strings. Each string will decode to a raw DiagnosticEvent XDR struct containing details on why stellar-core rejected the transaction.

Examples

Submitting a valid transaction using the sendTransaction method, resulting in a PENDING status.Request
Result

SDK Guide

The example above is sending a transaction using RPC methods directly. If you are using the Stellar SDK to build applications, you can use the native functions to get the same information.

Using the Lab

The sendTransaction method is used to submit a real transaction to the Stellar network, making it the only way to execute on-chain changes through RPC. Unlike Horizon, this method does not wait for confirmation. Instead, it validates and enqueues the transaction. To track its final outcome, clients should follow up with a call to getTransaction. This method supports all Stellar transactions, including but not limited to smart contract invocations. 👉 Send (Submit) a Transaction on the Lab Lab: sendTransaction