Skip to content

BILL-5586: Add descriptor_code support to bank account verification#308

Open
kevinpjones wants to merge 3 commits into
mainfrom
BILL-5586-node-descriptor-code-verification
Open

BILL-5586: Add descriptor_code support to bank account verification#308
kevinpjones wants to merge 3 commits into
mainfrom
BILL-5586-node-descriptor-code-verification

Conversation

@kevinpjones
Copy link
Copy Markdown

Description

Problem: Stripe's Setup Intents API added a descriptor code-based microdeposit verification path alongside the legacy two-amount path. When a bank account is created via Setup Intents, Stripe sends a single $0.01 deposit whose statement descriptor contains a 6-character code beginning with SM. The Node SDK had no test coverage for this path, and the BANK_ACCOUNT fixture was missing microdeposit_type, so the response shape didn't reflect the real API.

Solution: Added microdeposit_type to the BANK_ACCOUNT fixture and added test coverage for:

  • Verifying with descriptor_code (new path)
  • Verifying with amounts (existing path — renamed test for clarity)
  • microdeposit_type present on a retrieved (unverified) bank account
  • microdeposit_type is null once an account is verified

Non-breaking: The Node SDK is a pure pass-through wrapper — descriptor_code already routes correctly through URLSearchParams with no model-layer changes needed. All existing code using amounts continues to work without any changes.

Story

https://lobsters.atlassian.net/browse/BILL-5586 (subtask of https://lobsters.atlassian.net/browse/BILL-5581)

Related PR's

Mirrors lob/lob-php#192

Verify

  • Code runs without errors
  • Tests pass (97 passing, bankAccounts.js at 100% coverage)

Stripe updated microdeposit verification from two amounts to a single
6-character descriptor code. The Node SDK is a pass-through wrapper so
no model changes are needed — this adds fixture and test coverage for
the new path and exposes microdeposit_type in the BANK_ACCOUNT fixture.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds tests for verifying bank accounts using a descriptor code and introduces assertions to verify the behavior of the new microdeposit_type field, which is set to null once an account is verified. The review feedback points out that several callback-based tests ignore error parameters, which can lead to cryptic failures or timeouts. It is recommended to explicitly handle these errors by passing them to the done callback.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread test/bankAccounts.js Outdated
Comment thread test/bankAccounts.js
Comment thread test/bankAccounts.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant