---
updatedAt: 2025-11-17T20:14:54.000Z
agentTools:
  projectIndex: https://developers.bluesnap.com/v8976-Extended/llms.txt
---

# Cart Calculation

The Cart Calculation request enables you to perform updates to the checkout price prior to completing a transaction.  This request is useful when your shopper has added a coupon and you want to provide the updated total immediately for your shopper. Other possible use cases for this service are when you need to display the impact of tax or shipping to your shoppers.

### Request Content

`cart-info`    <span style={{ color: "#F37500" }}>**required**</span>, contains the following properties (see [cart-info](https://developers.bluesnap.com/reference/cart-info)):

| Property      | Type        | Required                                                                                    |
| :------------ | :---------- | :------------------------------------------------------------------------------------------ |
| `cart-params` | *container* | <span style={{ color: "#F37500" }}>**required**</span> (see [cart-params](https://developers.bluesnap.com/reference/cart-params)) |
| `cart`        | *container* | <span style={{ color: "#F37500" }}>**required**</span> (see [cart](https://developers.bluesnap.com/reference/cart))               |
| `sku`         | *container* | <span style={{ color: "#F37500" }}>**required**</span> (see [sku](https://developers.bluesnap.com/reference/sku))                 |
| `coupons`     | *integer*   | optional                                                                                    |

### Response Details

If successful, the response HTTP status code is 200 OK.

## Examples

### Request Examples

```xml Cart calculation with coupons
curl -v -X POST https://sandbox.bluesnap.com/services/2/tools/cart-calculation \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '

<cart-info xmlns="http://ws.plimus.com">
<cart-params>
<currency>USD</currency>
</cart-params>
<cart>
<cart-item>
<sku>
<sku-id>2180434</sku-id>
</sku>
<quantity>1</quantity>
</cart-item>
<coupons>
<coupon>ccv20</coupon>
</coupons>
</cart>
</cart-info>
```
```xml Cart calculation with tax
curl -v -X POST https://sandbox.bluesnap.com/services/2/tools/cart-calculation \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '

<cart-info xmlns="http://ws.plimus.com">
<cart-params>
<currency>USD</currency>
<country>US</country>
<state>CA</state>
<zip>12345</zip>
</cart-params>
<cart>
<cart-item>
<sku>
<sku-id>2176834</sku-id>
</sku>
<quantity>1</quantity>
</cart-item>
</cart>
</cart-info>
```

### Response Examples

```xml Response with coupon amounts
curl -v -X POST https://sandbox.bluesnap.com/services/2/tools/cart-calculation \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<cart-info xmlns="http://ws.plimus.com">
<cart>
<charged-currency>USD</charged-currency>
<cart-item>
<sku>
<sku-id>2180434</sku-id>
</sku>
<quantity>1</quantity>
<item-sub-total>20.00</item-sub-total>
<item-coupon-total>10.00</item-coupon-total>
<item-total>10.00</item-total>
</cart-item>
<coupons>
<coupons-total>10.00</coupons-total>
</coupons>
<tax>0.00</tax>
<tax-rate>0</tax-rate>
<total-cart-cost>10.00</total-cart-cost>
</cart>
</cart-info>'
```
```xml Response with tax
<!-- NOTE: Actual taxes may differ from this example -->

<!-- Response begins below -->
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cart-info xmlns="http://ws.plimus.com">
<cart>
<charged-currency>USD</charged-currency>
<cart-item>
<sku>
<sku-id>2176834</sku-id>
</sku>
<quantity>1</quantity>
<item-sub-total>49.99</item-sub-total>
<item-coupon-total>0.00</item-coupon-total>
<item-total>49.99</item-total>
</cart-item>
<coupons>
<coupons-total>0.00</coupons-total>
</coupons>
<tax>4.12</tax>
<tax-rate>8.25</tax-rate>
<total-cart-cost>54.11</total-cart-cost>
</cart>
</cart-info>
```