Returns all saved credit cards for the authenticated customer
JavaScript
import { createSpreeClient } from '@spree/sdk' const client = createSpreeClient({ baseUrl: 'https://your-store.com', publishableKey: '<api-key>', }) const cards = await client.store.customer.creditCards.list({}, { bearerToken: '<token>', })
{ "data": [ { "id": "card_UkLWZg9DAJ", "cc_type": "visa", "last_digits": "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
credit cards found
Show child attributes
Was this page helpful?