curl "https://sandbox.api.prava.space/v1/listCards?customer_id=user_123&status=active" \
-H "Authorization: Bearer sk_test_..."
import requests
resp = requests.get(
"https://sandbox.api.prava.space/v1/listCards",
headers={"Authorization": "Bearer sk_test_..."},
params={"customer_id": "user_123", "status": "active"},
)
const resp = await fetch(
"https://sandbox.api.prava.space/v1/listCards?customer_id=user_123&status=active",
{
headers: {
Authorization: "Bearer sk_test_...",
},
}
);
{
"cards": [
{
"card_id": "card_1",
"card_last4": "4242",
"card_brand": "visa",
"card_exp_month": 12,
"card_exp_year": 2030,
"is_default": true,
"status": "active",
"created_at": "2026-05-01T10:00:00Z"
}
],
"count": 1
}
{
"error": { "code": "INVALID_REQUEST", "message": "Missing customer_id" }
}
{
"error": { "code": "CUSTOMER_NOT_FOUND", "message": "No customer for the given customer_id" }
}
Server-Side API
List Cards
Retrieve enrolled cards for a customer
GET
/
v1
/
listCards
curl "https://sandbox.api.prava.space/v1/listCards?customer_id=user_123&status=active" \
-H "Authorization: Bearer sk_test_..."
import requests
resp = requests.get(
"https://sandbox.api.prava.space/v1/listCards",
headers={"Authorization": "Bearer sk_test_..."},
params={"customer_id": "user_123", "status": "active"},
)
const resp = await fetch(
"https://sandbox.api.prava.space/v1/listCards?customer_id=user_123&status=active",
{
headers: {
Authorization: "Bearer sk_test_...",
},
}
);
{
"cards": [
{
"card_id": "card_1",
"card_last4": "4242",
"card_brand": "visa",
"card_exp_month": 12,
"card_exp_year": 2030,
"is_default": true,
"status": "active",
"created_at": "2026-05-01T10:00:00Z"
}
],
"count": 1
}
{
"error": { "code": "INVALID_REQUEST", "message": "Missing customer_id" }
}
{
"error": { "code": "CUSTOMER_NOT_FOUND", "message": "No customer for the given customer_id" }
}
Retrieve a customer’s enrolled cards. Only non-sensitive card metadata is returned — full PANs (the real card numbers) are never exposed.
GET /v1/listCards · Authenticated with your secret key.
Cards are scoped by
merchant_id (derived from your secret key) and the customer_id query
parameter.Query parameters
The customer to list cards for — the same value you passed as
user_id when creating the session.active (default) or all (include previously deleted cards for historical reference).true to include card_art_url and display metadata; otherwise those fields are null.Response
Show card properties
Show card properties
Card id — the same identifier as the SDK
enrollmentId from collectPAN().Whether this is the customer’s default card. Set it with Set Default Card.
Error responses
| Status | Code | Cause |
|---|---|---|
| 400 | INVALID_REQUEST | Missing customer_id query parameter |
| 401 | AUTH_1001 | Invalid API key |
| 401 | AUTH_1002 | Missing or invalid Authorization header |
| 404 | CUSTOMER_NOT_FOUND | No customer found for the given customer_id |
curl "https://sandbox.api.prava.space/v1/listCards?customer_id=user_123&status=active" \
-H "Authorization: Bearer sk_test_..."
import requests
resp = requests.get(
"https://sandbox.api.prava.space/v1/listCards",
headers={"Authorization": "Bearer sk_test_..."},
params={"customer_id": "user_123", "status": "active"},
)
const resp = await fetch(
"https://sandbox.api.prava.space/v1/listCards?customer_id=user_123&status=active",
{
headers: {
Authorization: "Bearer sk_test_...",
},
}
);
{
"cards": [
{
"card_id": "card_1",
"card_last4": "4242",
"card_brand": "visa",
"card_exp_month": 12,
"card_exp_year": 2030,
"is_default": true,
"status": "active",
"created_at": "2026-05-01T10:00:00Z"
}
],
"count": 1
}
{
"error": { "code": "INVALID_REQUEST", "message": "Missing customer_id" }
}
{
"error": { "code": "CUSTOMER_NOT_FOUND", "message": "No customer for the given customer_id" }
}