Delete a credit card
Removes a saved credit card from the customer account
DELETE
Spree SDK
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Removes a saved credit card from the customer account
import { createClient } from '@spree/sdk'
const client = createClient({
baseUrl: 'https://your-store.com',
publishableKey: '<api-key>',
})
await client.customer.creditCards.delete('card_abc123', {
token: '<token>',
})curl --request DELETE \
--url http://{defaultHost}/api/v3/store/customers/me/credit_cards/{id} \
--header 'Authorization: Bearer <token>' \
--header 'x-spree-api-key: <api-key>'{
"error": {
"code": "record_not_found",
"message": "Credit card not found"
}
}Was this page helpful?
import { createClient } from '@spree/sdk'
const client = createClient({
baseUrl: 'https://your-store.com',
publishableKey: '<api-key>',
})
await client.customer.creditCards.delete('card_abc123', {
token: '<token>',
})curl --request DELETE \
--url http://{defaultHost}/api/v3/store/customers/me/credit_cards/{id} \
--header 'Authorization: Bearer <token>' \
--header 'x-spree-api-key: <api-key>'{
"error": {
"code": "record_not_found",
"message": "Credit card not found"
}
}