Returns all saved credit cards for the authenticated customer
JavaScript
import { createClient } from '@spree/sdk' const client = createClient({ baseUrl: 'https://your-store.com', publishableKey: '<api-key>', }) const cards = await client.customer.creditCards.list({}, { bearerToken: '<token>', })
{ "data": [ { "id": "card_UkLWZg9DAJ", "brand": "visa", "last4": "1111", "month": 12, "year": 2027, "name": "Spree Commerce", "default": false, "gateway_payment_profile_id": null } ], "meta": { "page": 1, "limit": 25, "count": 1, "pages": 1, "from": 1, "to": 1, "in": 1, "previous": null, "next": null } }
Publishable API key for store access
JWT token for authenticated customers
Comma-separated list of fields to include (e.g., name,slug,price). id is always included.
credit cards found
Show child attributes
Was this page helpful?