> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cariqa.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Billing Details

> Usage patterns for billing and account type management

## Account Type Configuration

Billing details control invoice formatting and account type handling.

Some countries has specific constraints. [Check this page before proceed](/country-specific-requirements).

### Retrieve Current Billing Details

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://connect.cariqa.com/api/v1/users/9405cf8c-8375-4373-b4d3-b61f9a0c01eb/billing-details/" \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -H "Content-Type: application/json"
  ```

  ```python Python theme={null}
  import requests

  headers = {
      "Authorization": "Bearer YOUR_API_TOKEN",
      "Content-Type": "application/json"
  }

  response = requests.get(
      "https://connect.cariqa.com/api/v1/users/9405cf8c-8375-4373-b4d3-b61f9a0c01eb/billing-details/",
      headers=headers
  )
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://connect.cariqa.com/api/v1/users/9405cf8c-8375-4373-b4d3-b61f9a0c01eb/billing-details/', {
    headers: {
      'Authorization': 'Bearer YOUR_API_TOKEN',
      'Content-Type': 'application/json'
    }
  });
  ```
</CodeGroup>

Response:

```json theme={null}
{
  "country": null,
  "city": null,
  "tax_id": null,
  "account_type": "personal",
  "company_name": null,
  "vat_id": null,
  "line1": null,
  "postal_code": null,
  "first_name": null,
  "last_name": null
}
```

### Configure Personal Account

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PUT "https://connect.cariqa.com/api/v1/users/9405cf8c-8375-4373-b4d3-b61f9a0c01eb/billing-details/" \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "country": "de",
      "city": "Berlin",
      "tax_id": "DE123456789",
      "account_type": "personal",
  	"line1": "BeKarl-Marx-Alleerlin",
      "postal_code": "10243",
      "first_name": "Example",
      "last_name": "Sample"
    }'
  ```

  ```python Python theme={null}
  import requests

  headers = {
      "Authorization": "Bearer YOUR_API_TOKEN",
      "Content-Type": "application/json"
  }

  data = {
      "country": "de",
      "city": "Berlin",
      "tax_id": "DE123456789",
      "account_type": "personal",
  	"line1": "BeKarl-Marx-Alleerlin",
      "postal_code": "10243",
      "first_name": "Example",
      "last_name": "Sample"
  }

  response = requests.put(
      "https://connect.cariqa.com/api/v1/users/9405cf8c-8375-4373-b4d3-b61f9a0c01eb/billing-details/",
      headers=headers,
      json=data
  )
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://connect.cariqa.com/api/v1/users/9405cf8c-8375-4373-b4d3-b61f9a0c01eb/billing-details/', {
    method: 'PUT',
    headers: {
      'Authorization': 'Bearer YOUR_API_TOKEN',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      country: 'de',
      city: 'Berlin',
      tax_id: 'DE123456789',
      account_type: 'personal',
      line1: 'BeKarl-Marx-Alleerlin',
      postal_code: '10243',
      first_name: 'Example',
      last_name: 'Sample'
    })
  });
  ```
</CodeGroup>

Response:

```json theme={null}
{
  "country": "de",
  "city": "Berlin",
  "tax_id": "DE123456789",
  "account_type": "personal",
  "company_name": null,
  "vat_id": null,
  "line1": "BeKarl-Marx-Alleerlin",
  "postal_code": "10243",
  "first_name": "Example",
  "last_name": "Sample"
}
```

### Configure Business Account

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PUT "https://connect.cariqa.com/api/v1/users/9405cf8c-8375-4373-b4d3-b61f9a0c01eb/billing-details/" \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "country": "de",
      "city": "Berlin",
      "account_type": "business",
      "company_name": "CompanyName",
      "vat_id": "DE123456789",
      "line1": "BeKarl-Marx-Alleerlin",
      "postal_code": "10243",
      "first_name": "Example",
      "last_name": "Sample"
    }'
  ```

  ```python Python theme={null}
  import requests

  headers = {
      "Authorization": "Bearer YOUR_API_TOKEN",
      "Content-Type": "application/json"
  }

  data = {
      "country": "de",
      "city": "Berlin",
      "account_type": "business",
      "company_name": "CompanyName",
      "vat_id": "DE123456789",
      "line1": "BeKarl-Marx-Alleerlin",
      "postal_code": "10243",
      "first_name": "Example",
      "last_name": "Sample"
  }

  response = requests.put(
      "https://connect.cariqa.com/api/v1/users/9405cf8c-8375-4373-b4d3-b61f9a0c01eb/billing-details/",
      headers=headers,
      json=data
  )
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://connect.cariqa.com/api/v1/users/9405cf8c-8375-4373-b4d3-b61f9a0c01eb/billing-details/', {
    method: 'PUT',
    headers: {
      'Authorization': 'Bearer YOUR_API_TOKEN',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      country: 'de',
      city: 'Berlin',
      account_type: 'business',
      company_name: 'CompanyName',
      vat_id: 'DE123456789',
      line1: 'BeKarl-Marx-Alleerlin',
      postal_code: '10243',
      first_name: 'Example',
      last_name: 'Sample'
    })
  });
  ```
</CodeGroup>

Response:

```json theme={null}
{
  "country": "de",
  "city": "Berlin",
  "tax_id": null,
  "account_type": "business",
  "company_name": "CompanyName",
  "vat_id": "DE123456789",
  "line1": "BeKarl-Marx-Alleerlin",
  "postal_code": "10243",
  "first_name": "Example",
  "last_name": "Sample"
}
```

## Account Type Impact

* **Personal Account**: Uses first and last names on invoices, personal TAX ID in case of need
* **Business Account**: Uses company name and VAT ID for professional invoices with proper tax handling
* **Invoice Generation**: Billing details ensure proper identity and formatting for payment flows
