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

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

const card = await client.store.customer.creditCards.get('cc_abc123', {
  bearerToken: '<token>',
})
{
  "id": "card_UkLWZg9DAJ",
  "cc_type": "visa",
  "last_digits": "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

Response

credit card found

id
string
required
cc_type
string
required
last_digits
string
required
month
number
required
year
number
required
name
string | null
required
default
boolean
required
gateway_payment_profile_id
string | null
required