Browse the docs

Get account transactions

GET /v2/api-gateway/accounts/{id}/transactions

Lists activity-feed transactions for every card on the account, including account credits and top-ups. transactionType filters by activity type (CARD_PURCHASE, CARD_DECLINE, CARD_AUTHORIZATION_REFUND, CARD_CREATION, DELETION, MOON_CREDIT_PURCHASE, TOP_UP); some activity types appear under a different type in the response (e.g. CARD_DECLINE entries have type: "DECLINE"). startDate/endDate are inclusive UTC calendar days (YYYY-MM-DD) and must be provided together; start_date/end_date are accepted as synonyms, so either spelling works (sending both spellings of the same bound with different values is a 400). The paging keys on this route are camelCase. If the activity feed is temporarily unavailable, the route returns 200 with an empty list.

Request

Authentication: your API key in the x-api-key header.

Path parameters

FieldTypeDescription
id requiredstring, uuidAccount UUID

Query parameters

FieldTypeDescription
currentPagenumberMin 1
current_pagenumberPage number, starting at 1 — the canonical spelling, accepted on every paginated endpoint and matching pagination.current_page in the response. currentPage means the same thing and keeps working; if both are sent, current_page wins.
perPagenumberMin 1, max 50
per_pagenumberMin 1, max 50 — the canonical spelling, accepted on every paginated endpoint. perPage means the same thing and keeps working; if both are sent, per_page wins.
startDatestring, dateInclusive UTC start day YYYY-MM-DD (requires endDate)
endDatestring, dateInclusive UTC end day YYYY-MM-DD (requires startDate)
start_datestring, dateSynonym of startDate. Use either spelling, not both.
end_datestring, dateSynonym of endDate. Use either spelling, not both.
transactionTypestringActivity type to filter by (see the operation description).One of: CARD_PURCHASE, CARD_DECLINE, CARD_AUTHORIZATION_REFUND, CARD_CREATION, DELETION, MOON_CREDIT_PURCHASE, TOP_UP

Example request

cURL

curl --request GET \
     --url 'https://api.themooncard.com/v2/api-gateway/accounts/8d2cd518-5ef2-4280-91e8-63b1a0e672e7/transactions' \
     --header 'x-api-key: YOUR_API_KEY'

Responses

200 Success
FieldTypeDescription
transactions requiredarray of object or object or object or object or object or object or object
transactions[].type requiredstringOne of: DECLINE
transactions[].data requiredobject
transactions[].data.id requiredstring
transactions[].data.datetime requiredstringISO-8601 timestamp with milliseconds, e.g. "2026-08-16T17:51:01.000Z".
transactions[].data.merchant requiredstring
transactions[].data.merchant_mid requiredstring, nullable
transactions[].data.amount requirednumber
transactions[].data.customer_friendly_description requiredstringWhy the authorization was declined, in customer-safe wording.
transactions[].data.card_public_id requiredstring
transactions[].data.card_id requiredintegerInternal. May change or be removed without notice — do not rely on it.
transactions[].data.card requiredobject
transactions[].data.card.public_id requiredstringCard id as exposed by the API.
transactions[].data.card.name requiredstring, nullable
transactions[].data.card.type requiredstring, nullable
transactions[].data.card.last_four requiredstringLast four digits of the card; empty string when unavailable.
pagination requiredobject
pagination.total requiredintegerTotal number of items across all pages.
pagination.last_page requiredintegerNumber of the last page (0 when there are no items).
pagination.prev_page requiredinteger, nullablePrevious page number, or null on the first page.
pagination.next_page requiredinteger, nullableNext page number, or null on the last page.
pagination.per_page requiredintegerPage size that was applied.
pagination.current_page requiredinteger1-based current page.
pagination.from requiredinteger1-based index of the first item on this page (0 when empty).
pagination.to requiredinteger1-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.

404 Error

Account not found or not owned by you.

The body is the standard error object: see Errors.

500 Error

Unexpected server error. Body is { message: "Internal server error", code: "INTERNAL_SERVER_ERROR" }.

The body is the standard error object: see Errors.

Last updated July 20, 2026