const options = {
method: "POST",
headers: {
"X-API-Key": "REPLACE_WITH_YOUR_API_KEY",
"Taxwire-Version": "hydrogen.2025-04-15",
"Content-Type": "application/json",
},
body: JSON.stringify({
line_items: [
{
quantity: "1",
unit_price: "100",
customer: {
address: {
line1: "123 Main St",
city: "San Francisco",
state: "CA",
country: "US",
postal_code: "94105",
}
}
}
]
}),
};
fetch("https://api.taxwire.com/calculations/", options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));