Skip to main content
GET
/
api
/
v3
/
admin
/
customers
/
{customer_id}
/
credit_cards
/
{id}
Spree Admin SDK
import { createAdminClient } from '@spree/admin-sdk'

const client = createAdminClient({
  baseUrl: 'https://your-store.com',
  secretKey: 'sk_xxx',
})

const card = await client.customers.creditCards.get('cus_UkLWZg9DAJ', 'cc_UkLWZg9DAJ')
{
  "id": "card_UkLWZg9DAJ",
  "brand": "visa",
  "last4": "1111",
  "month": 12,
  "year": 2027,
  "name": "Spree Commerce",
  "default": false,
  "gateway_payment_profile_id": null,
  "customer_id": "cus_UkLWZg9DAJ",
  "payment_method_id": "pm_UkLWZg9DAJ",
  "metadata": {},
  "created_at": "2026-05-24T17:36:46.077Z",
  "updated_at": "2026-05-24T17:36:46.077Z"
}

Documentation Index

Fetch the complete documentation index at: https://spreecommerce.org/docs/llms.txt

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

Authorizations

x-spree-api-key
string
header
required

Secret API key for admin access

Authorization
string
header
required

JWT token for admin user authentication

Headers

x-spree-api-key
string
required
Authorization
string
required

Path Parameters

customer_id
string
required
id
string
required

Query Parameters

expand
string

Comma-separated associations to expand (e.g., payment_method). Use dot notation for nested expand (max 4 levels).

fields
string

Comma-separated list of fields to include (e.g., brand,last4,month,year). id is always included.

Response

200 - application/json

credit card found