Browse the docs

Get card transaction by id

GET /v2/api-gateway/cards/{card_id}/transactions/{transaction_id}

Returns a single transaction entry (not wrapped in a list). The data shape depends on type.

Request

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

Path parameters

FieldTypeDescription
card_id requiredstring, uuidCard UUID (the card id returned by the card endpoints).
transaction_id requiredstring, uuidTransaction UUID (data.id of an entry in the card transaction feed).

Example request

cURL

curl --request GET \
     --url 'https://api.themooncard.com/v2/api-gateway/cards/7c9e6679-7425-40de-944b-e07fc1f90ae7/transactions/2f1a6b3c-4d5e-4f60-8a7b-9c0d1e2f3a4b' \
     --header 'x-api-key: YOUR_API_KEY'

Responses

200 Success

One transaction entry; data varies by type.

FieldTypeDescription
type requiredstringOne of: DECLINE
data requiredobject
data.id requiredstring
data.datetime requiredstringISO-8601 timestamp with milliseconds, e.g. "2026-08-16T17:51:01.000Z".
data.merchant requiredstring
data.merchant_mid requiredstring, nullable
data.amount requirednumber
data.customer_friendly_description requiredstringWhy the authorization was declined, in customer-safe wording.
data.card_public_id requiredstring
data.card_id requiredintegerInternal. May change or be removed without notice — do not rely on it.
data.card requiredobject
data.card.public_id requiredstringCard id as exposed by the API.
data.card.name requiredstring, nullable
data.card.type requiredstring, nullable
data.card.last_four requiredstringLast four digits of the card; empty string when unavailable.

JSON

{
  "type": "DECLINE",
  "data": {
    "id": "8b7a6c5d-4e3f-4021-9a8b-7c6d5e4f3a2b",
    "datetime": "2026-08-16T18:02:44.000Z",
    "merchant": "ACME SUPERSTORE",
    "merchant_mid": "445566778899",
    "amount": 80,
    "customer_friendly_description": "Insufficient funds on the card",
    "card_public_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "card_id": 918273,
    "card": {
      "public_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
      "name": "Jane Doe",
      "type": "VIRTUAL",
      "last_four": "1111"
    }
  }
}
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

Card not found or not owned by you (CARD_NOT_FOUND), or no such transaction on this card (TRANSACTION_NOT_FOUND).

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 August 16, 2026