Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Gianluca-X/DigitalMoney/llms.txt

Use this file to discover all available pages before exploring further.

Fetch the full details of one specific card using both its own ID and the owning account ID. The service verifies that the card actually belongs to the specified account before returning data — if the cardId exists but is linked to a different account, the request is rejected. This double-key lookup prevents cross-account data leakage.

Endpoint

GET /accounts/{accountId}/cards/{cardId}
Base URL: http://localhost:8085

Authentication

A valid Bearer JWT is required. Pass it in the Authorization header as Authorization: Bearer <token>.

Path Parameters

accountId
long
required
The numeric identifier of the account that owns the card.
cardId
long
required
The numeric identifier of the specific card to retrieve.

Response

Returns a single CardOutDTO object on success (200 OK).

Response Fields

id
long
Auto-generated unique identifier for this card record.
number
string
Full card number stored in the system.
name
string
Card holder name as it appears on the card.
expiry
string
Card expiry in MM/YY format (e.g. "12/26").
cvc
string
Card security code (CVV/CVC).
accountId
long
The account this card is associated with.

Example Request

curl -X GET "http://localhost:8085/accounts/42/cards/1" \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiJ9..."

Example Response

{
  "id": 1,
  "number": "4111111111111111",
  "name": "Jane Doe",
  "expiry": "09/27",
  "cvc": "123",
  "accountId": 42
}

Error Responses

StatusExceptionCondition
400 Bad RequestPath variables are not valid long integers.
401 UnauthorizedMissing or expired Bearer token.
403 ForbiddenAccessDeniedExceptionThe card exists but belongs to a different account.
404 Not FoundResourceNotFoundExceptionNo card with the given cardId exists in the system.
If cardId belongs to a different account than accountId, the service raises an AccessDeniedException and the gateway returns 403 Forbidden. Never assume a card ID is globally accessible.

Build docs developers (and LLMs) love