Get Checkout Estimates

Computes a pre-checkout cost estimate for a given merchant, destination, and list of items — including subtotal, shipping, tax, and total. Useful for surfacing accurate pricing to users before initiating a full checkout.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Compute a pre-checkout cost estimate for a given merchant, destination, and list of items — including subtotal, shipping, and tax — without initiating a full checkout. Works across CartAI's merchant network including Shopify stores and major retailers.

When to Use This Endpoint

Use /checkout-estimates to show users an accurate order total before they commit to a purchase. It is a read-only operation — no cart is created and no order is placed.

Use caseRecommended approach
Show order total before checkoutCall /checkout-estimates and display total to the user
Surface itemised tax and shippingBreak down tax, shipping, and subtotal from the response
Compare shipping costs across destinationsCall with different destination.zip values
Validate pricing before calling POST /checkoutConfirm subtotal matches expected unitPrice × quantity

Authentication

Every request must include your API key in the request header.

x-api-key: YOUR_API_KEY_HERE
  • Never embed your API key in client-side code. Always call this endpoint from your backend.

Request Body

FieldTypeRequiredDescription
merchantstring✅ YesName of the merchant (e.g. "Natori").
destinationobject✅ YesDelivery destination. See destination below.
itemsarray✅ YesList of items to estimate. See items[] below.

destination

FieldTypeRequiredDescription
zipstring✅ YesDestination ZIP code.

items[]

FieldTypeRequiredDescription
urlstring✅ YesProduct page URL on the merchant's site.
quantityinteger✅ YesNumber of units.
unitPricenumber✅ YesPrice per unit, used to compute lineSubtotal.
categorystring✅ YesProduct category (e.g. "clothing"). Used for tax calculation.

Example Request

curl --location 'https://api.cartai.ai/checkout-estimates' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <your-api-key>' \
--data '{
  "merchant": "Natori",
  "destination": {
    "zip": "75001"
  },
  "items": [
    {
      "url": "https://www.natori.com/products/feathers-plunge-t-shirt-bra-black",
      "quantity": 1,
      "unitPrice": 72,
      "category": "clothing"
    }
  ]
}'

Response Schema

A successful 200 response returns a JSON object with the following structure.

Top-level fields

FieldTypeDescription
statusstring"success" when the estimate was computed.
messagestringHuman-readable summary (e.g. "Estimate computed").
dataobjectContains the full cost breakdown. See data below.

data

FieldTypeDescription
currencystringISO 4217 currency code (e.g. "USD").
merchantstringMerchant name echoed from the request.
destinationobjectResolved destination including state. See destination below.
subtotalnumberSum of all lineSubtotal values before tax and shipping.
shippingnumberEstimated shipping cost. 0.0 when free shipping applies.
shippingKnownbooleantrue if shipping cost was successfully determined. false if CartAI could not resolve it.
taxnumberEstimated tax for the order, calculated based on destination and item categories.
totalnumberFinal estimated order total: subtotal + shipping + tax.
itemsarray of objectsPer-item cost breakdown. See items[] below.

destination (response)

FieldTypeDescription
zipstringZIP code echoed from the request.
statestringState resolved from the ZIP code (e.g. "TX").

items[] (response)

FieldTypeDescription
categorystringProduct category echoed from the request.
unitPricenumberPrice per unit echoed from the request.
quantityintegerQuantity echoed from the request.
lineSubtotalnumberunitPrice × quantity for this line item.
taxnumberTax estimated for this line item.

Example Response

{
  "status": "success",
  "message": "Estimate computed",
  "data": {
    "currency": "USD",
    "merchant": "Natori",
    "destination": {
      "zip": "75001",
      "state": "TX"
    },
    "subtotal": 72.0,
    "shipping": 0.0,
    "shippingKnown": true,
    "tax": 5.94,
    "total": 77.94,
    "items": [
      {
        "category": "clothing",
        "unitPrice": 72.0,
        "quantity": 1,
        "lineSubtotal": 72.0,
        "tax": 5.94
      }
    ]
  }
}

Notes

  • When shippingKnown is false, shipping will be 0.0 — treat the estimate as incomplete and avoid displaying it as the final total.
  • tax is estimated based on destination ZIP and item category. The actual tax charged at checkout may differ slightly depending on the merchant's tax configuration.
  • unitPrice in the request is used as-is for the estimate. Pass the price from /product/details to ensure accuracy.
Body Params
string
required

Name of the merchant to estimate costs for

destination
object
required
items
array of objects
required
items*
Headers
string
required
Responses

400

Bad Request

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json