Skip to content

Get ledger transactions

Request

Retrieve a paginated list of ledger transactions within a specified date and time range. This endpoint returns detailed transaction data, including amounts, references, operations, and running balances.

Security
Bearer
Query
currencystringrequired

Three-letter ISO 4217 currency code for the transactions to return (for example, USD).

Example:currency=USD
start-dttmstring, (date-time)required

Start of the date and time range (inclusive), in UTC, for which you want to retrieve ledger transactions.

Example:start-dttm=2022-02-27T08:30:00Z
end-dttmstring, (date-time)required

End of the date and time range (exclusive), in UTC, for which you want to retrieve ledger transactions.

Example:end-dttm=2022-02-27T08:30:00Z
statusstring

Filter results by transaction status. Allowed values:

  • SUCCESS: the ledger transaction completed successfully.
  • PENDING: reserved for future use to represent an in-flight ledger transaction.
txnReferencestring

Filter results by an exact transaction reference. Use this to locate all ledger transactions associated with a specific external reference.

page-sizeinteger, [ 1 .. 50 ]required

Number of records to return in the response page. Use page-size together with offset for offset-based pagination

offsetinteger

Number of records to skip before starting to return results. Use this with page-size to implement offset-based pagination.

For example, offset=25&page-size=25 returns the second page of results.

sort-keystring

Field to use for sorting the results. Allowed values include:

  • CREATED_AT: sort by transaction creation timestamp.
  • STATEMENT_OPERATION: sort by the operation type (for example, CREDIT, DEBIT).
  • STATEMENT_SOURCE: sort by the transaction source (for example, PAYMENTS, BANK).
  • STATEMENT_STATUS: sort by the ledger transaction status.
  • STATEMENT_TXN_REFERENCE: sort by the transaction reference.
  • STATEMENT_UPDATED_AT: sort by the last update timestamp.
sort-directionstring

Sort direction. Allowed values:

  • ASC: ascending order.
  • DESC: descending order.
curl -i -X GET \
  'https://docs.ripple.com/_mock/products/payments-direct-2/api-docs/payments-direct-api/payments-direct-2-api/v2/ledger-transactions?currency=USD&start-dttm=2022-02-27T08%3A30%3A00Z&end-dttm=2022-02-27T08%3A30%3A00Z&status=string&txnReference=string&page-size=1&offset=0&sort-key=string&sort-direction=string' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

A page of ledger statement transactions for the customer that match the specified query parameters.

Body
offsetstring

Offset used in the request to skip a specific number of records.

Example:"0"
pageSizestring

Number of records requested per page

Example:"25"
pageElementsstring

Number of records returned in requested page

Example:"25"
totalstring

Total number of records available for the given filters.

Example:"1000"
statementTransactionsArray of objects

Statement transaction details for the customer.

Response
{ "offset": "0", "pageSize": "25", "pageElements": "25", "total": "1000", "statementTransactions": [ { … } ] }