Skip to content

Add TIN reverification workflow for 1099-DIV#1591

Open
nyomanjyotisa wants to merge 1 commit intomainfrom
reverfivication-tin
Open

Add TIN reverification workflow for 1099-DIV#1591
nyomanjyotisa wants to merge 1 commit intomainfrom
reverfivication-tin

Conversation

@nyomanjyotisa
Copy link
Member

@nyomanjyotisa nyomanjyotisa commented Feb 2, 2026

Issue https://github.com/antiwork/accounting/issues/77

Description

The IRS sent a CP 2100A notice indicating TIN/name mismatches for certain users on 1099-DIV. We need to:

  1. Flag affected users for TIN re-verification
  2. Notify them via email to update their tax information
  3. Prevent them from receiving payments until they re-verify

Screenshots

Tax Setting Page

image

Email

image

One Time Script execution

Dry run

image

Live

image

AI disclosure

Claude Sonnet 4.5 used for code generation. All code self reviewed.

@nyomanjyotisa nyomanjyotisa changed the title tin reverification Add TIN reverification workflow for 1099-DIV Feb 2, 2026

def has_verified_tax_id?
tax_id.present? && (!requires_w9? || tax_id_status == UserComplianceInfo::TAX_ID_STATUS_VERIFIED)
tax_id.present? && (!requires_w9? || tax_id_status == UserComplianceInfo::TAX_ID_STATUS_VERIFIED) && !requires_tin_reverification
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set has_verified_tax_id to false if requires_tin_reverification is true to prevent flagged users to receive any payments

self.tax_id_status = nil if tax_status_related_attributes.any? { send("#{_1}_changed?") }
if tax_status_related_attributes.any? { send("#{_1}_changed?") }
self.tax_id_status = nil
self.requires_tin_reverification = false if requires_tin_reverification?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clear re-verification flag if user updates their tax information


React.useEffect(() => {
if (user.requiresTinReverification && pathname !== "/settings/tax") {
router.replace("/settings/tax");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redirect users flagged for TIN re-verification to the tax settings page to forced them to re-enter their TIN and name

if (user.requiresTinReverification && pathname !== "/settings/tax") {
return (
<div className="flex h-screen items-center justify-center">
<p className="text-muted-foreground">Redirecting...</p>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Block rendering while redirecting

@nyomanjyotisa nyomanjyotisa marked this pull request as ready for review February 2, 2026 06:37
@nyomanjyotisa nyomanjyotisa requested a review from ershad February 2, 2026 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants