taxjar 接口文档和其他需要注意地方

1、接口地址:

https://api.taxjar.com/v2/taxes

  protected function callTaxJarApi($endpoint, $payload)
  {
    $client = new Client();
    $apiUrl = "https://api.taxjar.com/v2/{$endpoint}";
    $apiToken = '3aa5470f168e14914e260b1d425b6c68'; // 确认你的 API Token 是否有效
   }

2、请求入参

{
  "from_country": "US", // 发货国家
  "from_zip": "90210", //发货邮政编码
  "from_state": "CA", //发货州
  "from_city": "Beverly Hills",
  "from_street": "123 Main St",
  "to_country": "US", // 收货国家
  "to_zip": "10001", // 收货邮政编码
  "to_state": "NY", // 收货州
  "to_city": "New York",
  "to_street": "456 Park Ave",
  "amount": 100, // 订单总金额。
  "shipping": 10, // 运费
  "nexus_addresses": [
    {
      "country": "US",
      "zip": "90210",
      "state": "CA",
      "city": "Beverly Hills",
      "street": "123 Main St"
    }
  ], // 哪些州有纳税义务
  "line_items": [
    {
      "id": "1",
      "quantity": 1,
      "product_tax_code": "20010",
      "unit_price": 100,
      "discount": 0
    }
  ] // 产品sku、数量、产品税码、单价、折扣
}

其中必传的参数有:

     'amount' => $amount, // 必传
      'shipping' => $shippingValue ?? 0, // 必传
      'to_country' => 'US', // 必传
      'to_zip' => $zip, // 必传
      'to_state' => $stateValue ?? 'CA', // 必传
       'line_items' => [] //必传,这个参数不传拿不到明细的

3、响应示例:

{
  "tax": {
    "order_total_amount": 110,
    "shipping": 10,
    "taxable_amount": 100,
    "amount_to_collect": 8.88,
    "rate": 0.0888,
    "has_nexus": true,
    "freight_taxable": false,
    "jurisdictions": {
      "country": "US",
      "state": "NY",
      "county": "NEW YORK",
      "city": "NEW YORK"
    },
    "breakdown": {
      "taxable_amount": 100,
      "tax_collectable": 8.88,
      "combined_tax_rate": 0.0888,
      "state_taxable_amount": 100,
      "state_tax_rate": 0.04,
      "state_tax_collectable": 4,
      "county_taxable_amount": 100,
      "county_tax_rate": 0.045,
      "county_tax_collectable": 4.5,
      "city_taxable_amount": 100,
      "city_tax_rate": 0.0038,
      "city_tax_collectable": 0.38,
      "special_district_taxable_amount": 100,
      "special_tax_rate": 0.001,
      "special_district_tax_collectable": 0.1,
      "line_items": [
        {
          "id": "1",
          "taxable_amount": 100,
          "tax_collectable": 8.88,
          "combined_tax_rate": 0.0888,
          "state_taxable_amount": 100,
          "state_sales_tax_rate": 0.04,
          "state_amount": 4,
          "county_taxable_amount": 100,
          "county_tax_rate": 0.045,
          "county_amount": 4.5,
          "city_taxable_amount": 100,
          "city_tax_rate": 0.0038,
          "city_amount": 0.38,
          "special_district_taxable_amount": 100,
          "special_tax_rate": 0.001,
          "special_district_amount": 0.1
        }
      ]
    }
  }
}

示例说明
tax: 响应的根对象,包含订单的税费相关信息。

order_total_amount: 订单总金额,包括税费和运费在内的所有费用。示例中为 $110。
shipping: 运费金额。示例中为 $10。
taxable_amount: 应税金额,示例中为 $100,指除去非应税项的订单金额。
amount_to_collect: 最终应收的税费总额,示例中为 $8.88。
rate: 订单的综合税率,示例中为 0.0888。
has_nexus: 指示卖家在收件地是否有纳税义务,true 表示有。
freight_taxable: 运费是否应税,示例中为 false。
jurisdictions: 表示税务归属信息,包括:

country: 国家。
state: 州。
county: 县。
city: 城市。
breakdown: 各部分的税费详细分解。

taxable_amount: 应税金额。
tax_collectable: 可收集的总税额。
combined_tax_rate: 综合税率。
state_taxable_amount, state_tax_rate, state_tax_collectable: 州税的应税金额、税率和应收金额。
county_taxable_amount, county_tax_rate, county_tax_collectable: 郡县税的详细信息。
city_taxable_amount, city_tax_rate, city_tax_collectable: 市税的详细信息。
special_district_taxable_amount, special_tax_rate, special_district_tax_collectable: 特殊税区(如交通或教育区)税费详细信息。
line_items: 每件商品的税费详细信息,结构与 breakdown 类似,包含各级税费的分解。

使用此响应信息的关键点
amount_to_collect 是商家需要收取的税费,最终会在支付或开票时使用。
breakdown 提供了更细化的税务数据,帮助商家了解不同税级的来源和金额,适合用于会计和财务分析。
line_items 可以用于查看和核算单件商品的税收情况,有助于商品分类和报告。

1. 各州的免税额

不同的最低免税额:一些州对销售税的征收设有起征点,即只有超过一定金额的销售才会征收税。例如,一些州可能对低于一定金额的服装免税,而超过该金额的服装则会征收税。
免税商品:一些州对特定类型的商品免税,如食品、药品或儿童用品。对于服装,一些州设定了免税金额上限,只有在该上限以下的服装才免税。
例外情况:某些州如德克萨斯州或纽约州对服装和鞋类的销售实施特定的免税额。例如,纽约州对每件价格低于 $110 的服装和鞋类免征州销售税,但各地方政府可能征收额外税费。

2. 消费税征收注意事项

州税和地方税:除了州销售税外,各地方政府(如城市、县等)也可以征收额外的地方销售税。因此,在一些地区,消费者支付的综合税率会比州税率高。
特定时间的免税期:有些州在特定时间(如返校季)会提供免税期,期间内购买特定商品免征销售税。

3. 奢侈品的界定

奢侈品的标准:不同州对“奢侈品”的定义不完全相同,但通常指高价的、非必需的商品,如名牌包、设计师时装、珠宝和豪华手表。
价格分级:一些州设置了特定价格门槛,超过此门槛的商品被视为奢侈品。例如,某些州可能对价格超过一定金额(如 $1,000)的商品收取更高的税率。

4. 特别关注的州

新泽西州:服装通常免征销售税,但奢侈品除外。
加利福尼亚州:对所有服装征收销售税,无具体的免税政策。
佛罗里达州:提供免税期并规定服装和鞋类在一定价格范围内免税。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容