# VAT

> **You are on:** `https://beta-api.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API |
> |---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com |
> | Beta | beta.paywithlocus.com | beta-api.paywithlocus.com |
> | Stage | stage.paywithlocus.com | stage-api.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> VAT number validation, rate calculation, and category lookup for EU.

**Category:** Finance | **Website:** [www.abstractapi.com/api/vat-validation-rates-api](https://www.abstractapi.com/api/vat-validation-rates-api) | **Docs:** [docs.abstractapi.com/vat](https://docs.abstractapi.com/vat)

## Access Methods

| Method | Base URL | Auth |
|--------|----------|------|
| **MPP (Tempo)** | `https://abstract-vat.mpp.paywithlocus.com/abstract-vat/` | HTTP 402 auto-payment |
| **Wrapped API** | `https://beta-api.paywithlocus.com/api/wrapped/abstract-vat/` | `Authorization: Bearer <LOCUS_API_KEY>` |

**OpenAPI discovery:** `GET https://abstract-vat.mpp.paywithlocus.com/openapi.json`

## Endpoints

### Validate

Validate a VAT number and get company details.

**Estimated cost:** $0.006

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `vat_number` | string | Yes | VAT number to validate |

```bash
curl -X POST https://abstract-vat.mpp.paywithlocus.com/abstract-vat/validate \
  -H "Content-Type: application/json" \
  -d '{"vat_number":"<string>"}'
```

### Calculate

Calculate VAT for an amount in a given country.

**Estimated cost:** $0.006

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `amount` | number | Yes | Amount to calculate VAT for |
| `country_code` | string | Yes | ISO 3166-1 alpha-2 country code |
| `is_vat_incl` | boolean | No | Whether amount includes VAT |
| `vat_category` | string | No | VAT category |

```bash
curl -X POST https://abstract-vat.mpp.paywithlocus.com/abstract-vat/calculate \
  -H "Content-Type: application/json" \
  -d '{"amount":"<number>","country_code":"<string>","is_vat_incl":"<boolean>","vat_category":"<string>"}'
```

### Categories

List VAT categories and rates for a country.

**Estimated cost:** $0.006

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `country_code` | string | Yes | ISO 3166-1 alpha-2 country code |

```bash
curl -X POST https://abstract-vat.mpp.paywithlocus.com/abstract-vat/categories \
  -H "Content-Type: application/json" \
  -d '{"country_code":"<string>"}'
```
