Prompt

How do I get VAT rates by customer address in an API?

Finance / Tax Software1 observationLast seen Nov 3, 2026

Latest observation

Nov 3, 2026OpenAI APIWeb search: off

To get VAT rates by customer address via an API, you generally need to:

  1. Collect the customer’s tax-relevant address

    • Country is usually the minimum.
    • For many jurisdictions, you may also need postal code, state/region, or city.
    • For EU VAT, the country is often enough to determine the VAT treatment, but address and VAT ID can matter for validation and place-of-supply rules.
  2. Call a tax/VAT lookup API

    • Many tax services expose an endpoint where you send:
      • country
      • postal_code (optional but often useful)
      • region/state (optional)
      • tax_exempt / vat_id / customer type if relevant
    • The API returns the applicable tax rate(s) and sometimes the jurisdiction breakdown.
  3. Use the returned rate to calculate tax

    • Multiply the taxable amount by the returned VAT rate.
    • If the API returns multiple components, sum them as needed.

Example API pattern

A typical request might look like:

POST /tax/rates
Content-Type: application/json

{
  "country": "DE",
  "postal_code": "10115",
  "state": "Berlin"
}

Example response:

{
  "country": "DE",
  "vat_rate": 0.19,
  "currency": "EUR",
  "jurisdiction": "DE"
}

Common options

If you’re building this yourself, you can also:

  • Map VAT rates by country code in a database/config file
  • Use a third-party tax engine (recommended for accuracy), such as:
    • Avalara
    • TaxJar
    • Stripe Tax
    • Quaderno
    • Vertex

Important considerations

  • VAT rules can depend on:
    • customer B2C vs B2B
    • whether the customer has a valid VAT ID
    • digital goods vs physical goods
    • shipping address vs billing address
  • Keep the tax rate source updated regularly, since VAT rules change.

If you want, I can show you:

  • a real API example for a specific provider, or
  • how to implement this in Node.js / Python / PHP.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.