> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# GetTaxDocument

# Package: wixPaymentsProvider

# Namespace: TaxDocumentsService

# Method link: https://dev.wix.com/docs/api-reference/business-management/payments/wix-payments-provider/tax-documents/get-tax-document.md

## Permission Scopes:
Managing tax tax documents: SCOPE.PAYMENTS.MANAGE-TAX-DOCUMENTS

## Introduction

Retrieves a tax document by ID.

---

## REST API

### Schema

```
 Method: getTaxDocument
 Description: Retrieves a tax document by GUID.
 URL: https://www.wixapis.com/payments/platform/v1/tax-documents/{taxDocumentId}
 Method: GET
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  taxDocumentId
 Method parameters: 
   param name: taxDocumentId | type:   none | required: true 
 Return type: GetTaxDocumentResponse
  - name: taxDocument | type: TaxDocument | description: Retrieved tax document.  
     - name: id | type: string | description: Tax document GUID.  | read-only: true | validation: format GUID
     - name: createdDate | type: string | description: Date and time the tax document was created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the tax document was last updated.  | read-only: true | validation: format date-time
     - name: revision | type: string | description: Revision number, which increments by 1 each time the tax document is updated.  | read-only: true 
     - name: accountId | type: string | description: GUID of the Wix Payments account the tax document belongs to.  | validation: format GUID, immutable
     - name: type | type: TaxDocumentType | description: Type of tax document.  | validation: immutable
         - enum:
         -     FORM_1099_K: US IRS Form 1099-K.
     - name: period | type: TaxPeriod | description: Period the tax document covers.  | validation: immutable
        - ONE-OF: 
           - name: yearPeriod | type: YearPeriod | description: The tax document covers a full calendar year.  
              - name: year | type: integer | description: Calendar year the tax document covers. For example, `2024`.  
     - name: downloadable | type: boolean | description: Whether a file is available to download for the tax document. When `false`, calling Generate File Download Info returns an error.  At least one of `downloadable` and `problematic` is always `true`.  
     - name: problematic | type: boolean | description: Whether a problem was found with the tax document's file, for example incorrect data that's being corrected.  At least one of `downloadable` and `problematic` is always `true`, and both can be `true` at the same time.  
     - name: sourceType | type: SourceType | description: How the tax document's amounts are aggregated.  | read-only: true 
         - enum:
         -     PAYMENT: Amounts are aggregated by payment date.
         -     PAYOUT: Amounts are aggregated by payout date.
     - name: displayName | type: string | description: Human-readable name for the tax document's file.  | read-only: true | validation: minLength 1, maxLength 1000


```

### Examples

### Get a tax document by ID
Retrieves a single tax document that belongs to the specified Wix Payments account.

```curl
curl -X GET \
'https://www.wixapis.com/payments/platform/v1/tax-documents/3f2b9c7a-1e6d-4b8a-9c2f-7a1e6d4b8a9c' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.payments.taxDocuments.getTaxDocument(taxDocumentId)
 Description: Retrieves a tax document by GUID.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  taxDocumentId
 Method parameters: 
   param name: taxDocumentId | type: string | description: GUID of the tax document to retrieve. | required: true | validation: format GUID
 Return type: PROMISE<TaxDocument>
  - name: _id | type: string | description: Tax document GUID.  | read-only: true | validation: format GUID
  - name: _createdDate | type: Date | description: Date and time the tax document was created.  | read-only: true 
  - name: _updatedDate | type: Date | description: Date and time the tax document was last updated.  | read-only: true 
  - name: revision | type: string | description: Revision number, which increments by 1 each time the tax document is updated.  | read-only: true 
  - name: accountId | type: string | description: GUID of the Wix Payments account the tax document belongs to.  | validation: format GUID, immutable
  - name: type | type: TaxDocumentType | description: Type of tax document.  | validation: immutable
     - enum:
     -     FORM_1099_K: US IRS Form 1099-K.
  - name: period | type: TaxPeriod | description: Period the tax document covers.  | validation: immutable
     - ONE-OF: 
        - name: yearPeriod | type: YearPeriod | description: The tax document covers a full calendar year.  
           - name: year | type: integer | description: Calendar year the tax document covers. For example, `2024`.  
  - name: downloadable | type: boolean | description: Whether a file is available to download for the tax document. When `false`, calling Generate File Download Info returns an error.  At least one of `downloadable` and `problematic` is always `true`.  
  - name: problematic | type: boolean | description: Whether a problem was found with the tax document's file, for example incorrect data that's being corrected.  At least one of `downloadable` and `problematic` is always `true`, and both can be `true` at the same time.  
  - name: sourceType | type: SourceType | description: How the tax document's amounts are aggregated.  | read-only: true 
     - enum:
     -     PAYMENT: Amounts are aggregated by payment date.
     -     PAYOUT: Amounts are aggregated by payout date.
  - name: displayName | type: string | description: Human-readable name for the tax document's file.  | read-only: true | validation: minLength 1, maxLength 1000


```

### Examples

### getTaxDocument
```javascript
import { taxDocuments } from '@wix/payments';

async function getTaxDocument(taxDocumentId) {
  const response = await taxDocuments.getTaxDocument(taxDocumentId);
};
```

### getTaxDocument (with elevated permissions)
```javascript
import { taxDocuments } from '@wix/payments';
import { auth } from '@wix/essentials';

async function myGetTaxDocumentMethod(taxDocumentId) {
  const elevatedGetTaxDocument = auth.elevate(taxDocuments.getTaxDocument);
  const response = await elevatedGetTaxDocument(taxDocumentId);
}
```

### getTaxDocument (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { taxDocuments } from '@wix/payments';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { taxDocuments },
  // Include the auth strategy and host as relevant
});


async function getTaxDocument(taxDocumentId) {
  const response = await myWixClient.taxDocuments.getTaxDocument(taxDocumentId);
};
```

---