> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api-docs.papertracc.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api-docs.papertracc.com/_mcp/server.

# Create Tax Profile

POST https://api.papertracc.com/v1/configs/tax
Content-Type: application/json

Creates a tax profile. Input and output account IDs are required. Set `kind` to `WHT` to create a withholding tax profile. For a WHT profile, `output_account_id` is the withholding tax payable account (a liability account, used when you withhold from a vendor) and `input_account_id` is the withholding tax receivable account (an asset account, used when a customer withholds from you). `withholding_basis` sets whether the rate applies to the VAT-exclusive or the full amount being settled. Withholding tax profiles are not available as line taxes on invoices, bills, expenses or journals, and are excluded from the VAT return.

Requires the `can_create_tax_profile` permission on the key owner's role.

**Keys:** secret key only.

Reference: https://api-docs.papertracc.com/core/configurations/tax-profiles/create-tax-profile

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.
- `identity` header (required) — The identity for the active workspace.

## Servers

- `https://api.papertracc.com/v1` (Production, default)
- `https://api.papertracc.com/rc-1` (Release Candidate 1)

## Request

### Body (application/json)

This endpoint expects an object.

- `name` (string, required)
- `rate` (double, required)
- `input_account_id` (string, required)
- `output_account_id` (string, required)
- `code` (string, optional)
- `is_compound` (boolean, optional)
- `is_recoverable` (boolean, optional)
- `kind` (enum, optional, default: VAT) — VAT for sales and purchase tax. WHT for withholding tax, which is deducted from a payment. Fixed once the profile is created. Profiles created before this field existed are VAT.
  - Allowed values: `VAT`, `WHT`
- `deduct_on` (enum, optional, default: PAYMENT) — When withholding tax is deducted. Only applies to WHT profiles. PAYMENT deducts it when the vendor is paid or the customer pays. BILL is reserved and not yet supported for posting.
  - Allowed values: `PAYMENT`, `BILL`
- `withholding_basis` (enum, optional, default: EXCL_VAT) — What the withholding rate applies to when a payment or receipt does not state its own base. `EXCL_VAT` uses the VAT-exclusive share of the amount being settled. `INCL_VAT` uses the full amount being settled. Only applies to WHT profiles.
  - Allowed values: `EXCL_VAT`, `INCL_VAT`

## Response

### 201

Created

- `data` (ConfigsTaxPostResponsesContentApplicationJsonSchemaData, required)
- `status` (boolean, required)
- `message` (string, required)

## Errors

### 401 Unauthorized Error

The API key is missing or invalid, the key owner is no longer an active member of the organisation, or the key owner is not a member of the workspace in the `identity` header.

- `status` (boolean, required)
- `message` (string, required)
- `error_code` (enum, optional) — Machine-readable reason. Present on 402 and 403 responses.
  - Allowed values: `PERMISSION_DENIED`, `SERVICE_DISABLED`, `OPEN_API_NOT_ENABLED`
- `permission` (string, optional) — The role permission the request needs. Set when `error_code` is `PERMISSION_DENIED`.
- `service` (string, optional) — The workspace service that is turned off. Set when `error_code` is `SERVICE_DISABLED`.

### 402 Payment Required Error

The workspace's subscription plan does not include the Open API.

- `status` (boolean, required)
- `message` (string, required)
- `error_code` (enum, optional) — Machine-readable reason. Present on 402 and 403 responses.
  - Allowed values: `PERMISSION_DENIED`, `SERVICE_DISABLED`, `OPEN_API_NOT_ENABLED`
- `permission` (string, optional) — The role permission the request needs. Set when `error_code` is `PERMISSION_DENIED`.
- `service` (string, optional) — The workspace service that is turned off. Set when `error_code` is `SERVICE_DISABLED`.

### 403 Forbidden Error

The key owner's role does not include the permission this endpoint needs. `permission` names the missing permission.

- `status` (boolean, required)
- `message` (string, required)
- `error_code` (enum, optional) — Machine-readable reason. Present on 402 and 403 responses.
  - Allowed values: `PERMISSION_DENIED`, `SERVICE_DISABLED`, `OPEN_API_NOT_ENABLED`
- `permission` (string, optional) — The role permission the request needs. Set when `error_code` is `PERMISSION_DENIED`.
- `service` (string, optional) — The workspace service that is turned off. Set when `error_code` is `SERVICE_DISABLED`.

## Types

### ConfigsTaxPostResponsesContentApplicationJsonSchemaData

- `id` (string, required)
- `name` (string, required)
- `rate` (double, required)
- `kind` (enum, optional) — VAT for sales and purchase tax. WHT for withholding tax, which is deducted from a payment. Fixed once the profile is created. Profiles created before this field existed are VAT.
  - Allowed values: `VAT`, `WHT`
- `deduct_on` (enum, optional) — When withholding tax is deducted. Only applies to WHT profiles. PAYMENT deducts it when the vendor is paid or the customer pays. BILL is reserved and not yet supported for posting.
  - Allowed values: `PAYMENT`, `BILL`
- `withholding_basis` (enum, optional) — What the withholding rate applies to when a payment or receipt does not state its own base. `EXCL_VAT` uses the VAT-exclusive share of the amount being settled, `INCL_VAT` the full amount. Only meaningful on WHT profiles; VAT profiles report `EXCL_VAT`.
  - Allowed values: `EXCL_VAT`, `INCL_VAT`

