Card Details

List cards, and retrieve PAN, expiry, CVV and PIN behind a wallet-signature confirmation.

Before You Start

Read the following guides before proceeding:

GuideWhy
Getting StartedPlatform overview and setup
Api BasicsRequired headers and request configuration
AuthenticationHow to obtain the corporation token
PermissionsCard visibility depends on the caller's permissions
Issuing a CardWhere {cardId} comes from
Action Confirmation SignaturesHow to get the action token

Overview

Card data splits in two. The card record — status, format, limits, delivery address, masked digits — is
returned by the card list. The sensitive values — PAN, expiry, CVV and PIN — are behind a second gate:
each read requires a short-lived action token, obtained by signing a sentence with the employee's wallet.


List Cards

GET /api/v1/cards

Requires CardSu or CardView.

GET /api/v3/cards and GET /api/v3/cards/{cardId} return the same card objects across every chain the
corporation holds cards on — see Read the Issued Card.

Query parameters:

ParameterDescription
employee_idReturn only the cards linked to this employee. Only honoured for card administrators
page_number0-indexed page number — the first page is 0. Sending 1 skips the first page
page_sizePage size

Who Sees What

Caller holdsSeesemployee_id filter
Su or CardSuEvery card in the corporationHonoured. The employee must belong to the corporation
CardView onlyOnly the cards linked to their own employee recordSilently ignored

A CardView-only caller that sends employee_id gets their own cards back, with no error. The
filter is dropped, the response is 200, and it looks like the target employee holds exactly the
caller's cards. Do not build a team overview on CardView alone — it needs CardSu.

A card issued without employee_id is linked to nobody. It is invisible to every non-administrator
and cannot be linked afterwards — there is no link endpoint.

Response:

{
  "data": [
    {
      "id": "64120850-73a1-4df5-a074-d463258c9deb",
      "card_wallet_address": "0xAAFF0821A09A1Aac28B72dD3Ff410A7ea5FEb874",
      "status": "Active",
      "status_reason": "",
      "previous_status": "NotActivated",
      "created_at": "2024-01-01T10:00:00Z",
      "updated_at": "2024-01-01T10:30:00Z",
      "card_data": {
        "name_on_card": "Alex Grey",
        "payment_system": "Visa",
        "card_number_last_4": "5678",
        "expiry_date": "01/28",
        "format": "Virtual",
        "card_name": "Marketing team card",
        "design": "WirexBlack",
        "card_program": "WIREX_ATM_EU",
        "region": "Europe"
      },
      "limit": {
        "daily_limit": 1000.0,
        "daily_usage": 200.0,
        "monthly_limit": 10000.0,
        "monthly_usage": 2000.0,
        "transaction_limit": 500.0,
        "currency": "USD"
      },
      "delivery_address": {
        "line1": "10 Downing Street",
        "line2": "Flat 2",
        "city": "London",
        "state": "",
        "zip_code": "SW1A 2AA",
        "country": "GB"
      },
      "allowed_actions": [
        { "type": "Block", "relative_path": "/api/v1/cards/:cardId/block" },
        { "type": "SetLimit", "relative_path": "/api/v1/cards/:cardId/limit" },
        { "type": "GetDetails", "relative_path": "/api/v1/cards/:cardId/details" },
        { "type": "GetCvv", "relative_path": "/api/v1/cards/:cardId/cvv" },
        { "type": "GetPin", "relative_path": "/api/v1/cards/:cardId/pin" },
        { "type": "Close", "relative_path": "/api/v1/cards/:cardId/close" }
      ]
    }
  ]
}
FieldDescription
idCard id — the {cardId} path parameter everywhere else
card_wallet_addressThe card's on-chain address
statusRequested, NotActivated, Active, Blocked, Closed
status_reasonShort reason for the current status, e.g. User
previous_statusStatus before the current one. Absent for a card that has never transitioned
card_data.name_on_cardName embossed on the card
card_data.payment_systemVisa or MasterCard
card_data.card_number_first_4First 4 digits. Present only while Requested or NotActivated
card_data.card_number_last_4Last 4 digits. Present once past Requested and NotActivated
card_data.expiry_dateMM/YY on the list. Present once past Requested and NotActivated. The details call in Step 2 returns MM/YYYY — do not compare the two strings directly
card_data.formatPlastic, Virtual or Metal
card_data.card_nameDisplay name
card_data.designCard design the card was ordered with. Omitted when empty
card_data.card_programCard program the card was issued on. Omitted when empty
card_data.regionIssuing region, e.g. GB or Europe. Not carried in the card webhook
limitCurrent limits and usage — see Managing a Card
delivery_addressShipping address for a plastic card. Note zip_code, not postal_code
allowed_actions[]Actions permitted in the current status, with the endpoint for each

allowed_actions reflects card status only. It does not account for the caller's permissions: a
CardView-only employee still sees Close listed on an Active card and gets 403 when they call it.

Code

