Tax Types API Reference
This section of the API reference details the available endpoints for managing and retrieving tax types.
The TaxType model
Tax types categorize different tax rates applicable to items in invoices and estimates. They provide businesses with flexibility in applying various tax rates based on the nature of goods or services. This allows for accurate and customizable tax calculations, ensuring compliance with regulatory requirements and providing transparency in financial transactions.
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the tax type.
- Name
name
- Type
- string
- Description
Name of the tax type.
- Name
percent
- Type
- float
- Description
Percentage of tax.
- Name
description
- Type
- string
- Description
Description about the tax type.
- Name
business_id
- Type
- string
- Description
Unique identifier for the business.
List all tax types
Retrieve a paginated list of all tax types.
Parameters
- Name
limit
- Type
- integer
- Description
Maximum number of tax types to return per page.
- Name
page
- Type
- integer
- Description
Page number for pagination.
Request
curl --request GET \
--get "https://payments.your-domain.com/api/v2/tax-types" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
Response
{
"data": [
{
"id": "99745a4e-7d35-4766-974d-1a225e2258ac",
"name": "sales tax",
"percent": 5,
"description": "5% of the tax will be imposed on the total amount.",
"business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
}
]
}
Create a tax type
This endpoint allows you to create a new tax type.
Parameters
- Name
name
- Type
- string
- Description
Name of the tax type.
- Name
percent
- Type
- float
- Description
percentage of tax.
- Name
description
- Type
- string
- Description
Description about the tax type.
Request
curl --request POST \
"https://payments.your-domain.com/api/v2/tax-types" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
--data "{
\"name\": \"sales tax\",
\"percent\": \"5\",
\"description\": \"5% of the tax will be imposed on the total amount.\"
}"
Response
{
"data": {
"id": "99745a4e-7d35-4766-974d-1a225e2258ac",
"name": "sales tax",
"percent": 5,
"description": "5% of the tax will be imposed on the total amount.",
"business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
}
}
Retrieve a tax type
This endpoint allows you to retrieve a tax type object.
Parameters
- Name
id
- Type
- integer
- Description
The ID of the tax type.
Request
curl --request GET \
--get "https://payments.your-domain.com/api/v2/tax-types/99745a4e-7d35-4766-974d-1a225e2258ac" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
Response
{
"data": {
"id": "99745a4e-7d35-4766-974d-1a225e2258ac",
"name": "sales tax",
"percent": 5,
"description": "5% of the tax will be imposed on the total amount.",
"business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
}
}
Update a tax type
This endpoint allows you to perform an update on tax type.
Parameters
- Name
id
- Type
- integer
- Description
The ID of the tax type.
- Name
name
- Type
- string
- Description
Name of the tax type.
- Name
percent
- Type
- float
- Description
Percentage of tax.
- Name
description
- Type
- string
- Description
Description about the tax type.
Request
curl --request PUT \
"https://payments.your-domain.com/api/v2/tax-types/99745a4e-7d35-4766-974d-1a225e2258ac" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
--data "{
\"name\": \"sales tax\",
\"percent\": \"5\",
\"description\": \"5% of the tax will be imposed on the total amount.\"
}"
Response
{
"data": {
"id": "99745a4e-7d35-4766-974d-1a225e2258ac",
"name": "sales tax",
"percent": 5,
"description": "5% of the tax will be imposed on the total amount.",
"business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
}
}
Delete a tax type
This endpoint allows you to delete a tax type.
Parameters
- Name
id
- Type
- integer
- Description
The ID of the tax type.
Request
curl --request DELETE \
"https://payments.your-domain.com/api/v2/tax-types/99745a4e-7d35-4766-974d-1a225e2258ac" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
Response
{
"id": "99745a4e-7d35-4766-974d-1a225e2258ac",
"object": "TaxType",
"deleted": true
}