Skip to main content

Fetch cart with totals and tax breakdown

Retrieve the full cart including line items, subtotals, shipping costs, tax levels, and the grand total.

Query

query GetCart($cartId: String!) {
cart(id: $cartId) {
cartId
items {
itemId
productId
quantity
price
priceNet
totalPrice
totalPriceNet
}
total {
subTotal
subTotalNet
totalGross
totalNet
discount
discountNet
}
taxLevels {
taxPercentage
price
}
postageData {
method
price
priceNet
carrier
}
actionCode
}
}

Variables

{
"cartId": "019c77b7-565f-7ea0-8660-42bc63a7f728"
}

Response

{
"data": {
"cart": {
"cartId": "019c77b7-565f-7ea0-8660-42bc63a7f728",
"items": [
{
"itemId": "019c77b7-72a0-75fe-8a20-b98927d76652",
"productId": 25,
"quantity": 3,
"price": 1595.04,
"priceNet": 1929.9984,
"totalPrice": 4785.12,
"totalPriceNet": 5789.99
}
],
"total": {
"subTotal": 4785.12,
"subTotalNet": 5789.99,
"totalGross": 5120.12,
"totalNet": 6195.34,
"discount": 0,
"discountNet": 0
},
"taxLevels": [
{ "taxPercentage": 21, "price": 1075.22 }
],
"postageData": {
"method": "DELIVERY",
"price": 300,
"priceNet": 363,
"carrier": null
},
"actionCode": ""
}
}
}

How it works

total.subTotal is the sum of all line items excluding tax and shipping. total.totalGross adds shipping and payment costs but excludes tax, while total.totalNet is the final amount including tax. The taxLevels array breaks down the tax per rate — useful for displaying a tax summary when multiple VAT rates apply. The price / priceNet naming follows Propeller convention: price is gross (excluding tax), priceNet is net (including tax).

See also