Skip to content

Tax API

Configure tax classes, manage country-specific tax rates, set up tax configuration, and handle EU VAT/OSS compliance.

Base URL: https://your-site.com/wp-json/fluent-cart/v2

All monetary values are in cents (e.g., $10.00 = 1000).


Tax Filing

Manage order-level tax records for filing and reporting purposes.

Prefix: /fluent-cart/v2/taxesPolicy: AdminPolicy


List Tax Records

GET /fluent-cart/v2/taxes

Retrieve a paginated list of order tax rate records with optional filtering, sorting, and search. Records represent taxes applied to individual orders.

Parameters

ParameterTypeLocationRequiredDescription
pageintegerqueryNoPage number for pagination
per_pageintegerqueryNoNumber of records per page (default: 10, max: 200)
searchstringqueryNoSearch term. If numeric, searches by id or order_id. Also searches related tax rate country, state, postcode, and name fields. Supports operator syntax (e.g., id = 5, order_id > 100)
sort_bystringqueryNoColumn to sort by (default: id). Must be a fillable column on the OrderTaxRate model
sort_typestringqueryNoSort direction: asc or desc (default: desc)
active_viewstringqueryNoTab filter. One of: filed (records with filed_at set), not_filed (records without filed_at)
filter_typestringqueryNoFilter mode: simple (default) or advanced
advanced_filtersstring (JSON)queryNoJSON-encoded array of advanced filter groups. Supports filtering by country, region, tax name, and filed status
witharray/stringqueryNoEager-load relations (e.g., order, tax_rate)
selectarray/stringqueryNoComma-separated list of columns to select
include_idsarray/stringqueryNoComma-separated IDs that must always be included in results
user_tzstringqueryNoUser timezone for date filtering (e.g., America/New_York)

Advanced Filter Options

CategoryFieldColumnTypeDescription
Tax PropertyCountrycountryselections (relation: tax_rate)Filter by tax rate country code
Tax PropertyRegionstateselections (relation: tax_rate)Filter by tax rate state/region
Tax PropertyTax Namenametext (relation: tax_rate)Filter by tax rate name
Tax PropertyFiledfiled_atselectionsfiled or not_filed

Response

