Get card transaction by id
GET /v1/api-gateway/card/{card_id}/transactions/{transaction_id}
Returns a single transaction entry (no envelope). type tells you which data shape to expect.
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). |
transaction_ required | string, uuid | Transaction UUID (data.id of an entry in the card transaction feed). |
Example request
cURL
curl --request GET \
--url 'https://api.themooncard.com/v1/api-gateway/card/7c9e6679-7425-40de-944b-e07fc1f90ae7/transactions/2f1a6b3c-4d5e-4f60-8a7b-9c0d1e2f3a4b' \
--header 'x-api-key: YOUR_API_KEY'Responses
200 Success
| Field | Type | Description |
|---|---|---|
type required | string | One of: DECLINE |
data required | object | |
data. required | string | |
data. required | string | ISO-8601 timestamp with milliseconds, e.g. "2026-08-16T17:51:01.000Z". |
data. required | string | |
data. required | string, nullable | |
data. required | number | |
data. required | string | Why the authorization was declined, in customer-safe wording. |
data. required | string | |
data. required | integer | Internal. May change or be removed without notice — do not rely on it. |
data. required | object | |
data. required | string | Card id as exposed by the API. |
data. required | string, nullable | |
data. required | string, nullable | |
data. required | string | Last 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 this organization (CARD_), or the transaction does not belong to it (TRANSACTION_).
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 July 20, 2026