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
    Field Type
    Description

    Unique identifier for the tax type.

  • Name
    name
    Type
    string
    Field Type
    Description

    Name of the tax type.

  • Name
    percent
    Type
    float
    Field Type
    Description

    Percentage of tax.

  • Name
    description
    Type
    string
    Field Type
    Description

    Description about the tax type.

  • Name
    business_id
    Type
    string
    Field Type
    Description

    Unique identifier for the business.


GETapi/v1/tax-types

List all tax types

Retrieve a paginated list of all tax types.

Query Parameters

  • Name
    limit
    Type
    integer
    Field Type
    optional
    Description

    Maximum number of tax types to return per page. (default is 5)

  • Name
    page
    Type
    integer
    Field Type
    optional
    Description

    Page number for pagination. (default is 1)

Request

GET
api/v1/tax-types
curl --request GET \
  --get "https://payments.your-domain.com/api/v1/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"
    }, {...}
  ]
}

POSTapi/v1/tax-types

Create a tax type

This endpoint allows you to create a new tax type.

Body Parameters

  • Name
    name
    Type
    string
    Field Type
    required
    Description

    Name of the tax type.

  • Name
    percent
    Type
    float
    Field Type
    required
    Description

    percentage of tax.

  • Name
    description
    Type
    string
    Field Type
    optional
    Description

    Description about the tax type.

Request

POST
api/v1/tax-types
curl --request POST \
  "https://payments.your-domain.com/api/v1/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"
  }
}

GETapi/v1/tax-types/{id}

Retrieve a tax type

This endpoint allows you to retrieve a tax type object.

URL Parameters

  • Name
    id
    Type
    string
    Field Type
    required
    Description

    The ID of the tax type.

Request

GET
api/v1/tax-types/{id}
curl --request GET \
  --get "https://payments.your-domain.com/api/v1/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"
  }
}

PUTapi/v1/tax-types/{id}

Update a tax type

This endpoint allows you to perform an update on tax type.

URL Parameters

  • Name
    id
    Type
    string
    Field Type
    required
    Description

    The ID of the tax type.

Body Parameters

  • Name
    name
    Type
    string
    Field Type
    optional
    Description

    Name of the tax type.

  • Name
    percent
    Type
    float
    Field Type
    optional
    Description

    Percentage of tax.

  • Name
    description
    Type
    string
    Field Type
    optional
    Description

    Description about the tax type.

Request

PUT
api/v1/tax-types/{id}
curl --request PUT \
  "https://payments.your-domain.com/api/v1/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\": \"6\",
    \"description\": \"6% of the tax will be imposed on the total amount.\"
  }"

Response

{
  "data": {
    "id": "99745a4e-7d35-4766-974d-1a225e2258ac",
    "name": "sales tax",
    "percent": 6,
    "description": "6% of the tax will be imposed on the total amount.",
    "business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
  }
}

DELETEapi/v1/tax-types/{id}

Delete a tax type

This endpoint allows you to delete a tax type.

URL Parameters

  • Name
    id
    Type
    string
    Field Type
    required
    Description

    The ID of the tax type.

Request

DELETE
api/v1/tax-types/{id}
curl --request DELETE \
  "https://payments.your-domain.com/api/v1/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
}