You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Square Connect Api V2:如何在订单级税下禁用特定订单项税费?

Answer to Square Connect API v2 CreateOrder Tax Exclusion Question

Absolutely! You can create an order with order-level taxes and exclude specific line items from being subject to those taxes using the CreateOrder endpoint. Here's how to do it properly:

Step 1: Define your order-level tax

First, include your order-level tax in the taxes array of your CreateOrder request. Assign it a unique uid (you can generate this yourself or let Square auto-generate it, but specifying it makes referencing easier later):

"taxes": [
  {
    "uid": "order_sales_tax",
    "name": "State Sales Tax",
    "percentage": "7.25",
    "scope": "ORDER"
  }
]

Step 2: Exclude the tax from specific line items

For any line item that shouldn't be taxed, add an entry to its applied_taxes array that references the order-level tax's uid and sets the scope to EXCLUDE. This overrides the default behavior of applying the order-level tax to all items:

"line_items": [
  {
    "name": "Taxable Product",
    "quantity": "1",
    "base_price_money": {
      "amount": 5000,
      "currency": "USD"
    }
    // No applied_taxes entry here → order-level tax is applied automatically
  },
  {
    "name": "Tax-Exempt Product",
    "quantity": "1",
    "base_price_money": {
      "amount": 3000,
      "currency": "USD"
    },
    "applied_taxes": [
      {
        "tax_uid": "order_sales_tax",
        "scope": "EXCLUDE"
      }
    ]
  }
]

Alternative Approach (if needed)

If for some reason the exclusion method doesn't fit your workflow, you're right that moving taxes to the line-item level works too—just add the tax directly to the line items that need it, and omit it from exempt ones. But the exclusion method above is the cleanest way to maintain order-level tax settings while exempting specific items.

Just make sure you're using the correct field names and scopes as defined in Square's API schema, and test the request with Square's sandbox first to verify the tax calculations are correct!

内容的提问来源于stack exchange,提问作者taekimjr

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.29 08:04:22