json
{
  "taxes": {
    "current_page": 1,
    "data": [
      {
        "id": 1,
        "order_id": 42,
        "tax_rate_id": 5,
        "shipping_tax": 150,
        "order_tax": 1000,
        "total_tax": 1150,
        "meta": {
          "rates": [],
          "tax_country": "US",
          "store_vat_number": ""
        },
        "filed_at": null,
        "created_at": "2025-06-01 12:00:00",
        "updated_at": "2025-06-01 12:00:00"
      }
    ],
    "per_page": 10,
    "total": 50,
    "last_page": 5
  }
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/taxes?page=1&per_page=20&active_view=not_filed" \
  -u "username:app_password"

Mark Taxes as Filed

POST /fluent-cart/v2/taxes

Mark one or more order tax records as filed by setting their filed_at timestamp. Only records that have not yet been filed will be updated.

Parameters

ParameterTypeLocationRequiredDescription
idsarray of integersbodyYesArray of OrderTaxRate record IDs to mark as filed

Response

json
{
  "message": "Taxes marked as filed successfully"
}

Error Response (400)

json
{
  "message": "No IDs provided to mark!"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/taxes" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{"ids": [1, 2, 3, 5]}'

Tax Classes

Manage tax classes that group tax rates by category (e.g., Standard, Reduced, Zero).

Prefix: /fluent-cart/v2/tax/classesPolicy: StoreSensitivePolicy


List Tax Classes

GET /fluent-cart/v2/tax/classes

Retrieve all tax classes, sorted by priority (highest first), then by newest first when priority is equal.

Parameters

No query parameters required.

Response

json
{
  "tax_classes": [
    {
      "id": 1,
      "title": "Standard",
      "slug": "standard",
      "description": "Standard tax rate for most products",
      "meta": {
        "categories": [],
        "priority": 10
      },
      "categories": [],
      "created_at": "2025-01-01 00:00:00",
      "updated_at": "2025-01-01 00:00:00"
    },
    {
      "id": 2,
      "title": "Reduced",
      "slug": "reduced",
      "description": "Reduced tax rate for essential goods",
      "meta": {
        "categories": [],
        "priority": 5
      },
      "categories": [],
      "created_at": "2025-01-01 00:00:00",
      "updated_at": "2025-01-01 00:00:00"
    },
    {
      "id": 3,
      "title": "Zero",
      "slug": "zero",
      "description": "Zero tax rate for exempt products",
      "meta": {
        "categories": [],
        "priority": 2
      },
      "categories": [],
      "created_at": "2025-01-01 00:00:00",
      "updated_at": "2025-01-01 00:00:00"
    }
  ]
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/classes" \
  -u "username:app_password"

Create Tax Class

POST /fluent-cart/v2/tax/classes

Create a new tax class. A unique slug is auto-generated from the title.

Parameters

ParameterTypeLocationRequiredDescription
titlestringbodyYesTax class title (max 192 characters)
descriptionstringbodyNoDescription of the tax class
categoriesarray of integersbodyNoArray of product category IDs associated with this tax class
priorityintegerbodyNoSort priority (higher values appear first, default: 0)

Validation Rules

FieldRules
titleRequired, sanitized text, max 192 characters
descriptionNullable, sanitized text
categoriesNullable, array of integers

Response

json
{
  "message": "Tax class has been created successfully"
}

Error Response (422)

json
{
  "errors": {
    "title": ["Tax class title is required."]
  },
  "message": "Validation failed"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/classes" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Digital Goods",
    "description": "Tax class for digital products",
    "categories": [12, 15],
    "priority": 7
  }'

Update Tax Class

PUT /fluent-cart/v2/tax/classes/{id}

Update an existing tax class. The slug is automatically regenerated if the title changes.

Parameters

ParameterTypeLocationRequiredDescription
idintegerpathYesTax class ID
titlestringbodyYesTax class title (max 192 characters)
descriptionstringbodyNoDescription of the tax class
categoriesarray of integersbodyNoArray of product category IDs associated with this tax class
priorityintegerbodyNoSort priority (higher values appear first, default: 0)

Validation Rules

FieldRules
titleRequired, sanitized text, max 192 characters
descriptionNullable, sanitized text
categoriesNullable, array of integers

Response

json
{
  "message": "Tax class has been updated successfully"
}

Example

bash
curl -X PUT "https://example.com/wp-json/fluent-cart/v2/tax/classes/4" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Digital Goods Updated",
    "description": "Updated description",
    "categories": [12, 15, 20],
    "priority": 8
  }'

Delete Tax Class

DELETE /fluent-cart/v2/tax/classes/{id}

Delete a tax class by ID.

Parameters

ParameterTypeLocationRequiredDescription
idintegerpathYesTax class ID

Response

json
{
  "message": "Tax class has been deleted successfully"
}

Error Response

json
{
  "message": "Failed to delete tax class"
}

Example

bash
curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/tax/classes/4" \
  -u "username:app_password"

Tax Rates

Manage country-specific tax rates, shipping tax overrides, and country tax IDs.

Prefix: /fluent-cart/v2/taxPolicy: StoreSensitivePolicy


List All Tax Rates

GET /fluent-cart/v2/tax/rates

Retrieve all tax rates from the database, grouped by continent/region and country.

Parameters

No query parameters required.

Response

Returns tax rates grouped by geographic region, with each group containing countries and their respective rates.

json
{
  "tax_rates": [
    {
      "group_name": "European Union",
      "group_code": "EU",
      "countries": [
        {
          "country_code": "DE",
          "country_name": "Germany",
          "rates": [
            {
              "class_id": 1,
              "name": "DE Standard Tax",
              "rate": "19.0000",
              "for_shipping": null
            },
            {
              "class_id": 2,
              "name": "DE Reduced Tax",
              "rate": "7.0000",
              "for_shipping": null
            }
          ],
          "total_rates": 2
        }
      ],
      "total_countries": 1
    },
    {
      "group_name": "North America",
      "group_code": "NA",
      "countries": [
        {
          "country_code": "US",
          "country_name": "United States",
          "rates": [
            {
              "class_id": 1,
              "name": "US Standard Tax",
              "rate": "10.0000",
              "for_shipping": null
            }
          ],
          "total_rates": 1
        }
      ],
      "total_countries": 1
    }
  ]
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/rates" \
  -u "username:app_password"

Get Country Tax Rates

GET /fluent-cart/v2/tax/rates/country/rates/{country_code}

Retrieve all tax rates for a specific country, including the associated tax class and country-level configuration settings.

Parameters

ParameterTypeLocationRequiredDescription
country_codestringpathYesISO 3166-1 alpha-2 country code (e.g., US, DE, GB)

Response

json
{
  "tax_rates": [
    {
      "id": 5,
      "class_id": 1,
      "country": "DE",
      "state": "",
      "postcode": "",
      "city": "",
      "rate": "19.0000",
      "name": "DE Standard Tax",
      "group": "EU",
      "priority": 1,
      "is_compound": 0,
      "for_shipping": null,
      "for_order": 0,
      "formatted_state": "",
      "tax_class": {
        "id": 1,
        "title": "Standard"
      }
    }
  ],
  "settings": {
    "compound_tax": true,
    "tax_id_label": "VAT",
    "states": {}
  }
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/rates/country/rates/DE" \
  -u "username:app_password"

Create Tax Rate

POST /fluent-cart/v2/tax/country/rate

Create a new tax rate entry for a country.

Parameters

ParameterTypeLocationRequiredDescription
class_idintegerbodyYesID of the tax class this rate belongs to
countrystringbodyNoISO 3166-1 alpha-2 country code (max 45 characters)
statestringbodyNoState/province code (max 45 characters)
postcodestringbodyNoPostcode/ZIP code (max 45 characters)
citystringbodyNoCity name (max 45 characters)
ratestringbodyNoTax rate percentage (e.g., "19.0000", max 45 characters)
namestringbodyNoDisplay name for the tax rate (max 45 characters)
groupstringbodyNoGeographic group/continent code, e.g., EU, NA (max 45 characters)
priorityintegerbodyNoPriority for rate application order (min: 1)
is_compoundintegerbodyNoWhether this rate is compound (applied on top of other taxes). 0 or 1 (default: 0)
for_shippingintegerbodyNoShipping tax override rate. null means no override
for_orderintegerbodyNoWhether this rate applies at order level. 0 or 1 (default: 0)

Validation Rules

FieldRules
class_idRequired, minimum 0
countryNullable, sanitized text, max 45 characters
stateNullable, sanitized text, max 45 characters
postcodeNullable, sanitized text, max 45 characters
cityNullable, sanitized text, max 45 characters
rateNullable, sanitized text, max 45 characters
nameNullable, sanitized text, max 45 characters
groupNullable, sanitized text, max 45 characters
priorityNullable, numeric, minimum 1
is_compoundNullable, numeric, minimum 0
for_shippingNullable, numeric, minimum 0
for_orderNullable, numeric, minimum 0

Response

json
{
  "tax_rate": {
    "id": 10,
    "class_id": 1,
    "country": "FR",
    "state": "",
    "postcode": "",
    "city": "",
    "rate": "20.0000",
    "name": "FR Standard Tax",
    "group": "EU",
    "priority": 1,
    "is_compound": 0,
    "for_shipping": null,
    "for_order": 0,
    "formatted_state": "",
    "tax_class": {
      "id": 1,
      "title": "Standard"
    }
  },
  "message": "Tax rate has been created successfully"
}

Error Response

json
{
  "message": "Tax class is required"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/country/rate" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "class_id": 1,
    "country": "FR",
    "rate": "20.0000",
    "name": "FR Standard Tax",
    "group": "EU",
    "priority": 1
  }'

Update Tax Rate

PUT /fluent-cart/v2/tax/country/rate/{id}

Update an existing tax rate.

Parameters

ParameterTypeLocationRequiredDescription
idintegerpathYesTax rate ID
class_idintegerbodyYesID of the tax class this rate belongs to
countrystringbodyNoISO 3166-1 alpha-2 country code (max 45 characters)
statestringbodyNoState/province code (max 45 characters)
postcodestringbodyNoPostcode/ZIP code (max 45 characters)
citystringbodyNoCity name (max 45 characters)
ratestringbodyNoTax rate percentage (e.g., "19.0000")
namestringbodyNoDisplay name for the tax rate (max 45 characters)
groupstringbodyNoGeographic group/continent code (max 45 characters)
priorityintegerbodyNoPriority for rate application order (min: 1)
is_compoundintegerbodyNoWhether this rate is compound. 0 or 1
for_shippingintegerbodyNoShipping tax override rate
for_orderintegerbodyNoWhether this rate applies at order level. 0 or 1

Response

json
{
  "tax_rate": {
    "id": 10,
    "class_id": 1,
    "country": "FR",
    "state": "",
    "postcode": "",
    "city": "",
    "rate": "20.0000",
    "name": "FR Standard Tax",
    "group": "EU",
    "priority": 1,
    "is_compound": 0,
    "for_shipping": null,
    "for_order": 0,
    "formatted_state": "",
    "tax_class": {
      "id": 1,
      "title": "Standard"
    }
  },
  "message": "Tax rate has been updated successfully"
}

Example

bash
curl -X PUT "https://example.com/wp-json/fluent-cart/v2/tax/country/rate/10" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "class_id": 1,
    "rate": "21.0000",
    "name": "FR Standard Tax (Updated)"
  }'

Delete Tax Rate

DELETE /fluent-cart/v2/tax/country/rate/{id}

Delete a single tax rate by ID.

Parameters

ParameterTypeLocationRequiredDescription
idintegerpathYesTax rate ID

Response

json
{
  "message": "Tax rate has been deleted successfully"
}

Example

bash
curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/tax/country/rate/10" \
  -u "username:app_password"

Delete All Rates for a Country

DELETE /fluent-cart/v2/tax/country/{country_code}

Delete all tax rates for a specific country.

Parameters

ParameterTypeLocationRequiredDescription
country_codestringpathYesISO 3166-1 alpha-2 country code (e.g., US, DE)

Response

json
{
  "message": "Country has been deleted successfully"
}

Error Response

json
{
  "message": "Failed to delete country"
}

Example

bash
curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/tax/country/FR" \
  -u "username:app_password"

Save Shipping Tax Override

POST /fluent-cart/v2/tax/rates/country/override

Set a shipping-specific tax override on an existing tax rate. This allows a different tax rate to be applied for shipping calculations.

Parameters

ParameterTypeLocationRequiredDescription
idintegerbodyYesTax rate ID to apply the shipping override to
override_tax_rateintegerbodyYesThe override tax rate value to use for shipping

Response

json
{
  "message": "Tax override has been saved successfully"
}

Error Response

json
{
  "message": "Tax rate not found"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/rates/country/override" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "id": 5,
    "override_tax_rate": 7
  }'

Delete Shipping Tax Override

DELETE /fluent-cart/v2/tax/rates/country/override/{id}

Remove the shipping tax override from a tax rate, resetting for_shipping to null.

Parameters

ParameterTypeLocationRequiredDescription
idintegerpathYesTax rate ID to remove the shipping override from

Response

json
{
  "message": "Shipping override has been deleted successfully"
}

Example

bash
curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/tax/rates/country/override/5" \
  -u "username:app_password"

Get Country Tax ID

GET /fluent-cart/v2/tax/country-tax-id/{country_code}

Retrieve the store's tax identification number (VAT/GST/EIN) for a specific country. This is stored in the fct_meta table.

Parameters

ParameterTypeLocationRequiredDescription
country_codestringpathYesISO 3166-1 alpha-2 country code (e.g., US, DE)

Response

When a tax ID exists:

json
{
  "tax_data": {
    "tax_id": "DE123456789"
  }
}

When no tax ID is set:

json
{
  "tax_data": {
    "tax_id": ""
  }
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/country-tax-id/DE" \
  -u "username:app_password"

Save Country Tax ID

POST /fluent-cart/v2/tax/country-tax-id/{country_code}

Save or update the store's tax identification number for a specific country. Creates a new meta entry if one does not exist, or updates the existing one.

Parameters

ParameterTypeLocationRequiredDescription
country_codestringpathYesISO 3166-1 alpha-2 country code (e.g., US, DE)
tax_idstringbodyYesThe tax identification number (e.g., VAT number, EIN, GST number)

Response

json
{
  "message": "Tax ID has been saved successfully"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/country-tax-id/DE" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{"tax_id": "DE123456789"}'

Tax Configuration

Manage global tax settings including enabling/disabling tax, inclusion/exclusion behavior, calculation basis, and rounding.

Prefix: /fluent-cart/v2/tax/configurationPolicy: StoreSensitivePolicy


Get Preconfigured Tax Rates

GET /fluent-cart/v2/tax/configuration/rates

Retrieve the full list of preconfigured tax rates from the built-in tax rates data file (tax.php). These are the default rates organized by continent/region and country that can be used when initially setting up tax for a country.

Parameters

No query parameters required.

Response

Returns tax rate data grouped by geographic region, including all rate types (standard, reduced, zero) for each country.

json
{
  "tax_rates": {
    "EU": {
      "group_name": "European Union",
      "group_code": "EU",
      "countries": [
        {
          "country_code": "DE",
          "country_name": "Germany",
          "total_rates": 3,
          "rates": {
            "standard": {
              "rate": 19,
              "name": "DE Standard Tax",
              "type": "standard",
              "compound": false,
              "shipping": false
            },
            "reduced": {
              "rate": 7,
              "name": "DE Reduced Tax",
              "type": "reduced",
              "compound": false,
              "shipping": false
            },
            "zero": {
              "rate": 0,
              "name": "DE Zero Tax",
              "type": "zero",
              "compound": false,
              "shipping": false
            }
          }
        }
      ],
      "total_countries": 27
    },
    "NA": {
      "group_name": "North America",
      "group_code": "NA",
      "countries": [],
      "total_countries": 0
    }
  }
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/configuration/rates" \
  -u "username:app_password"

Save Configured Countries

POST /fluent-cart/v2/tax/configuration/countries

Generate tax classes and import tax rates for the specified countries from the built-in rates data. This creates the standard tax class structure (Standard, Reduced, Zero) and populates rates for each selected country. Countries that already have rates in the database are skipped.

Parameters

ParameterTypeLocationRequiredDescription
countriesarray of stringsbodyYesArray of ISO 3166-1 alpha-2 country codes to configure (e.g., ["DE", "FR", "US"])

Response

json
{
  "message": "Countries saved successfully"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/configuration/countries" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{"countries": ["DE", "FR", "IT", "ES"]}'

Get Tax Settings

GET /fluent-cart/v2/tax/configuration/settings

Retrieve the current global tax configuration settings.

Parameters

No query parameters required.

Response

json
{
  "settings": {
    "tax_inclusion": "included",
    "tax_calculation_basis": "shipping",
    "tax_rounding": "item",
    "enable_tax": "yes",
    "price_suffix": "",
    "eu_vat_settings": {
      "require_vat_number": "no",
      "local_reverse_charge": "yes",
      "vat_reverse_excluded_categories": [],
      "method": "oss",
      "oss_country": "DE",
      "oss_vat": "DE123456789"
    }
  }
}

Settings Fields Reference

FieldTypeValuesDescription
enable_taxstring"yes", "no"Whether tax calculation is enabled
tax_inclusionstring"included", "excluded"Whether product prices include tax
tax_calculation_basisstring"shipping", "billing", "store"Address used for tax calculation
tax_roundingstring"item", "subtotal"Whether rounding is applied per item or on the subtotal
price_suffixstringanyText appended after product prices (e.g., "incl. VAT")
eu_vat_settingsobjectsee belowEU VAT-specific configuration

EU VAT Settings Object

FieldTypeDescription
require_vat_numberstring"yes" or "no" -- whether EU VAT number field is shown at checkout
local_reverse_chargestring"yes" or "no" -- whether reverse charge applies for domestic B2B
vat_reverse_excluded_categoriesarray of integersProduct category IDs excluded from VAT reverse charge
methodstringCross-border method: "oss", "home", or "specific"
oss_countrystringCountry of OSS registration (when method is "oss")
oss_vatstringOSS VAT number (when method is "oss")
home_countrystringHome country (when method is "home")
home_vatstringHome VAT number (when method is "home")
country_wise_vatarrayCountry-specific VAT settings (when method is "specific")

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings" \
  -u "username:app_password"

Save Tax Settings

POST /fluent-cart/v2/tax/configuration/settings

Save the global tax configuration settings. If tax is enabled for the first time, initial tax classes (Standard, Reduced, Zero) are automatically created.

Parameters

ParameterTypeLocationRequiredDescription
settingsobjectbodyYesTax settings object (see fields below)
settings.enable_taxstringbodyNo"yes" or "no" to enable/disable tax
settings.tax_inclusionstringbodyNo"included" or "excluded" -- whether prices include tax
settings.tax_calculation_basisstringbodyNo"shipping", "billing", or "store" -- address basis for tax
settings.tax_roundingstringbodyNo"item" or "subtotal" -- rounding method
settings.price_suffixstringbodyNoText appended after product prices
settings.eu_vat_settingsobjectbodyNoEU VAT configuration object (see EU VAT Settings Object above)

Response

json
{
  "message": "Settings saved successfully"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "settings": {
      "enable_tax": "yes",
      "tax_inclusion": "excluded",
      "tax_calculation_basis": "billing",
      "tax_rounding": "subtotal",
      "price_suffix": "excl. VAT",
      "eu_vat_settings": {
        "require_vat_number": "yes",
        "local_reverse_charge": "yes",
        "vat_reverse_excluded_categories": [12, 15]
      }
    }
  }'

EU VAT

Manage European Union VAT settings, OSS (One-Stop Shop) compliance, and cross-border tax configurations.

Prefix: /fluent-cart/v2/tax/configuration/settings/eu-vatPolicy: StoreSensitivePolicy


Save EU VAT Cross-Border Settings

POST /fluent-cart/v2/tax/configuration/settings/eu-vat

Save EU VAT cross-border registration settings. This endpoint handles the configuration of how cross-border EU VAT is managed (OSS, home country, or specific country registrations).

Parameters

ParameterTypeLocationRequiredDescription
actionstringbodyYesMust be "euCrossBorderSettings"
eu_vat_settingsobjectbodyYesEU VAT configuration object
eu_vat_settings.methodstringbodyYesCross-border method: "oss", "home", or "specific"
eu_vat_settings.oss_countrystringbodyConditionalCountry of OSS registration (required when method is "oss")
eu_vat_settings.oss_vatstringbodyNoOSS VAT number
eu_vat_settings.home_countrystringbodyConditionalHome country code (required when method is "home")
eu_vat_settings.home_vatstringbodyNoHome VAT number
reset_registrationstringbodyNoSet to "yes" to clear the current method (reset registration)

Validation

ConditionError
method not one of oss, home, specific"Select a cross-border registration type"
method is oss and oss_country is empty"Select country of OSS registration"
method is home and home_country is empty"Select home country of registration"

Response

json
{
  "message": "EU VAT settings saved successfully"
}

Error Response (423)

json
{
  "message": "Validation failed for EU VAT settings",
  "errors": {
    "method": "Select a cross-border registration type"
  }
}

Error Response (423) - Invalid action

json
{
  "message": "Invalid method"
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings/eu-vat" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "euCrossBorderSettings",
    "eu_vat_settings": {
      "method": "oss",
      "oss_country": "DE",
      "oss_vat": "DE123456789"
    }
  }'

Get EU Tax Rates

GET /fluent-cart/v2/tax/configuration/settings/eu-vat/rates

Retrieve all tax rates in the EU group from the database, grouped by region and country. This returns only rates where group is EU.

Parameters

No query parameters required.

Response

json
{
  "tax_rates": [
    {
      "group_name": "European Union",
      "group_code": "EU",
      "countries": [
        {
          "country_code": "DE",
          "country_name": "Germany",
          "rates": [
            {
              "class_id": 1,
              "name": "standard",
              "rate": "19.0000",
              "for_shipping": null
            },
            {
              "class_id": 2,
              "name": "reduced",
              "rate": "7.0000",
              "for_shipping": null
            }
          ],
          "total_rates": 2
        },
        {
          "country_code": "FR",
          "country_name": "France",
          "rates": [
            {
              "class_id": 1,
              "name": "standard",
              "rate": "20.0000",
              "for_shipping": null
            }
          ],
          "total_rates": 1
        }
      ],
      "total_countries": 2
    }
  ]
}

Example

bash
curl -X GET "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings/eu-vat/rates" \
  -u "username:app_password"

Save OSS Tax Override

POST /fluent-cart/v2/tax/configuration/settings/eu-vat/oss/override

Save or update OSS (One-Stop Shop) tax rate overrides for a specific EU country. This allows overriding the standard, reduced, or zero tax rates for a country within the EU group. If a rate already exists for the country and tax class, it is updated; otherwise a new rate is created.

Parameters

ParameterTypeLocationRequiredDescription
country_codestringbodyYesISO 3166-1 alpha-2 country code of the EU member state
overridesarraybodyYesArray of override objects
overrides[].typestringbodyYesTax class slug: "standard", "reduced", or "zero"
overrides[].ratestring/numberbodyYesThe overridden tax rate percentage

Validation

ConditionError
country_code is empty"Select country of OSS registration"

Response

json
{
  "message": "OSS tax override saved successfully"
}

Error Response (423)

json
{
  "message": "Validation failed for OSS tax override",
  "errors": {
    "country_code": "Select country of OSS registration"
  }
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings/eu-vat/oss/override" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "country_code": "FR",
    "overrides": [
      {"type": "standard", "rate": "20.0000"},
      {"type": "reduced", "rate": "5.5000"},
      {"type": "zero", "rate": "0.0000"}
    ]
  }'

Save OSS Shipping Tax Override

POST /fluent-cart/v2/tax/configuration/settings/eu-vat/oss/shipping-override

Save or update OSS shipping tax rate overrides for a specific EU country. Similar to the tax override endpoint, but also supports the for_shipping field. If a rate already exists for the country and tax class, it is updated; otherwise a new rate is created.

Parameters

ParameterTypeLocationRequiredDescription
country_codestringbodyYesISO 3166-1 alpha-2 country code of the EU member state
overridesarraybodyYesArray of override objects
overrides[].typestringbodyYesTax class slug: "standard", "reduced", or "zero"
overrides[].ratestring/numberbodyYesThe overridden tax rate percentage
overrides[].for_shippingintegerbodyNoShipping-specific tax rate override (default: 0)

Validation

ConditionError
country_code is empty"Select country of OSS registration"

Response

json
{
  "message": "OSS tax override saved successfully"
}

Error Response (423)

json
{
  "message": "Validation failed for OSS tax override",
  "errors": {
    "country_code": "Select country of OSS registration"
  }
}

Example

bash
curl -X POST "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings/eu-vat/oss/shipping-override" \
  -u "username:app_password" \
  -H "Content-Type: application/json" \
  -d '{
    "country_code": "IT",
    "overrides": [
      {"type": "standard", "rate": "22.0000", "for_shipping": 10},
      {"type": "reduced", "rate": "10.0000", "for_shipping": 5}
    ]
  }'

Delete OSS Tax Override

DELETE /fluent-cart/v2/tax/configuration/settings/eu-vat/oss/override

Delete all EU tax rate overrides for a specific country. Optionally filter by state/region within the country.

Parameters

ParameterTypeLocationRequiredDescription
countrystringqueryYesISO 3166-1 alpha-2 country code
statestringqueryNoState/region code to narrow the deletion scope

Validation

ConditionError
country is empty"Country code is required" (HTTP 423)

Response

json
{
  "message": "OSS tax override deleted successfully"
}

Error Response (423)

When no matching records are found:

json
{
  "message": "No matching OSS tax override found to delete"
}

Example

bash
# Delete all EU tax overrides for France
curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings/eu-vat/oss/override?country=FR" \
  -u "username:app_password"

# Delete EU tax overrides for a specific French region
curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings/eu-vat/oss/override?country=FR&state=IDF" \
  -u "username:app_password"

Delete OSS Shipping Tax Override

DELETE /fluent-cart/v2/tax/configuration/settings/eu-vat/oss/shipping-override

Delete all EU shipping tax rate overrides for a specific country. Optionally filter by state/region within the country.

Parameters

ParameterTypeLocationRequiredDescription
countrystringqueryYesISO 3166-1 alpha-2 country code
statestringqueryNoState/region code to narrow the deletion scope

Validation

ConditionError
country is empty"Country code is required" (HTTP 423)

Response

json
{
  "message": "OSS shipping override deleted successfully"
}

Error Response (423)

When no matching records are found:

json
{
  "message": "No matching OSS shipping override found to delete"
}

Example

bash
# Delete all EU shipping tax overrides for Italy
curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings/eu-vat/oss/shipping-override?country=IT" \
  -u "username:app_password"

# Delete EU shipping tax overrides for a specific Italian region
curl -X DELETE "https://example.com/wp-json/fluent-cart/v2/tax/configuration/settings/eu-vat/oss/shipping-override?country=IT&state=RM" \
  -u "username:app_password"

FluentCart developer documentation