Skip to content

BILL-5588: Add descriptor_code support to bank account verification#349

Open
kevinpjones wants to merge 6 commits into
mainfrom
bill-5581-descriptor-code-verification
Open

BILL-5588: Add descriptor_code support to bank account verification#349
kevinpjones wants to merge 6 commits into
mainfrom
bill-5581-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 Java SDK had no support for this path.

Solution:

  • Added descriptor_code (String) as an alternative to amounts on BankAccountVerify, with mutual-exclusion validation via isValid() and pattern enforcement (^SM[a-zA-Z0-9]{4}$) on the setter
  • Added microdeposit_type field to BankAccount response model so callers can determine which verification path applies before calling verify
  • Fixed pom.xml: removed defunct ossrh pluginRepository entry (s01.oss.sonatype.org is decommissioned) and removed <extensions>true</extensions> from nexus-staging-maven-plugin so it no longer blocks local builds as a build extension

Non-breaking: All existing code using amounts continues to work without any changes.

Story

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

Related PRs

Mirrors lob/lob-php#192

Verify

  • Code runs without errors
  • 158 unit tests pass (mvn test -Dgroups="Unit")

kevinpjones and others added 2 commits June 3, 2026 13:33
Stripe updated microdeposit verification from two amounts to a single
6-character descriptor code. This adds descriptor_code as an alternative
to amounts on BankAccountVerify (with mutual-exclusion validation and
pattern enforcement), exposes microdeposit_type on BankAccount so callers
know which path to use, and fixes the pom.xml nexus plugin configuration
that was blocking local builds.

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

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

Copy link
Copy Markdown

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 introduces support for verifying bank accounts using a descriptor code in addition to microdeposit amounts. It adds the microdeposit_type field to the BankAccount model and the descriptor_code field to the BankAccountVerify model, along with corresponding validation logic, unit tests, and integration tests. The feedback highlights a potential breaking change where removing the default initialization of the amounts list in BankAccountVerify could cause NullPointerExceptions for existing clients. It is recommended to restore the default initialization, update the validation logic to check for non-empty lists, and precompile the regular expression pattern for the descriptor code to improve performance.

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 src/main/java/com/lob/model/BankAccountVerify.java Outdated
Comment thread src/main/java/com/lob/model/BankAccountVerify.java
Comment thread src/main/java/com/lob/model/BankAccountVerify.java
Comment thread src/main/java/com/lob/model/BankAccountVerify.java
kevinpjones and others added 4 commits June 3, 2026 13:38
Only remove <extensions>true</extensions> from nexus-staging-maven-plugin,
which was blocking local builds by forcing resolution at POM load time.
Restore version 1.7.0 and ossrh pluginRepository to their original values.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

2 participants