Delete a cart
Deletes/abandons the cart.
DELETE
Spree SDK
Authorizations
Publishable API key for store access
JWT token for authenticated customers
Path Parameters
Cart prefixed ID
Response
204
cart deleted
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Deletes/abandons the cart.
import { createClient } from '@spree/sdk'
const client = createClient({
baseUrl: 'https://your-store.com',
publishableKey: '<api-key>',
})
await client.carts.delete('cart_abc123', {
token: '<token>',
})curl --request DELETE \
--url http://{defaultHost}/api/v3/store/carts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'x-spree-api-key: <api-key>'Publishable API key for store access
JWT token for authenticated customers
Cart prefixed ID
cart deleted
Was this page helpful?
import { createClient } from '@spree/sdk'
const client = createClient({
baseUrl: 'https://your-store.com',
publishableKey: '<api-key>',
})
await client.carts.delete('cart_abc123', {
token: '<token>',
})curl --request DELETE \
--url http://{defaultHost}/api/v3/store/carts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'x-spree-api-key: <api-key>'