Retrieve a Ledger's Payments
GET/ledgers/:sequence/payments
This endpoint returns all payment-related operations in a specific ledger. Operation types that can be returned by this endpoint include: create_account, payment, path_payment, and account_merge.
Request
Path Parameters
The sequence number of a specific ledger.
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.
Possible values: [asc
, desc
]
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
.
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.
Possible values: [true
, false
]
Set to true to include failed operations in results. Options include true and false.
Set to transactions to include the transactions which created each of the operations in the response.
Responses
- 200
Success
- application/json
- Schema
- Example (from schema)
- RetrieveALedgersPayments
Schema
Array [
]
_links
object
self
object
next
object
prev
object
_embedded
object
records
object[]
_links
object
self
object
required
transaction
object
required
effects
object
required
succeeds
object
required
precedes
object
required
Possible values: Value must match regular expression G[A-Z0-9]{55}
Possible values: [native
, credit_alphanum4
, credit_alphanum12
]
Possible values: Value must match regular expression G[A-Z0-9]{55}
Possible values: Value must match regular expression G[A-Z0-9]{55}
Possible values: Value must match regular expression G[A-Z0-9]{55}
{
"_links": {
"self": {
"href": "string",
"templated": true
},
"next": {
"href": "string",
"templated": true
},
"prev": {
"href": "string",
"templated": true
}
},
"_embedded": {
"records": [
{
"_links": {
"self": {
"href": "string",
"templated": true
},
"transaction": {
"href": "string",
"templated": true
},
"effects": {
"href": "string",
"templated": true
},
"succeeds": {
"href": "string",
"templated": true
},
"precedes": {
"href": "string",
"templated": true
}
},
"id": "string",
"paging_token": "string",
"transaction_successful": true,
"source_account": "string",
"type": "payment",
"type_i": "string",
"created_at": "string",
"transaction_hash": "string",
"asset_type": "string",
"asset_issuer": "string",
"from": "string",
"to": "string",
"amount": "string"
}
]
}
}
{
"_links": {
"self": {
"href": "https://horizon-testnet.stellar.org/ledgers/27521176/payments?cursor=&limit=1&order=asc"
},
"next": {
"href": "https://horizon-testnet.stellar.org/ledgers/27521176/payments?cursor=118202550867476481&limit=1&order=asc"
},
"prev": {
"href": "https://horizon-testnet.stellar.org/ledgers/27521176/payments?cursor=118202550867476481&limit=1&order=desc"
}
},
"_embedded": {
"records": [
{
"_links": {
"self": {
"href": "https://horizon-testnet.stellar.org/operations/118202550867476481"
},
"transaction": {
"href": "https://horizon-testnet.stellar.org/transactions/971454b84a82baa38afa975e9eb4ff2632821b5a3e7f7993a7e20bbd9d7633ea"
},
"effects": {
"href": "https://horizon-testnet.stellar.org/operations/118202550867476481/effects"
},
"succeeds": {
"href": "https://horizon-testnet.stellar.org/effects?order=desc&cursor=118202550867476481"
},
"precedes": {
"href": "https://horizon-testnet.stellar.org/effects?order=asc&cursor=118202550867476481"
}
},
"id": "118202550867476481",
"paging_token": "118202550867476481",
"transaction_successful": true,
"source_account": "GDQWI6FKB72DPOJE4CGYCFQZKRPQQIOYXRMZ5KEVGXMG6UUTGJMBCASH",
"type": "payment",
"type_i": 1,
"created_at": "2019-12-30T22:35:49Z",
"transaction_hash": "971454b84a82baa38afa975e9eb4ff2632821b5a3e7f7993a7e20bbd9d7633ea",
"asset_type": "credit_alphanum4",
"asset_code": "NODL",
"asset_issuer": "GB2Y3AWXVROM2BHFQKQPTWKIOI3TZEBBD3LTKTVQTKEPXGOBE742NODL",
"from": "GDQWI6FKB72DPOJE4CGYCFQZKRPQQIOYXRMZ5KEVGXMG6UUTGJMBCASH",
"to": "GDGJS7AXAUFDZARIRDVZ5V7CFW6XY47WSBE2OVLCCGCDWOE7INKYN3PS",
"amount": "0.0000017"
}
]
}
}