DashForDevsDocs
DocsNewsAPI v1
dashfordevs.comSign in

© 2026 DashForDevs

DocsNewsdashfordevs.comLegalStatus
DocsTaxTax Rates
Introduction
Getting Started
Authentication
Products
Categories
Cart
Checkout
Blog
Reviews
Webhooks
Customers
Orders
Inventory
Shipping
Discounts
Affiliates
Email
Media & Files
Analytics & Tracking
Locations
Tax
Tax RatesTax Calculation
Global Data
SEO
Error Handling
Geography
Finance
Automations
Page Types
Surveys
Billing & Subscriptions
Storefront Payments
SDK Reference
REST API
Storefront Architecture
Notifications
Security
Team & Permissions
Migrations & Import
Calendar & Appointments
Contact Forms
AI Bots
Dashboard API
Deployment
Changelog
Troubleshooting
Recipes
CLI & Deployment
Image Pipeline
White-label Platforms
Records Engine
Platform Modules
Platform Security
Site Keys & Client Sites
Use Cases
Operations

Tax Rates

Configure state-level tax rates.

Updated March 29, 2026

On this page
  • Overview
  • Calculating Tax
  • Quick Cart Tax
  • Legality Check
  • REST API
  • Next Steps

Overview

DashForDevs supports state-level tax calculation. Tax rates are configured per state in the dashboard.

Calculating Tax

typescript
import dash from "@/lib/dash"

const result = await dash.tax.calculate({
  state: "TX",
  cart_id: dash.cart.cartId,
})

// result = {
//   state: "TX",
//   state_name: "Texas",
//   is_legal: true,
//   total_tax: "5.25",
//   breakdown: [{ item: "...", tax: "2.63" }, ...],
//   illegal_items: []
// }

Quick Cart Tax

typescript
const result = await dash.tax.calculateForCart("TX")
const taxAmount = dash.tax.getTotal(result)  // 5.25 (number)

Legality Check

Check if products are legal to ship to a state:

typescript
const { legal, illegal_items, state_name } = await dash.tax.checkLegality("TX")

if (!legal) {
  console.log("Cannot ship to", state_name)
  console.log("Illegal items:", illegal_items)
}

REST API

shell
POST /storefront/tax/calculate
X-API-Key: pk_live_your_key
Content-Type: application/json

{ "state": "TX", "cart_id": "cart_xyz" }

Next Steps

  • Tax Calculation — Calculation details
  • Create Order — Tax in checkout
PreviousLocation DetailsNextTax Calculation

On this page

  • Overview
  • Calculating Tax
  • Quick Cart Tax
  • Legality Check
  • REST API
  • Next Steps