Calculate Tax Rates Via Webhook

A webhook-based tax calculator API that lets you query standard and current tax rates for various commodities, and set custom tax rates on demand.

Tax CalculatorWebhook APICommodity RatesFinance Tool

Overview

This workflow exposes a Tax Calculator API via a webhook endpoint. By sending POST requests to the webhook URL, you can query standard tax rates, retrieve current active rates, and set custom tax rates for various commodities such as Alcohol, Food, Literature, Transport, and more.

Supported Actions

ActionDescriptionRequired Fields
getStandardTaxRateReturns the default tax rate for a given commodityaction, commodity
getCurrentTaxRateReturns the active tax rate, factoring in any custom rates that have been setaction, commodity
setCustomTaxRateSets a custom tax rate for a specific commodity (stored with a timestamp)action, commodity, rate

How It Works

  1. Webhook Trigger — The workflow starts when a POST request is received at the webhook URL.
  2. Code Node — A code node processes the incoming payload, resolves the commodity, and performs the requested action (query or update). It returns the result as a JSON response.

If no valid action is provided, the workflow runs in demo mode and returns a set of sample results based on a predefined test scenario.

Supported Commodities

  • Default
  • Alcohol
  • Food
  • FoodServices
  • Literature
  • Transport
  • CulturalServices

Example Payloads

1. Get Standard Tax Rate

{
  "action": "getStandardTaxRate",
  "commodity": "Alcohol"
}

2. Get Current Tax Rate

{
  "action": "getCurrentTaxRate",
  "commodity": "Food"
}

3. Set a Custom Tax Rate and Then Fetch It

You can batch multiple operations in a single request using the operations array:

{
  "operations": [
    { "action": "setCustomTaxRate", "commodity": "Literature", "rate": 0.08 },
    { "action": "getCurrentTaxRate", "commodity": "Literature" }
  ]
}

Standard Tax Rate Reference

CommodityStandard Rate
Default25%
Alcohol25%
Food12%
FoodServices12%
Literature6%
Transport6%
CulturalServices6%

Tips

  • Custom rates override standard rates once set. The getCurrentTaxRate action automatically considers any custom rate that is active as of the current date and time.
  • When setting a custom rate, you can optionally include a date field (ISO 8601 format) to specify when the rate should take effect.
  • If you send a request without an action or operations field, the workflow will return demo results to help you understand the response format.

Want to showcase your own workflows?

Become a Needle workflow partner and turn your expertise into recurring revenue.

Ready to vibe automate?

Join thousands of people who have transformed their workflows.

Workflows

Automations with AI agents

Collections

All your data, searchable

Chat Widget

Drop-in widget for your website

Developer API

Build AI-powered apps with ease

    We use cookies to enhance your experience on Needle and keep your data secure. Privacy Policy