Use this method to list the connected customer’s transactions. You can filter by date range and page through results with a cursor. For request and response details, see the List transactions API.Documentation Index
Fetch the complete documentation index at: https://dev.moonpay.com/llms.txt
Use this file to discover all available pages before exploring further.
List transactions
Parameters
client.listTransactions() takes an optional params object. Call it with no arguments to fetch the most recent transactions without filters.
| Field | Type | Required | Description |
|---|---|---|---|
startDate | string | An ISO 8601 date. Only return transactions created on or after this date. | |
endDate | string | An ISO 8601 date. Only return transactions created on or before this date. | |
cursor | string | A pagination cursor returned from a previous call. Use it to fetch the next page. | |
limit | number | The maximum number of transactions to return in one page. |
Result
client.listTransactions() returns a Result<{ data: Transaction[]; pageInfo: PaginationInfo }, GetTransactionsError>.
Result envelope
Result<{ data: Transaction[]; pageInfo: PaginationInfo }, GetTransactionsError>
| Field | Type | Required | Description |
|---|---|---|---|
ok | boolean | ✅ | Whether the operation succeeded. |
value | { data: Transaction[]; pageInfo: PaginationInfo } | Present when ok is true. | |
error | GetTransactionsError | Present when ok is false. |
Transaction
Each entry in data is a full transaction. Key fields include id, status, source.amount, destination.amount, and createdAt. See the Transaction object for every field.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | ✅ | The MoonPay ID of the transaction. |
status | TransactionStatus | ✅ | The current transaction status. See the Transaction object for the full list of statuses. |
source | object | ✅ | The source amount and asset (fiat currency). |
destination | object | ✅ | The destination amount and asset (cryptocurrency). |
createdAt | string | ✅ | An ISO 8601 timestamp of when the transaction was created. |
PaginationInfo
Cursor-based pagination details returned alongside the data. See the List transactions API for the exact field names used in this response.
GetTransactionsError
GetTransactionsError is the standard MoonPay Platform API error shape, DevPlatformApiError.
| Field | Type | Required | Description |
|---|---|---|---|
code | DevPlatformApiErrorCode | ✅ | A machine-readable error code (for example, "unauthorized", "invalid_request"). See the error reference for the full list. |
message | string | ✅ | A developer-friendly message. |
errors | DevPlatformApiErrorDetail[] | Optional list of field-level errors. |
Example: page through transactions
Use the cursor returned inpageInfo to fetch additional pages. The exact cursor field name is documented in the List transactions API response.
Page through transactions