States & Regions
List US states with order and revenue data.
Updated
On this page
Overview
DashForDevs provides geographic data for states and regions, used in shipping address forms, tax calculations, and location-based features.
Getting States
States are available through the shipping locations endpoint:
import dash from "@/lib/dash"
const { countries } = await dash.checkout.getShippingLocations()
// Each country includes its states/regions
const us = countries.find(c => c.code === "US")
us.states.forEach(state => {
console.log(state.name, state.code) // "Texas", "TX"
})