Skip to main content
GET
/
api
/
v3
/
store
/
customers
/
me
/
credit_cards
/
{id}
Spree SDK
import { createClient } from '@spree/sdk'

const client = createClient({
  baseUrl: 'https://your-store.com',
  publishableKey: '<api-key>',
})

const card = await client.customer.creditCards.get('card_abc123', {
  bearerToken: '<token>',
})
{
  "id": "card_UkLWZg9DAJ",
  "brand": "visa",
  "last4": "1111",
  "month": 12,
  "year": 2027,
  "name": "Spree Commerce",
  "default": false,
  "gateway_payment_profile_id": null
}

Authorizations

x-spree-api-key
string
header
required

Publishable API key for store access

Authorization
string
header
required

JWT token for authenticated customers

Headers

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

Path Parameters

id
string
required

Query Parameters

fields
string

Comma-separated list of fields to include (e.g., name,slug,price). id is always included.

Response

credit card found

id
string
required
brand
string
required
last4
string
required
month
number
required
year
number
required
name
string | null
required
default
boolean
required
gateway_payment_profile_id
string | null
required