Submit a Transaction
POSThttps://horizon-testnet.stellar.org/transactions
This endpoint actually submits a transaction to the Stellar network. It only takes a single, required parameter: the signed transaction. Refer to the Transactions page for details on how to craft a proper one. If you submit a transaction that has already been included in a ledger, this endpoint will return the same response as would’ve been returned for the original transaction submission. This allows for safe resubmission of transactions in error scenarios, as highlighted in the error-handling guide.
Request
Query Parameters
tx stringrequired
Responses
- 200
Success
- application/json
- Schema
- Example (auto)
- SubmitaTransaction
Schema
_embedded object
{
"_embedded": {
"records": [
{
"memo": "string",
"memo_bytes": "string",
"_links": {
"self": {
"href": "string",
"templated": true
},
"account": {
"href": "string",
"templated": true
},
"ledger": {
"href": "string",
"templated": true
},
"operations": {
"href": "string",
"templated": true
},
"effects": {
"href": "string",
"templated": true
},
"precedes": {
"href": "string",
"templated": true
},
"succeeds": {
"href": "string",
"templated": true
},
"transaction": {
"href": "string",
"templated": true
}
},
"id": "string",
"paging_token": "string",
"successful": true,
"hash": "string",
"ledger": 0,
"created_at": "string",
"source_account": "string",
"account_muxed": "string",
"account_muxed_id": "string",
"source_account_sequence": "string",
"fee_account": "string",
"fee_account_muxed": "string",
"fee_account_muxed_id": "string",
"fee_charged": "string",
"max_fee": "string",
"operation_count": 0,
"envelope_xdr": "string",
"result_xdr": "string",
"result_meta_xdr": "string",
"fee_meta_xdr": "string",
"memo_type": "string",
"signatures": [
"string"
],
"preconditions": {
"timebounds": {
"min_time": "string",
"max_time": "string"
},
"ledgerbounds": {
"min_ledger": "string",
"max_ledger": "string"
},
"min_account_sequence": "string",
"min_account_sequence_age": "string",
"min_account_sequence_ledger_gap": 0,
"extra_signers": [
"string"
]
},
"fee_bump_transaction": {
"hash": "string",
"signatures": [
"string"
]
},
"inner_transaction": {
"hash": "string",
"signatures": [
"string"
],
"max_fee": "string"
}
}
]
}
}
{
"memo": "Test Transaction",
"memo_bytes": "VGVzdCBUcmFuc2FjdGlvbg==",
"_links": {
"self": {
"href": "https://horizon-testnet.stellar.org/transactions/8ef0c6d60357bf91b0b0d7800b747ff02bf73117d3e017690cbff641ca67f124"
},
"account": {
"href": "https://horizon-testnet.stellar.org/accounts/GCIHAQVWZH2AB5BB5NP63FBSIREG77LQZZNUVKD2LN2IOCLOT6N72MJN"
},
"ledger": {
"href": "https://horizon-testnet.stellar.org/ledgers/139575"
},
"operations": {
"href": "https://horizon-testnet.stellar.org/transactions/8ef0c6d60357bf91b0b0d7800b747ff02bf73117d3e017690cbff641ca67f124/operations{?cursor,limit,order}",
"templated": true
},
"effects": {
"href": "https://horizon-testnet.stellar.org/transactions/8ef0c6d60357bf91b0b0d7800b747ff02bf73117d3e017690cbff641ca67f124/effects{?cursor,limit,order}",
"templated": true
},
"precedes": {
"href": "https://horizon-testnet.stellar.org/transactions?order=asc&cursor=599470060347392"
},
"succeeds": {
"href": "https://horizon-testnet.stellar.org/transactions?order=desc&cursor=599470060347392"
},
"transaction": {
"href": "https://horizon-testnet.stellar.org/transactions/8ef0c6d60357bf91b0b0d7800b747ff02bf73117d3e017690cbff641ca67f124"
}
},
"id": "8ef0c6d60357bf91b0b0d7800b747ff02bf73117d3e017690cbff641ca67f124",
"paging_token": "599470060347392",
"successful": true,
"hash": "8ef0c6d60357bf91b0b0d7800b747ff02bf73117d3e017690cbff641ca67f124",
"ledger": 139575,
"created_at": "2021-03-25T21:14:11Z",
"source_account": "GCIHAQVWZH2AB5BB5NP63FBSIREG77LQZZNUVKD2LN2IOCLOT6N72MJN",
"source_account_sequence": "599336916353025",
"fee_account": "GCIHAQVWZH2AB5BB5NP63FBSIREG77LQZZNUVKD2LN2IOCLOT6N72MJN",
"fee_charged": "100",
"max_fee": "100",
"operation_count": 1,
"envelope_xdr": "AAAAAgAAAACQcEK2yfQA9CHrX+2UMkRIb/1wzltKqHpbdIcJbp+b/QAAAGQAAiEYAAAAAQAAAAEAAAAAAAAAAAAAAABgXP3QAAAAAQAAABBUZXN0IFRyYW5zYWN0aW9uAAAAAQAAAAAAAAABAAAAAJBwQrbJ9AD0Ietf7ZQyREhv/XDOW0qoelt0hwlun5v9AAAAAAAAAAAF9eEAAAAAAAAAAAFun5v9AAAAQKdJnG8QRiv9xGp1Oq7ACv/xR2BnNqjfUHrGNua7m4tWbrun3+GmAj6ca3xz+4ZppWRTbvTUcCxvpbHERZ85QgY=",
"result_xdr": "AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAA=",
"result_meta_xdr": "AAAAAgAAAAIAAAADAAIhNwAAAAAAAAAAkHBCtsn0APQh61/tlDJESG/9cM5bSqh6W3SHCW6fm/0AAAAXSHbnnAACIRgAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAIhNwAAAAAAAAAAkHBCtsn0APQh61/tlDJESG/9cM5bSqh6W3SHCW6fm/0AAAAXSHbnnAACIRgAAAABAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAA=",
"fee_meta_xdr": "AAAAAgAAAAMAAiEYAAAAAAAAAACQcEK2yfQA9CHrX+2UMkRIb/1wzltKqHpbdIcJbp+b/QAAABdIdugAAAIhGAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAiE3AAAAAAAAAACQcEK2yfQA9CHrX+2UMkRIb/1wzltKqHpbdIcJbp+b/QAAABdIduecAAIhGAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==",
"memo_type": "text",
"signatures": [
"p0mcbxBGK/3EanU6rsAK//FHYGc2qN9QesY25rubi1Zuu6ff4aYCPpxrfHP7hmmlZFNu9NRwLG+lscRFnzlCBg=="
]
}
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://horizon-testnet.stellar.org/transactions");
request.Headers.Add("Accept", "application/json");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear
Did you find this page helpful?