Payments
List All Payments
This endpoint lists all Successful payment-related operations and can be used in streaming mode. Streaming mode allows you to listen for new payments as they are added to the Stellar ledger. If called in streaming mode, Horizon will start at the earliest known payment unless a cursor is set, in which case it will start from that cursor. By setting the cursor value to now, you can stream payments created since your request time. Operations that can be returned by this endpoint include: create_account, payment, path_payment_strict_recieve, path_payment_strict_send, and account_merge .
GET
/
payments
List All Payments
curl --request GET \
--url 'https://{network}.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>/payments'import requests
url = "https://{network}.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>/payments"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{network}.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>/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>/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>/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>/payments")
.asString();require 'uri'
require 'net/http'
url = URI("https://{network}.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>/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>//payments?cursor=&limit=3&order=asc"
},
"next": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//payments?cursor=33676838572033&limit=3&order=asc"
},
"prev": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//payments?cursor=12884905985&limit=3&order=desc"
}
},
"_embedded": {
"records": [
{
"_links": {
"self": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//operations/12884905985"
},
"transaction": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//transactions/3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889"
},
"effects": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//operations/12884905985/effects"
},
"succeeds": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//effects?order=desc&cursor=12884905985"
},
"precedes": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//effects?order=asc&cursor=12884905985"
}
},
"id": "12884905985",
"paging_token": "12884905985",
"transaction_successful": true,
"source_account": "GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7",
"type": "create_account",
"type_i": 0,
"created_at": "2015-09-30T17:15:54Z",
"transaction_hash": "3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889",
"starting_balance": "20.0000000",
"funder": "GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7",
"account": "GALPCCZN4YXA3YMJHKL6CVIECKPLJJCTVMSNYWBTKJW4K5HQLYLDMZTB"
},
{
"_links": {
"self": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//operations/12884905986"
},
"transaction": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//transactions/3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889"
},
"effects": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//operations/12884905986/effects"
},
"succeeds": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//effects?order=desc&cursor=12884905986"
},
"precedes": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//effects?order=asc&cursor=12884905986"
}
},
"id": "12884905986",
"paging_token": "12884905986",
"transaction_successful": true,
"source_account": "GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7",
"type": "payment",
"type_i": 1,
"created_at": "2015-09-30T17:15:54Z",
"transaction_hash": "3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889",
"asset_type": "native",
"from": "GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7",
"to": "GALPCCZN4YXA3YMJHKL6CVIECKPLJJCTVMSNYWBTKJW4K5HQLYLDMZTB",
"amount": "99999999959.9999700"
},
{
"_links": {
"self": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//operations/33676838572033"
},
"transaction": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//transactions/2db4b22ca018119c5027a80578813ffcf582cda4aa9e31cd92b43cf1bda4fc5a"
},
"effects": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//operations/33676838572033/effects"
},
"succeeds": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//effects?order=desc&cursor=33676838572033"
},
"precedes": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//effects?order=asc&cursor=33676838572033"
}
},
"id": "33676838572033",
"paging_token": "33676838572033",
"transaction_successful": true,
"source_account": "GALPCCZN4YXA3YMJHKL6CVIECKPLJJCTVMSNYWBTKJW4K5HQLYLDMZTB",
"type": "create_account",
"type_i": 0,
"created_at": "2015-10-01T04:15:01Z",
"transaction_hash": "2db4b22ca018119c5027a80578813ffcf582cda4aa9e31cd92b43cf1bda4fc5a",
"starting_balance": "20.0000000",
"funder": "GALPCCZN4YXA3YMJHKL6CVIECKPLJJCTVMSNYWBTKJW4K5HQLYLDMZTB",
"account": "GAP2KHWUMOHY7IO37UJY7SEBIITJIDZS5DRIIQRPEUT4VUKHZQGIRWS4"
}
]
}
}This method will use
20 Compute Units.
Query Parameters
Response
200 - application/json
Success
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
List All Payments
curl --request GET \
--url 'https://{network}.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>/payments'import requests
url = "https://{network}.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>/payments"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{network}.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>/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>/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>/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>/payments")
.asString();require 'uri'
require 'net/http'
url = URI("https://{network}.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>/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>//payments?cursor=&limit=3&order=asc"
},
"next": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//payments?cursor=33676838572033&limit=3&order=asc"
},
"prev": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//payments?cursor=12884905985&limit=3&order=desc"
}
},
"_embedded": {
"records": [
{
"_links": {
"self": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//operations/12884905985"
},
"transaction": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//transactions/3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889"
},
"effects": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//operations/12884905985/effects"
},
"succeeds": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//effects?order=desc&cursor=12884905985"
},
"precedes": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//effects?order=asc&cursor=12884905985"
}
},
"id": "12884905985",
"paging_token": "12884905985",
"transaction_successful": true,
"source_account": "GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7",
"type": "create_account",
"type_i": 0,
"created_at": "2015-09-30T17:15:54Z",
"transaction_hash": "3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889",
"starting_balance": "20.0000000",
"funder": "GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7",
"account": "GALPCCZN4YXA3YMJHKL6CVIECKPLJJCTVMSNYWBTKJW4K5HQLYLDMZTB"
},
{
"_links": {
"self": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//operations/12884905986"
},
"transaction": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//transactions/3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889"
},
"effects": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//operations/12884905986/effects"
},
"succeeds": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//effects?order=desc&cursor=12884905986"
},
"precedes": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//effects?order=asc&cursor=12884905986"
}
},
"id": "12884905986",
"paging_token": "12884905986",
"transaction_successful": true,
"source_account": "GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7",
"type": "payment",
"type_i": 1,
"created_at": "2015-09-30T17:15:54Z",
"transaction_hash": "3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889",
"asset_type": "native",
"from": "GAAZI4TCR3TY5OJHCTJC2A4QSY6CJWJH5IAJTGKIN2ER7LBNVKOCCWN7",
"to": "GALPCCZN4YXA3YMJHKL6CVIECKPLJJCTVMSNYWBTKJW4K5HQLYLDMZTB",
"amount": "99999999959.9999700"
},
{
"_links": {
"self": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//operations/33676838572033"
},
"transaction": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//transactions/2db4b22ca018119c5027a80578813ffcf582cda4aa9e31cd92b43cf1bda4fc5a"
},
"effects": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//operations/33676838572033/effects"
},
"succeeds": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//effects?order=desc&cursor=33676838572033"
},
"precedes": {
"href": "https://mainnet.stellar.validationcloud.io/v1/<YOUR_API_KEY_HERE>//effects?order=asc&cursor=33676838572033"
}
},
"id": "33676838572033",
"paging_token": "33676838572033",
"transaction_successful": true,
"source_account": "GALPCCZN4YXA3YMJHKL6CVIECKPLJJCTVMSNYWBTKJW4K5HQLYLDMZTB",
"type": "create_account",
"type_i": 0,
"created_at": "2015-10-01T04:15:01Z",
"transaction_hash": "2db4b22ca018119c5027a80578813ffcf582cda4aa9e31cd92b43cf1bda4fc5a",
"starting_balance": "20.0000000",
"funder": "GALPCCZN4YXA3YMJHKL6CVIECKPLJJCTVMSNYWBTKJW4K5HQLYLDMZTB",
"account": "GAP2KHWUMOHY7IO37UJY7SEBIITJIDZS5DRIIQRPEUT4VUKHZQGIRWS4"
}
]
}
}