Removes a saved credit card from the customer account
JavaScript
import { createSpreeClient } from '@spree/sdk' const client = createSpreeClient({ baseUrl: 'https://your-store.com', publishableKey: '<api-key>', }) await client.store.customer.creditCards.delete('cc_abc123', { bearerToken: '<token>', })
{ "error": { "code": "record_not_found", "message": "Credit card not found" } }
Publishable API key for store access
JWT token for authenticated customers
credit card deleted
Was this page helpful?