Payments
Retrieve a Transaction's Payments
This endpoint returns the payments of a specific transaction.
GET
/
transactions
/
{transaction_hash}
/
payments
Retrieve a Transaction's Payments
curl --request GET \
--url 'https://{network}.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>/transactions/{transaction_hash}/payments'import requests
url = "https://{network}.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>/transactions/{transaction_hash}/payments"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{network}.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>/transactions/{transaction_hash}/payments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{network}.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>/transactions/{transaction_hash}/payments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{network}.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>/transactions/{transaction_hash}/payments"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{network}.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>/transactions/{transaction_hash}/payments")
.asString();require 'uri'
require 'net/http'
url = URI("https://{network}.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>/transactions/{transaction_hash}/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"_links": {
"self": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//transactions/f8929884dfc56ff9d8bc220c7bfba9e58208943eba96f33e8a0787a5bb8a4629/payments?cursor=&limit=10&order=asc"
},
"next": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//transactions/f8929884dfc56ff9d8bc220c7bfba9e58208943eba96f33e8a0787a5bb8a4629/payments?cursor=3382840796385281&limit=10&order=asc"
},
"prev": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//transactions/f8929884dfc56ff9d8bc220c7bfba9e58208943eba96f33e8a0787a5bb8a4629/payments?cursor=3382840796385281&limit=10&order=desc"
}
},
"_embedded": {
"records": {
"_links": {
"self": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//operations/3382840796385281"
},
"transaction": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//transactions/f8929884dfc56ff9d8bc220c7bfba9e58208943eba96f33e8a0787a5bb8a4629"
},
"effects": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//operations/3382840796385281/effects"
},
"succeeds": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//effects?order=desc&cursor=3382840796385281"
},
"precedes": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//effects?order=asc&cursor=3382840796385281"
}
},
"id": "3382840796385281",
"paging_token": "3382840796385281",
"transaction_successful": true,
"source_account": "GCNEGL4IYJ4XH2GV62QK4PQ5D4YWSYZPBC3NVF6VMNSFUMBFW3V3DKKY",
"type": "account_merge",
"type_i": 8,
"created_at": "2024-07-29T19:33:23Z",
"transaction_hash": "f8929884dfc56ff9d8bc220c7bfba9e58208943eba96f33e8a0787a5bb8a4629",
"account": "GCNEGL4IYJ4XH2GV62QK4PQ5D4YWSYZPBC3NVF6VMNSFUMBFW3V3DKKY",
"into": "GBFAIH5WKAJQ77NG6BZG7TGVGXHPX4SQLIJ7BENJMCVCZSUZPSISCLU5"
}
}
}This method will use
10 Compute Units.
Path Parameters
Transactions are commands that modify the ledger state and consist of one or more operations.
Example:
"5ebd5c0af4385500b53dd63b0ef5f6e8feef1a7e1c86989be3cdcce825f3c0cc"
Query Parameters
A number that points to a specific location in a collection of responses and is pulled from the paging_token value of a record.
Example:
6606617478959105
A designation of the order in which records should appear. Options include asc (ascending) or desc (descending). If this argument isn’t set, it defaults to asc.
Available options:
asc, desc The maximum number of records returned. The limit can range from 1 to 200 - an upper limit that is hardcoded in Horizon for performance reasons. If this argument isn’t designated, it defaults to 10.
Example:
10
Retrieve a Transaction's Payments
curl --request GET \
--url 'https://{network}.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>/transactions/{transaction_hash}/payments'import requests
url = "https://{network}.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>/transactions/{transaction_hash}/payments"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{network}.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>/transactions/{transaction_hash}/payments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{network}.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>/transactions/{transaction_hash}/payments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{network}.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>/transactions/{transaction_hash}/payments"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{network}.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>/transactions/{transaction_hash}/payments")
.asString();require 'uri'
require 'net/http'
url = URI("https://{network}.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>/transactions/{transaction_hash}/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"_links": {
"self": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//transactions/f8929884dfc56ff9d8bc220c7bfba9e58208943eba96f33e8a0787a5bb8a4629/payments?cursor=&limit=10&order=asc"
},
"next": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//transactions/f8929884dfc56ff9d8bc220c7bfba9e58208943eba96f33e8a0787a5bb8a4629/payments?cursor=3382840796385281&limit=10&order=asc"
},
"prev": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//transactions/f8929884dfc56ff9d8bc220c7bfba9e58208943eba96f33e8a0787a5bb8a4629/payments?cursor=3382840796385281&limit=10&order=desc"
}
},
"_embedded": {
"records": {
"_links": {
"self": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//operations/3382840796385281"
},
"transaction": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//transactions/f8929884dfc56ff9d8bc220c7bfba9e58208943eba96f33e8a0787a5bb8a4629"
},
"effects": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//operations/3382840796385281/effects"
},
"succeeds": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//effects?order=desc&cursor=3382840796385281"
},
"precedes": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//effects?order=asc&cursor=3382840796385281"
}
},
"id": "3382840796385281",
"paging_token": "3382840796385281",
"transaction_successful": true,
"source_account": "GCNEGL4IYJ4XH2GV62QK4PQ5D4YWSYZPBC3NVF6VMNSFUMBFW3V3DKKY",
"type": "account_merge",
"type_i": 8,
"created_at": "2024-07-29T19:33:23Z",
"transaction_hash": "f8929884dfc56ff9d8bc220c7bfba9e58208943eba96f33e8a0787a5bb8a4629",
"account": "GCNEGL4IYJ4XH2GV62QK4PQ5D4YWSYZPBC3NVF6VMNSFUMBFW3V3DKKY",
"into": "GBFAIH5WKAJQ77NG6BZG7TGVGXHPX4SQLIJ7BENJMCVCZSUZPSISCLU5"
}
}
}