> 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`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Sample Flows

## Article: Sample Flows

## Article Link: https://dev.wix.com/docs/api-reference/business-management/payments/wix-payments-provider/tax-documents/sample-flows.md

## Article Content:

# Tax Documents: Sample Flows

This article presents possible use cases and corresponding sample flows that you can support. It provides a useful starting point as you plan your implementation.

## List a merchant's tax documents

The merchant wants to see the tax documents that Wix Payments has issued for their account, such as their Form 1099-K for past years.

To list a merchant's tax documents:

1. Get the `accountId` of the merchant's Wix Payments account.
1. Call [List Tax Documents](https://dev.wix.com/docs/api-reference/business-management/payments/wix-payments-provider/tax-documents/list-tax-documents.md) with the `accountId`. Optionally filter by `type`. For example: `?accountId=<account-id>&type=FORM_1099_K`.
1. For each returned tax document, render its `displayName`, `period`, and `type`, and use `downloadable` to decide whether to offer a download.
1. If `pagingMetadata.cursors.next` is present, pass it as `paging.cursor` in a follow-up call to retrieve the next page. Keep the other request fields the same, because a cursor request reuses the filters and sorting from the original call.

## Download a tax document's file

The merchant selects one of their tax documents to download it as a PDF.

To download a tax document's file:

1. Confirm the tax document's `downloadable` field is `true`. A tax document can be downloaded only when a file is available.
1. Call [Generate File Download Info](https://dev.wix.com/docs/api-reference/business-management/payments/wix-payments-provider/tax-documents/generate-file-download-info.md) with the `taxDocumentId`.
1. Follow `downloadInfo.url` immediately to download the PDF. The URL expires 10 seconds after it's generated, so don't store it. Call [Generate File Download Info](https://dev.wix.com/docs/api-reference/business-management/payments/wix-payments-provider/tax-documents/generate-file-download-info.md) again to get a fresh URL if needed.