## Examples

**Request**

```json
{
  "name": "VAT 7.5%",
  "rate": 7.5,
  "input_account_id": "b85a9785-fbbd-4858-b9cd-c79ab926e70e",
  "output_account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9",
  "code": "VAT75",
  "is_compound": false,
  "is_recoverable": true,
  "kind": "VAT"
}
```

**Response**

```json
{
  "data": {
    "id": "78c68f6d-d734-4822-9a6c-73f517a0e5c1",
    "name": "VAT 7.5%",
    "rate": 7.5,
    "kind": "VAT",
    "deduct_on": "PAYMENT",
    "withholding_basis": "EXCL_VAT"
  },
  "status": true,
  "message": "Successfully created tax profile"
}
```

**SDK Code**

```python Configurations_Tax Profiles_Create Tax Profile_example
import requests

url = "https://api.papertracc.com/v1/configs/tax"

payload = {
    "name": "VAT 7.5%",
    "rate": 7.5,
    "input_account_id": "b85a9785-fbbd-4858-b9cd-c79ab926e70e",
    "output_account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9",
    "code": "VAT75",
    "is_compound": False,
    "is_recoverable": True,
    "kind": "VAT"
}
headers = {
    "Authorization": "Bearer <apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Configurations_Tax Profiles_Create Tax Profile_example
const url = 'https://api.papertracc.com/v1/configs/tax';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <apiKey>', 'Content-Type': 'application/json'},
  body: '{"name":"VAT 7.5%","rate":7.5,"input_account_id":"b85a9785-fbbd-4858-b9cd-c79ab926e70e","output_account_id":"2b0d1461-e52e-4a1a-a69c-11801431c2c9","code":"VAT75","is_compound":false,"is_recoverable":true,"kind":"VAT"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Configurations_Tax Profiles_Create Tax Profile_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.papertracc.com/v1/configs/tax"

	payload := strings.NewReader("{\n  \"name\": \"VAT 7.5%\",\n  \"rate\": 7.5,\n  \"input_account_id\": \"b85a9785-fbbd-4858-b9cd-c79ab926e70e\",\n  \"output_account_id\": \"2b0d1461-e52e-4a1a-a69c-11801431c2c9\",\n  \"code\": \"VAT75\",\n  \"is_compound\": false,\n  \"is_recoverable\": true,\n  \"kind\": \"VAT\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Configurations_Tax Profiles_Create Tax Profile_example
require 'uri'
require 'net/http'

url = URI("https://api.papertracc.com/v1/configs/tax")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"VAT 7.5%\",\n  \"rate\": 7.5,\n  \"input_account_id\": \"b85a9785-fbbd-4858-b9cd-c79ab926e70e\",\n  \"output_account_id\": \"2b0d1461-e52e-4a1a-a69c-11801431c2c9\",\n  \"code\": \"VAT75\",\n  \"is_compound\": false,\n  \"is_recoverable\": true,\n  \"kind\": \"VAT\"\n}"

response = http.request(request)
puts response.read_body
```

```java Configurations_Tax Profiles_Create Tax Profile_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.papertracc.com/v1/configs/tax")
  .header("Authorization", "Bearer <apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"VAT 7.5%\",\n  \"rate\": 7.5,\n  \"input_account_id\": \"b85a9785-fbbd-4858-b9cd-c79ab926e70e\",\n  \"output_account_id\": \"2b0d1461-e52e-4a1a-a69c-11801431c2c9\",\n  \"code\": \"VAT75\",\n  \"is_compound\": false,\n  \"is_recoverable\": true,\n  \"kind\": \"VAT\"\n}")
  .asString();
```

```php Configurations_Tax Profiles_Create Tax Profile_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.papertracc.com/v1/configs/tax', [
  'body' => '{
  "name": "VAT 7.5%",
  "rate": 7.5,
  "input_account_id": "b85a9785-fbbd-4858-b9cd-c79ab926e70e",
  "output_account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9",
  "code": "VAT75",
  "is_compound": false,
  "is_recoverable": true,
  "kind": "VAT"
}',
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Configurations_Tax Profiles_Create Tax Profile_example
using RestSharp;

var client = new RestClient("https://api.papertracc.com/v1/configs/tax");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"VAT 7.5%\",\n  \"rate\": 7.5,\n  \"input_account_id\": \"b85a9785-fbbd-4858-b9cd-c79ab926e70e\",\n  \"output_account_id\": \"2b0d1461-e52e-4a1a-a69c-11801431c2c9\",\n  \"code\": \"VAT75\",\n  \"is_compound\": false,\n  \"is_recoverable\": true,\n  \"kind\": \"VAT\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Configurations_Tax Profiles_Create Tax Profile_example
import Foundation

let headers = [
  "Authorization": "Bearer <apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "VAT 7.5%",
  "rate": 7.5,
  "input_account_id": "b85a9785-fbbd-4858-b9cd-c79ab926e70e",
  "output_account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9",
  "code": "VAT75",
  "is_compound": false,
  "is_recoverable": true,
  "kind": "VAT"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.papertracc.com/v1/configs/tax")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```