Skip to main content
POST
/
taxes
/
associations
Create Tax Association
curl --request POST \
  --url https://us.api.flexprice.io/v1/taxes/associations \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "tax_rate_code": "<string>",
  "auto_apply": true,
  "currency": "<string>",
  "entity_id": "<string>",
  "entity_type": "customer",
  "external_customer_id": "<string>",
  "metadata": {},
  "priority": 123
}
'
{
  "auto_apply": true,
  "created_at": "<string>",
  "created_by": "<string>",
  "currency": "<string>",
  "entity_id": "<string>",
  "entity_type": "customer",
  "environment_id": "<string>",
  "id": "<string>",
  "metadata": {},
  "priority": 123,
  "status": "published",
  "tax_rate": {
    "code": "<string>",
    "created_at": "<string>",
    "created_by": "<string>",
    "description": "<string>",
    "environment_id": "<string>",
    "fixed_value": "<string>",
    "id": "<string>",
    "metadata": {},
    "name": "<string>",
    "percentage_value": "<string>",
    "scope": "INTERNAL",
    "status": "published",
    "tax_rate_status": "ACTIVE",
    "tax_rate_type": "percentage",
    "tenant_id": "<string>",
    "updated_at": "<string>",
    "updated_by": "<string>"
  },
  "tax_rate_id": "<string>",
  "tenant_id": "<string>",
  "updated_at": "<string>",
  "updated_by": "<string>"
}

Authorizations

x-api-key
string
header
required

Enter your API key in the format x-api-key <api-key>*

Body

application/json

Tax Config Request

tax_rate_code
string
required
auto_apply
boolean
currency
string
entity_id
string
entity_type
enum<string>
Available options:
customer,
subscription,
invoice,
tenant
external_customer_id
string
metadata
object
priority
integer

Response

OK

auto_apply
boolean

Whether this tax should be automatically applied

created_at
string
created_by
string
currency
string

Currency

entity_id
string

ID of the entity this tax rate applies to

entity_type
enum<string>
Available options:
customer,
subscription,
invoice,
tenant
environment_id
string

EnvironmentID is the ID of the environment this tax rate config belongs to

id
string

ID of the ent.

metadata
object

Metadata holds the value of the "metadata" field.

priority
integer

Priority for tax resolution (lower number = higher priority)

status
enum<string>
Available options:
published,
deleted,
archived
tax_rate
object
tax_rate_id
string

Reference to the TaxRate entity

tenant_id
string
updated_at
string
updated_by
string