LogoLogo
Build appsContact API support
Orders
  • Build apps
  • Site Templates
  • API Reference
  • Changelog
Orders
  • Orders management overview
  • Get order details
    • Customer data in order details
    • Product prices in order details
    • Discounts in order details
  • Taxes in order details
  • Create orders with API
    • Place new order with API
    • Calculate order details
  • Place a new order from the abandoned cart
  • Sync orders with external services
    • Sync orders manually
    • Automated orders sync

Lightspeed® 2025

On this page

Was this helpful?

Taxes in order details

PreviousDiscounts in order detailsNextPlace new order with API

Last updated 2 months ago

Was this helpful?

Get the following data about the taxes applied to the order with Ecwid API:

  • Order total (final price) and subtotal (price of products in the cart) without taxes

  • Total tax applied to the order.

  • Details on customer tax exemption.

  • Detailed information on taxes applied to specific products in the order.

  • Details on taxes applied to order's shipping costs.

Configured order API call

You can filter out everything in the order details except for the tax details with the responseFields query param.

Request example:

GET /api/v3/STOREID/orders/ORDERID?responseFields=total,totalWithoutTax,subtotal,subtotalWithoutTax,tax,customerTaxExempt,customerTaxId,customerTaxIdValid,reversedTaxApplied,items(id,price,priceWithoutTax,tax,taxable,taxes),taxesOnShipping,pricesIncludeTax HTTP/1.1
Host: app.ecwid.com
Authorization: Bearer secret_token

Change STOREID with your store ID, ORDERID with the order ID (), and the secret_token with the secret access token of your app.

Response examples:

{
    "total": 101,
    "totalWithoutTax": 93.64,
    "subtotal": 100,
    "subtotalWithoutTax": 92.64,
    "tax": 7.36,
    "customerTaxExempt": false,
    "customerTaxId": "",
    "customerTaxIdValid": false,
    "reversedTaxApplied": false,
    "items": [
        {
            "id": 1826596664,
            "price": 50,
            "priceWithoutTax": 46.32,
            "tax": 7.36,
            "taxable": true,
            "taxes": [
                {
                    "name": "10% Tax",
                    "value": 10,
                    "total": 7.36,
                    "taxOnDiscountedSubtotal": 7.36,
                    "taxOnShipping": 0,
                    "includeInPrice": true,
                    "sourceTaxRateId": 947976181,
                    "sourceTaxRateType": "MANUAL",
                    "taxClassName": "Standard rate",
                    "taxClassCode": "default"
                }
            ]
        }
    ],
    "taxesOnShipping": [],
    "pricesIncludeTax": true
}

If priceWithoutTax < price, the product has taxes included in the price. Check the pricesIncludeTax value and process the order accordingly.

where:

  • total - Total order cost with everything calculated.

  • totalWithoutTax - Total order cost without taxes applied.

  • subtotal - Sum of all product prices before any fees or discounts.

  • subtotalWithoutTax - Sum of all product prices before any fees, discounts, and taxes apply.

  • tax - Total sum of all taxes applied to the order.

  • items.id - Internal product ID for API calls.

  • items.price - Product price in the order that includes taxes.

  • items.priceWithoutTax - Product price in the order without taxes.

  • items.taxable - Base product price as in the Ecwid admin without any price modifiers from the order applied.

  • items.taxes - If true, taxes are applied to the product.

  • taxesOnShipping - List with details on taxes applied to order's shipping costs.

  • pricesIncludeTax - If true, store uses gross prices, and tax is included in the product price. If false, store uses net prices, and taxes are only added to the product prices at the checkout.

find order ID