Create tax rate
hub_create_tax_rateCreate a named tax rate ("State Sales Tax", "GST") with its percentage, and optionally put it straight into a tax group. Check get_taxes first: if a rate with this meaning already exists, add_tax_rate_to_group reuses it, which is almost always what the merchant wants — duplicating a rate means the next change has to be made twice and one of them gets forgotten. Give either percentage (the same at every outlet) or perOutlet (different per store) — never both, and never neither, since a rate with no percentage charges nothing. Without taxGroupId the rate exists but is charged nowhere. CONFIRM THE EXACT PERCENTAGE WITH THE MERCHANT before calling — do not infer it from suggest_tax_rate or from what is usual in that region. Sales already rung up are NOT recalculated — this only affects sales from now on.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | What appears on the receipt, e.g. "GST", "State Sales Tax" | |
| perOutlet | No | Outlet-specific percentages, using outlet ids from get_taxes. REPLACES the stored list whole — an outlet you leave out stops charging this rate | |
| percentage | No | One percentage for every outlet, e.g. 13 for 13% | |
| taxGroupId | No | Tax group id from get_taxes to add it to right away | |
| compounding | No | Only with taxGroupId: charge on the running total including the rates above it. Default false |