# Source: https://docs.anchorbrowser.io/integrations/open-source/playwright/government/USA/federal/irs-8300.md

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

# IRS Form 8300

> Automate IRS Form 8300 cash payment reporting workflows with Playwright when APIs aren't available.

# How to Automate IRS Form 8300 with Playwright

Automate critical IRS Form 8300 cash payment reporting workflows with Playwright when APIs aren't available or sufficient. You'll eliminate manual compliance reporting and reduce tax violation risks by automating repetitive large cash transaction declarations. Use Playwright to interact with IRS e-file systems programmatically.

[View IRS developer resources](https://www.irs.gov/e-file-providers/modernized-e-file-overview) for available APIs when applicable.

## Setup

Install Playwright and configure authentication:

```bash  theme={null}
npm install playwright
```

## Automate Workflows

Create scripts for common [IRS Form 8300](https://www.irs.gov/pub/irs-pdf/f8300.pdf) tasks:

```JavaScript  theme={null}
import { chromium } from 'playwright';

const browser = await chromium.launch();
const page = await browser.newPage();

// Navigate to IRS e-file system
await page.goto('https://bsaefiling.fincen.gov/');
await page.fill('[data-testid="username"]', process.env.IRS_USERNAME);
await page.fill('[data-testid="password"]', process.env.IRS_PASSWORD);
await page.click('[data-testid="login-button"]');

// Start new Form 8300 filing
await page.click('[data-testid="new-form-8300"]');
await page.selectOption('[name="filing_reason"]', 'single_transaction');

// Business information
await page.fill('[name="business_name"]', 'Premier Auto Sales LLC');
await page.fill('[name="business_address"]', '789 Main Street');
await page.fill('[name="business_city"]', 'Phoenix');
await page.selectOption('[name="business_state"]', 'AZ');
await page.fill('[name="business_zip"]', '85001');
await page.fill('[name="business_ein"]', '12-3456789');

// Transaction details
await page.fill('[name="transaction_date"]', '12/10/2024');
await page.fill('[name="cash_amount']', '15000.00');
await page.selectOption('[name="transaction_type"]', 'sale_of_goods');
await page.fill('[name="transaction_description']', '2019 BMW X5 vehicle sale');

// Person making payment
await page.fill('[name="payer_first_name"]', 'Michael');
await page.fill('[name="payer_last_name"]', 'Rodriguez');
await page.fill('[name="payer_address']', '456 Oak Avenue');
await page.fill('[name="payer_city"]', 'Scottsdale');
await page.selectOption('[name="payer_state"]', 'AZ');
await page.fill('[name="payer_zip"]', '85260');
await page.fill('[name="payer_ssn"]', '123-45-6789');
await page.fill('[name="payer_date_of_birth"]', '03/15/1978');

// Payment method details
await page.selectOption('[name="payment_method"]', 'cash');
await page.fill('[name="denominations_100']', '150'); // $100 bills count
await page.fill('[name="foreign_currency_amount']', '0');

// Verification of identity
await page.selectOption('[name="id_type"]', 'drivers_license');
await page.fill('[name="id_number"]', 'D12345678');
await page.selectOption('[name="id_state']', 'AZ');

// Submit report
await page.check('[name="certify_accuracy"]');
await page.fill('[name="preparer_name"]', 'Sarah Financial Controller');
await page.fill('[name="preparer_title"]', 'Controller');
await page.click('[data-testid="submit-form-8300"]');

// Download confirmation
await page.click('[data-testid="download-confirmation"]');

await browser.close();
```

Playwright handles transaction validation, amount calculations, and IRS submission processes automatically. You can automate bulk filings, compliance tracking, and suspicious activity reporting workflows.

## Scale your IRS Form 8300 automation with Anchor Browser

Run your Playwright IRS automations on cloud browsers with enterprise-grade reliability and persistent tax compliance sessions. Learn more and get started for free: [https://anchorbrowser.io](https://anchorbrowser.io)