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:
| Guide | Why |
|---|---|
| Getting Started | Platform overview and setup |
| Api Basics | Required headers and request configuration |
| Authentication | How to obtain the corporation token |
| Permissions | Card visibility depends on the caller's permissions |
| Issuing a Card | Where {cardId} comes from |
| Action Confirmation Signatures | How 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:
| Parameter | Description |
|---|---|
employee_id | Return only the cards linked to this employee. Only honoured for card administrators |
page_number | 0-indexed page number — the first page is 0. Sending 1 skips the first page |
page_size | Page size |
Who Sees What
| Caller holds | Sees | employee_id filter |
|---|---|---|
Su or CardSu | Every card in the corporation | Honoured. The employee must belong to the corporation |
CardView only | Only the cards linked to their own employee record | Silently ignored |
A
CardView-only caller that sendsemployee_idgets their own cards back, with no error. The
filter is dropped, the response is200, and it looks like the target employee holds exactly the
caller's cards. Do not build a team overview onCardViewalone — it needsCardSu.
A card issued without
employee_idis 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" }
]
}
]
}| Field | Description |
|---|---|
id | Card id — the {cardId} path parameter everywhere else |
card_wallet_address | The card's on-chain address |
status | Requested, NotActivated, Active, Blocked, Closed |
status_reason | Short reason for the current status, e.g. User |
previous_status | Status before the current one. Absent for a card that has never transitioned |
card_data.name_on_card | Name embossed on the card |
card_data.payment_system | Visa or MasterCard |
card_data.card_number_first_4 | First 4 digits. Present only while Requested or NotActivated |
card_data.card_number_last_4 | Last 4 digits. Present once past Requested and NotActivated |
card_data.expiry_date | MM/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.format | Plastic, Virtual or Metal |
card_data.card_name | Display name |
card_data.design | Card design the card was ordered with. Omitted when empty |
card_data.card_program | Card program the card was issued on. Omitted when empty |
card_data.region | Issuing region, e.g. GB or Europe. Not carried in the card webhook |
limit | Current limits and usage — see Managing a Card |
delivery_address | Shipping 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
GetCardDetailstoken serves all three endpoints — PAN and expiry, CVV, and PIN. A token for
any otheraction_typeis refused by all three with400andissue: 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"
}| Field | Description |
|---|---|
card_number | Full PAN |
expiry_date | Expiry 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 Reason | Error Details | Description | Resolution |
|---|---|---|---|
ErrorInvalidStatus | action_type: GetDetails, value: <status> | Card status does not allow details retrieval | The card is not Active |
ErrorInvalidStatus | action_type: GetCvv | Card status does not allow CVV retrieval | The card is not Active |
ErrorInvalidStatus | action_type: GetPin | Card status does not allow PIN retrieval | The card is not Active |
ErrorMissingField | action_token: missing | action token is required | Send action_token in the body |
ErrorExpired | action_token: expired | The action token is more than 5 minutes old | Mint a new token |
ErrorInvalidField | action_token: invalid_token | The action token is not a JWT | Pass the token value from the signature exchange unchanged |
ErrorInvalidField | action_token: invalid_purpose | The action token was minted for a different action | Mint the token with action_type GetCardDetails |
Server Errors (500)
| Error Reason | Description | Resolution |
|---|---|---|
ErrorGeneral | Failed to get card CVV | The 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 |
Updated 15 days ago

