Get card transactions
GET /v1/api-gateway/card/{card_id}/transactions
Paginated with currentPage / perPage (perPage must be below 51). Each entry has a type that tells you which data shape to expect. An unknown card id, or a card not owned by your organization, returns 200 with an empty transactions list — not 404.
Request
Authentication: your API key in the x-api-key header.
Path parameters
| Field | Type | Description |
|---|---|---|
card_ required | string, uuid | Card UUID (the card id returned by the card endpoints). |
Query parameters
| Field | Type | Description |
|---|---|---|
currentPage | integer | Page number, starting at 1. Default 1. |
current_ | integer | Page number, starting at 1 — the canonical spelling, accepted on every paginated endpoint and matching pagination.current_ in the response. currentPage means the same thing and keeps working; if both are sent, current_ wins. |
perPage | integer | Transactions per page. Minimum 1, maximum 50. Default 10. |
per_ | integer | Transactions per page. Minimum 1, maximum 50. Default 10. The canonical spelling, accepted on every paginated endpoint and matching pagination.per_ in the response. perPage means the same thing and keeps working; if both are sent, per_ wins. A value above 50 is not rejected: it is reduced to 50, and pagination.per_ in the response reports the size actually applied. The route's own spelling keeps its existing behaviour for an out-of-range value. |
include_ | boolean | Set to true to include balance-adds (top-ups) to this card in the feed as TOP_ entries. Default false: loads are omitted. |
Example request
cURL
curl --request GET \
--url 'https://api.themooncard.com/v1/api-gateway/card/7c9e6679-7425-40de-944b-e07fc1f90ae7/transactions' \
--header 'x-api-key: YOUR_API_KEY'Responses
200 Success
| Field | Type | Description |
|---|---|---|
transactions required | array of object or object or object or object or object or object or object | |
transactions[]. required | string | One of: DECLINE |
transactions[]. required | object | |
transactions[]. required | string | |
transactions[]. required | string | ISO-8601 timestamp with milliseconds, e.g. "2026-08-16T17:51:01.000Z". |
transactions[]. required | string | |
transactions[]. required | string, nullable | |
transactions[]. required | number | |
transactions[]. required | string | Why the authorization was declined, in customer-safe wording. |
transactions[]. required | string | |
transactions[]. required | integer | Internal. May change or be removed without notice — do not rely on it. |
transactions[]. required | object | |
transactions[]. required | string | Card id as exposed by the API. |
transactions[]. required | string, nullable | |
transactions[]. required | string, nullable | |
transactions[]. required | string | Last four digits of the card; empty string when unavailable. |
pagination required | object | |
pagination. required | integer | Total number of items across all pages. |
pagination. required | integer | Number of the last page (0 when there are no items). |
pagination. required | integer, nullable | Previous page number, or null on the first page. |
pagination. required | integer, nullable | Next page number, or null on the last page. |
pagination. required | integer | Page size that was applied. |
pagination. required | integer | 1-based current page. |
pagination. required | integer | 1-based index of the first item on this page (0 when empty). |
pagination. required | integer | 1-based index of the last item on this page (0 when empty). |
JSON
{
"transactions": [
{
"type": "CARD_PURCHASE",
"data": {
"id": "2f1a6b3c-4d5e-4f60-8a7b-9c0d1e2f3a4b",
"card": {
"public_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"name": "Jane Doe",
"type": "VIRTUAL",
"last_four": "1111"
},
"transaction_id": "2f1a6b3c-4d5e-4f60-8a7b-9c0d1e2f3a4b",
"transaction_status": "SETTLED",
"datetime": "2026-08-16T17:51:01.000Z",
"datetime_iso": "2026-08-16T17:51:01Z",
"merchant": "ACME SUPERSTORE",
"merchant_mid": "445566778899",
"amount": 24.5,
"amount_no_rounding": "24.50",
"ledger_currency": "USD",
"amount_fees_in_ledger_currency": 0.25,
"amount_fees_in_ledger_currency_no_rounding": "0.25",
"amount_in_transaction_currency": 24.5,
"amount_in_transaction_currency_no_rounding": "24.50",
"transaction_currency": "USD",
"amount_fees_in_transaction_currency": 0.25,
"amount_fees_in_transaction_currency_no_rounding": "0.25",
"fees": [
{
"type": "FOREIGN_TRANSACTION",
"amount": 0.25,
"amount_no_rounding": "0.25",
"fee_amount_in_transaction_currency": 0.25,
"fee_description": "Foreign transaction fee"
}
]
}
}
],
"pagination": {
"total": 1,
"last_page": 1,
"prev_page": null,
"next_page": null,
"per_page": 10,
"current_page": 1,
"from": 1,
"to": 1
}
}400 Error
Validation failed (errors[] lists each offending field) or a domain rule rejected the request ({ message, code }).
The body is the standard error object: see Errors.
401 Error
Missing or invalid credentials, e.g. { "message": "Invalid API Key", "code": "UNAUTHORIZED" }.
The body is the standard error object: see Errors.
500 Error
Unexpected server error. Body is { message: "Internal server error", code: "INTERNAL_.
The body is the standard error object: see Errors.
Last updated April 30, 2026