const response = await fetch(`${baseUrl}/api/v1/cards?page_number=0&page_size=25`, {
  headers: { 'Authorization': `Bearer ${corporationToken}` }
});
const { data: cards } = await response.json();
response = requests.get(
    f"{base_url}/api/v1/cards",
    headers={"Authorization": f"Bearer {corporation_token}"},
    params={"page_number": 0, "page_size": 25},
)
cards = response.json()["data"]
req, _ := http.NewRequest("GET", baseURL+"/api/v1/cards?page_number=0&page_size=25", nil)
req.Header.Set("Authorization", "Bearer "+corporationToken)

resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()

var cardsResp struct {
    Data []CardResponse `json:"data"`
}
json.NewDecoder(resp.Body).Decode(&cardsResp)

There is no endpoint that returns a single card by id. Read the list and filter on id.


Reading Sensitive Card Data

PAN, expiry, CVV and PIN each require an action token: a short-lived confirmation that the employee
holding the corporation token also controls the wallet behind it.

Action token (GetCardDetails) → POST /api/v1/cards/{cardId}/details | /cvv | /pin

Step 1: Get an Action Token

Get an action token for action_type GetCardDetails as described in
Action Confirmation Signatures.

One GetCardDetails token serves all three endpoints — PAN and expiry, CVV, and PIN. A token for
any other action_type is refused by all three with 400 and issue: invalid_purpose.

Step 2: Read the Data

Each endpoint requires CardSu or CardViewDetails, and the card must be Active.

Get PAN and Expiry

POST /api/v1/cards/{cardId}/details

Request body:

{
  "action_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Response:

{
  "card_number": "4111111111111111",
  "expiry_date": "01/2028"
}
FieldDescription
card_numberFull PAN
expiry_dateExpiry date, MM/YYYY

Get CVV

POST /api/v1/cards/{cardId}/cvv

Response:

{
  "cvv": "123"
}

Get PIN

POST /api/v1/cards/{cardId}/pin

Response:

{
  "pin": "1234"
}

Code

// actionToken: from Action Confirmation Signatures, action_type GetCardDetails
const detailsResponse = await fetch(`${baseUrl}/api/v1/cards/${cardId}/details`, {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${corporationToken}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({ action_token: actionToken })
});
const details = await detailsResponse.json();
# action_token: from Action Confirmation Signatures, action_type GetCardDetails
details_response = requests.post(
    f"{base_url}/api/v1/cards/{card_id}/details",
    headers={
        "Authorization": f"Bearer {corporation_token}",
        "Content-Type": "application/json",
    },
    json={"action_token": action_token},
)
details = details_response.json()
// actionToken: from Action Confirmation Signatures, action_type GetCardDetails
detailsBody, _ := json.Marshal(map[string]string{"action_token": actionToken})
detailsReq, _ := http.NewRequest("POST", baseURL+"/api/v1/cards/"+cardId+"/details", bytes.NewBuffer(detailsBody))
detailsReq.Header.Set("Authorization", "Bearer "+corporationToken)
detailsReq.Header.Set("Content-Type", "application/json")

detailsResp, _ := http.DefaultClient.Do(detailsReq)
defer detailsResp.Body.Close()

Your Responsibilities

  • PAN, CVV and PIN cross your systems in clear text. Do not log, cache or persist them.
  • The action token authorises a read. Treat it as the data it unlocks.
  • The signing key belongs to the employee. An integration that signs on the employee's behalf is
    holding their credential — scope and store it accordingly.

Error Handling

{
  "error_reason": "ErrorInvalidStatus",
  "error_description": "Action is not allowed",
  "error_category": {
    "category": "CategoryValidationFailure",
    "http_status_code": 400
  },
  "error_details": [
    { "key": "action_type", "details": "GetDetails" },
    { "key": "value", "details": "Blocked" }
  ]
}

Errors of getting the action token are listed in
Action Confirmation Signatures.

Validation Errors (400)

Error ReasonError DetailsDescriptionResolution
ErrorInvalidStatusaction_type: GetDetails, value: <status>Card status does not allow details retrievalThe card is not Active
ErrorInvalidStatusaction_type: GetCvvCard status does not allow CVV retrievalThe card is not Active
ErrorInvalidStatusaction_type: GetPinCard status does not allow PIN retrievalThe card is not Active
ErrorMissingFieldaction_token: missingaction token is requiredSend action_token in the body
ErrorExpiredaction_token: expiredThe action token is more than 5 minutes oldMint a new token
ErrorInvalidFieldaction_token: invalid_tokenThe action token is not a JWTPass the token value from the signature exchange unchanged
ErrorInvalidFieldaction_token: invalid_purposeThe action token was minted for a different actionMint the token with action_type GetCardDetails

Server Errors (500)

Error ReasonDescriptionResolution
ErrorGeneralFailed to get card CVVThe card provider rejected the read. A mis-scoped token is refused earlier, as a 400 — this is the provider declining an otherwise valid request. Retry with a fresh token, then contact Wirex

Did this page help you?